@struktoai/mirage-node 0.0.3-alpha.0 → 0.0.3
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 +1 -1
- package/dist/{aliyun-TMZRUYCG.js → aliyun-JMJ3PFYY.js} +3 -3
- package/dist/{backblaze-OHW57DLK.js → backblaze-TDFD23QO.js} +3 -3
- package/dist/{box-UXTCAFOZ.js → box-GQ2U2R6R.js} +2 -2
- package/dist/{ceph-TNN4I2FT.js → ceph-S2VOYO6G.js} +3 -3
- package/dist/{chunk-FXFDBF3P.js → chunk-3WIO7NBR.js} +2 -2
- package/dist/{chunk-O7ODGJYL.js → chunk-47AVIIOT.js} +2 -2
- package/dist/{chunk-Q6CDMOM6.js → chunk-7CW3BMPH.js} +2 -2
- package/dist/{chunk-E7RW3SBV.js → chunk-A7IVFIOP.js} +2 -2
- package/dist/chunk-A7IVFIOP.js.map +1 -0
- package/dist/{chunk-3T3RMDNX.js → chunk-AUHSTJJ3.js} +2 -2
- package/dist/{chunk-PJBQKMCD.js → chunk-DM4GSE26.js} +2 -2
- package/dist/{chunk-5DLOHQJ2.js → chunk-EM4J5EQS.js} +2 -2
- package/dist/chunk-EM4J5EQS.js.map +1 -0
- package/dist/{chunk-ABTEGAFB.js → chunk-EZQ5HBAC.js} +2 -2
- package/dist/chunk-EZQ5HBAC.js.map +1 -0
- package/dist/{chunk-KTNDT45N.js → chunk-FQ33BYFR.js} +2 -2
- package/dist/{chunk-YAVGCQUP.js → chunk-G2WCEUQL.js} +2 -2
- package/dist/chunk-G2WCEUQL.js.map +1 -0
- package/dist/{chunk-RLGWMJD3.js → chunk-GCFYZSVR.js} +133 -3
- package/dist/chunk-GCFYZSVR.js.map +1 -0
- package/dist/{chunk-NHS7WLEQ.js → chunk-GS5AUKUO.js} +2 -2
- package/dist/chunk-GS5AUKUO.js.map +1 -0
- package/dist/{chunk-BYTU2YC3.js → chunk-HGCRXJGP.js} +2 -2
- package/dist/{chunk-G5BZE7UA.js → chunk-HJJMP6IX.js} +2 -2
- package/dist/{chunk-IQVNVTOP.js → chunk-I5THIMPP.js} +2 -2
- package/dist/chunk-IDYHQQOH.js +1095 -0
- package/dist/chunk-IDYHQQOH.js.map +1 -0
- package/dist/{chunk-C6NHFMIP.js → chunk-IK2L4EN3.js} +2 -2
- package/dist/{chunk-LYDMMNL2.js → chunk-JAGJTM3Q.js} +2 -2
- package/dist/chunk-JAGJTM3Q.js.map +1 -0
- package/dist/{chunk-A7X4L4JM.js → chunk-JCC4CU2I.js} +2 -2
- package/dist/chunk-JCC4CU2I.js.map +1 -0
- package/dist/{chunk-AJICZLHT.js → chunk-KPULTUOK.js} +2 -2
- package/dist/{chunk-YPT4JBUY.js → chunk-LV2G7VHL.js} +2 -2
- package/dist/chunk-LV2G7VHL.js.map +1 -0
- package/dist/{chunk-C6NHEDHY.js → chunk-M5FVUIYP.js} +2 -2
- package/dist/chunk-M5FVUIYP.js.map +1 -0
- package/dist/{chunk-HEHERHQ5.js → chunk-MPCCRRE6.js} +2 -2
- package/dist/chunk-MPCCRRE6.js.map +1 -0
- package/dist/{chunk-RQYEEA2O.js → chunk-N5FSLVKO.js} +2 -2
- package/dist/{chunk-CASCUFK2.js → chunk-NOHWIBRX.js} +2 -2
- package/dist/chunk-NOHWIBRX.js.map +1 -0
- package/dist/{chunk-TRTUHCS4.js → chunk-QCZ2XUKH.js} +2 -2
- package/dist/chunk-QCZ2XUKH.js.map +1 -0
- package/dist/{chunk-3IJSIVKT.js → chunk-QQBJC2FQ.js} +2 -2
- package/dist/{chunk-JZQHKDSY.js → chunk-RNQN2FOU.js} +2 -2
- package/dist/chunk-RNQN2FOU.js.map +1 -0
- package/dist/{chunk-DTAY7LPC.js → chunk-S5OVP467.js} +2 -2
- package/dist/chunk-S5OVP467.js.map +1 -0
- package/dist/{chunk-5YOCVEUB.js → chunk-SWCDFEUK.js} +2 -2
- package/dist/chunk-SWCDFEUK.js.map +1 -0
- package/dist/{chunk-MHCMHKM6.js → chunk-TA3WMOMU.js} +2 -2
- package/dist/chunk-TA3WMOMU.js.map +1 -0
- package/dist/{chunk-WSGEIVY3.js → chunk-TURD42QO.js} +101 -85
- package/dist/chunk-TURD42QO.js.map +1 -0
- package/dist/{chunk-WL7HS7EM.js → chunk-UINQOUZR.js} +2 -2
- package/dist/{chunk-A4Z6DZ22.js → chunk-VWKUT4CW.js} +2 -2
- package/dist/chunk-VWKUT4CW.js.map +1 -0
- package/dist/{chunk-ERELJ7BS.js → chunk-WAR4Q2NM.js} +2 -2
- package/dist/chunk-WAR4Q2NM.js.map +1 -0
- package/dist/{chunk-5HCVKTP3.js → chunk-WHFUWWI6.js} +92 -81
- package/dist/chunk-WHFUWWI6.js.map +1 -0
- package/dist/{chunk-HQ4KWN76.js → chunk-X3G37FXT.js} +2 -2
- package/dist/{chunk-OYV2DN66.js → chunk-X5HF2OFP.js} +2 -2
- package/dist/chunk-XWVDS66D.js +963 -0
- package/dist/chunk-XWVDS66D.js.map +1 -0
- package/dist/{chunk-L6JPBJAS.js → chunk-YAHRT6MB.js} +2 -2
- package/dist/{chunk-XRU5WXZX.js → chunk-ZEGAMJO2.js} +2 -2
- package/dist/chunk-ZEGAMJO2.js.map +1 -0
- package/dist/{chunk-B6SXRCBO.js → chunk-ZGSER5TG.js} +2 -2
- package/dist/databricks_volume-7XOUYSTY.js +7 -0
- package/dist/{digitalocean-6SPR4S7V.js → digitalocean-3CQ4CPPZ.js} +3 -3
- package/dist/{discord-SAV2RBJV.js → discord-BG7OSRJG.js} +2 -2
- package/dist/{disk-POACMF4G.js → disk-XVLBCVKE.js} +2 -2
- package/dist/{dropbox-CQ7MTYX2.js → dropbox-74GYLV3R.js} +2 -2
- package/dist/{email-KBQ7CXS7.js → email-5IZ7OBQ4.js} +2 -2
- package/dist/{gcs-SMIE4VMT.js → gcs-EMEYU2XT.js} +3 -3
- package/dist/{gdocs-X5Y2SIQX.js → gdocs-R67TDPON.js} +2 -2
- package/dist/{gdrive-SIQPRIGI.js → gdrive-PRN2ALRK.js} +2 -2
- package/dist/{github-KBHWANKQ.js → github-DV7E6OFV.js} +2 -2
- package/dist/{github_ci-HPITNK37.js → github_ci-Q554V5PA.js} +2 -2
- package/dist/{gmail-DKHAGJNX.js → gmail-OLN2LT4O.js} +2 -2
- package/dist/{gsheets-ZSUDIWGK.js → gsheets-H4RYMQJ5.js} +2 -2
- package/dist/{gslides-GYXM7IMJ.js → gslides-YLCHKJOM.js} +2 -2
- package/dist/{hf_buckets-RIOMV7WG.js → hf_buckets-DTKXKKFF.js} +3 -3
- package/dist/{hf_datasets-QF4BQ3OK.js → hf_datasets-55C4APKR.js} +3 -3
- package/dist/{hf_models-62GC2HPZ.js → hf_models-RO5JR36V.js} +3 -3
- package/dist/{hf_spaces-NVSMUNRM.js → hf_spaces-ZVZ3EDRX.js} +3 -3
- package/dist/index.d.ts +110 -44
- package/dist/index.js +520 -232
- package/dist/index.js.map +1 -1
- package/dist/{langfuse-HUAYVPHF.js → langfuse-ACASJZ7O.js} +2 -2
- package/dist/{linear-2MM55KBC.js → linear-IC37LZV7.js} +2 -2
- package/dist/{minio-L3XE6PQS.js → minio-HZ576XFQ.js} +3 -3
- package/dist/mongodb-JVR62OIO.js +7 -0
- package/dist/{notion-UK4GTMT4.js → notion-HKRPQMJS.js} +2 -2
- package/dist/{oci-NURLWPL2.js → oci-ZLVECXTW.js} +3 -3
- package/dist/postgres-P36Z2YN4.js +7 -0
- package/dist/{qingstor-W55D5YFO.js → qingstor-YLP6K3L4.js} +3 -3
- package/dist/{r2-FSZK7IFI.js → r2-RPK25ANI.js} +3 -3
- package/dist/{redis-S6GIPA4Z.js → redis-V5ULXULL.js} +2 -2
- package/dist/{s3-GMPUJ65D.js → s3-4OIOCAAT.js} +2 -2
- package/dist/{scaleway-5VM55Y6D.js → scaleway-CCWCLUHB.js} +3 -3
- package/dist/{seaweedfs-J3EPUEPE.js → seaweedfs-QSWKF2FN.js} +3 -3
- package/dist/{slack-FVBXY7KD.js → slack-YPS7PII3.js} +2 -2
- package/dist/{ssh-GCXETJ3Z.js → ssh-YFP3SMTJ.js} +2 -2
- package/dist/{supabase-HLWNHBBE.js → supabase-6CFTOKGZ.js} +3 -3
- package/dist/{tencent-YDO73XBD.js → tencent-IWZZOSQ4.js} +3 -3
- package/dist/{trello-CQ53BQUL.js → trello-XYKWZD6P.js} +2 -2
- package/dist/{wasabi-SOZKPMRQ.js → wasabi-6Z4DC5S5.js} +3 -3
- package/package.json +7 -5
- package/dist/chunk-5DLOHQJ2.js.map +0 -1
- package/dist/chunk-5HCVKTP3.js.map +0 -1
- package/dist/chunk-5YOCVEUB.js.map +0 -1
- package/dist/chunk-A4Z6DZ22.js.map +0 -1
- package/dist/chunk-A7X4L4JM.js.map +0 -1
- package/dist/chunk-ABTEGAFB.js.map +0 -1
- package/dist/chunk-C6NHEDHY.js.map +0 -1
- package/dist/chunk-CASCUFK2.js.map +0 -1
- package/dist/chunk-DTAY7LPC.js.map +0 -1
- package/dist/chunk-E7RW3SBV.js.map +0 -1
- package/dist/chunk-ERELJ7BS.js.map +0 -1
- package/dist/chunk-HEHERHQ5.js.map +0 -1
- package/dist/chunk-JZQHKDSY.js.map +0 -1
- package/dist/chunk-LYDMMNL2.js.map +0 -1
- package/dist/chunk-MHCMHKM6.js.map +0 -1
- package/dist/chunk-N72CAZEH.js +0 -1990
- package/dist/chunk-N72CAZEH.js.map +0 -1
- package/dist/chunk-NHS7WLEQ.js.map +0 -1
- package/dist/chunk-PBBG7VFT.js +0 -1896
- package/dist/chunk-PBBG7VFT.js.map +0 -1
- package/dist/chunk-RLGWMJD3.js.map +0 -1
- package/dist/chunk-TRTUHCS4.js.map +0 -1
- package/dist/chunk-WSGEIVY3.js.map +0 -1
- package/dist/chunk-XRU5WXZX.js.map +0 -1
- package/dist/chunk-YAVGCQUP.js.map +0 -1
- package/dist/chunk-YPT4JBUY.js.map +0 -1
- package/dist/databricks_volume-HNQ4DJVJ.js +0 -7
- package/dist/mongodb-ZOX4FRHJ.js +0 -7
- package/dist/postgres-JNFMPAO2.js +0 -7
- /package/dist/{aliyun-TMZRUYCG.js.map → aliyun-JMJ3PFYY.js.map} +0 -0
- /package/dist/{backblaze-OHW57DLK.js.map → backblaze-TDFD23QO.js.map} +0 -0
- /package/dist/{box-UXTCAFOZ.js.map → box-GQ2U2R6R.js.map} +0 -0
- /package/dist/{ceph-TNN4I2FT.js.map → ceph-S2VOYO6G.js.map} +0 -0
- /package/dist/{chunk-FXFDBF3P.js.map → chunk-3WIO7NBR.js.map} +0 -0
- /package/dist/{chunk-O7ODGJYL.js.map → chunk-47AVIIOT.js.map} +0 -0
- /package/dist/{chunk-Q6CDMOM6.js.map → chunk-7CW3BMPH.js.map} +0 -0
- /package/dist/{chunk-3T3RMDNX.js.map → chunk-AUHSTJJ3.js.map} +0 -0
- /package/dist/{chunk-PJBQKMCD.js.map → chunk-DM4GSE26.js.map} +0 -0
- /package/dist/{chunk-KTNDT45N.js.map → chunk-FQ33BYFR.js.map} +0 -0
- /package/dist/{chunk-BYTU2YC3.js.map → chunk-HGCRXJGP.js.map} +0 -0
- /package/dist/{chunk-G5BZE7UA.js.map → chunk-HJJMP6IX.js.map} +0 -0
- /package/dist/{chunk-IQVNVTOP.js.map → chunk-I5THIMPP.js.map} +0 -0
- /package/dist/{chunk-C6NHFMIP.js.map → chunk-IK2L4EN3.js.map} +0 -0
- /package/dist/{chunk-AJICZLHT.js.map → chunk-KPULTUOK.js.map} +0 -0
- /package/dist/{chunk-RQYEEA2O.js.map → chunk-N5FSLVKO.js.map} +0 -0
- /package/dist/{chunk-3IJSIVKT.js.map → chunk-QQBJC2FQ.js.map} +0 -0
- /package/dist/{chunk-WL7HS7EM.js.map → chunk-UINQOUZR.js.map} +0 -0
- /package/dist/{chunk-HQ4KWN76.js.map → chunk-X3G37FXT.js.map} +0 -0
- /package/dist/{chunk-OYV2DN66.js.map → chunk-X5HF2OFP.js.map} +0 -0
- /package/dist/{chunk-L6JPBJAS.js.map → chunk-YAHRT6MB.js.map} +0 -0
- /package/dist/{chunk-B6SXRCBO.js.map → chunk-ZGSER5TG.js.map} +0 -0
- /package/dist/{databricks_volume-HNQ4DJVJ.js.map → databricks_volume-7XOUYSTY.js.map} +0 -0
- /package/dist/{digitalocean-6SPR4S7V.js.map → digitalocean-3CQ4CPPZ.js.map} +0 -0
- /package/dist/{discord-SAV2RBJV.js.map → discord-BG7OSRJG.js.map} +0 -0
- /package/dist/{disk-POACMF4G.js.map → disk-XVLBCVKE.js.map} +0 -0
- /package/dist/{dropbox-CQ7MTYX2.js.map → dropbox-74GYLV3R.js.map} +0 -0
- /package/dist/{email-KBQ7CXS7.js.map → email-5IZ7OBQ4.js.map} +0 -0
- /package/dist/{gcs-SMIE4VMT.js.map → gcs-EMEYU2XT.js.map} +0 -0
- /package/dist/{gdocs-X5Y2SIQX.js.map → gdocs-R67TDPON.js.map} +0 -0
- /package/dist/{gdrive-SIQPRIGI.js.map → gdrive-PRN2ALRK.js.map} +0 -0
- /package/dist/{github-KBHWANKQ.js.map → github-DV7E6OFV.js.map} +0 -0
- /package/dist/{github_ci-HPITNK37.js.map → github_ci-Q554V5PA.js.map} +0 -0
- /package/dist/{gmail-DKHAGJNX.js.map → gmail-OLN2LT4O.js.map} +0 -0
- /package/dist/{gsheets-ZSUDIWGK.js.map → gsheets-H4RYMQJ5.js.map} +0 -0
- /package/dist/{gslides-GYXM7IMJ.js.map → gslides-YLCHKJOM.js.map} +0 -0
- /package/dist/{hf_buckets-RIOMV7WG.js.map → hf_buckets-DTKXKKFF.js.map} +0 -0
- /package/dist/{hf_datasets-QF4BQ3OK.js.map → hf_datasets-55C4APKR.js.map} +0 -0
- /package/dist/{hf_models-62GC2HPZ.js.map → hf_models-RO5JR36V.js.map} +0 -0
- /package/dist/{hf_spaces-NVSMUNRM.js.map → hf_spaces-ZVZ3EDRX.js.map} +0 -0
- /package/dist/{langfuse-HUAYVPHF.js.map → langfuse-ACASJZ7O.js.map} +0 -0
- /package/dist/{linear-2MM55KBC.js.map → linear-IC37LZV7.js.map} +0 -0
- /package/dist/{minio-L3XE6PQS.js.map → minio-HZ576XFQ.js.map} +0 -0
- /package/dist/{mongodb-ZOX4FRHJ.js.map → mongodb-JVR62OIO.js.map} +0 -0
- /package/dist/{notion-UK4GTMT4.js.map → notion-HKRPQMJS.js.map} +0 -0
- /package/dist/{oci-NURLWPL2.js.map → oci-ZLVECXTW.js.map} +0 -0
- /package/dist/{postgres-JNFMPAO2.js.map → postgres-P36Z2YN4.js.map} +0 -0
- /package/dist/{qingstor-W55D5YFO.js.map → qingstor-YLP6K3L4.js.map} +0 -0
- /package/dist/{r2-FSZK7IFI.js.map → r2-RPK25ANI.js.map} +0 -0
- /package/dist/{redis-S6GIPA4Z.js.map → redis-V5ULXULL.js.map} +0 -0
- /package/dist/{s3-GMPUJ65D.js.map → s3-4OIOCAAT.js.map} +0 -0
- /package/dist/{scaleway-5VM55Y6D.js.map → scaleway-CCWCLUHB.js.map} +0 -0
- /package/dist/{seaweedfs-J3EPUEPE.js.map → seaweedfs-QSWKF2FN.js.map} +0 -0
- /package/dist/{slack-FVBXY7KD.js.map → slack-YPS7PII3.js.map} +0 -0
- /package/dist/{ssh-GCXETJ3Z.js.map → ssh-YFP3SMTJ.js.map} +0 -0
- /package/dist/{supabase-HLWNHBBE.js.map → supabase-6CFTOKGZ.js.map} +0 -0
- /package/dist/{tencent-YDO73XBD.js.map → tencent-IWZZOSQ4.js.map} +0 -0
- /package/dist/{trello-CQ53BQUL.js.map → trello-XYKWZD6P.js.map} +0 -0
- /package/dist/{wasabi-SOZKPMRQ.js.map → wasabi-6Z4DC5S5.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/disk/disk.ts","../src/commands/builtin/disk/index.ts","../src/core/disk/read.ts","../src/core/disk/utils.ts","../src/core/disk/stat.ts","../src/commands/builtin/disk/awk.ts","../src/core/disk/stream.ts","../src/commands/builtin/disk/base64_cmd.ts","../src/commands/builtin/disk/basename.ts","../src/commands/builtin/disk/cat/cat.ts","../src/commands/builtin/disk/cmp.ts","../src/commands/builtin/disk/column.ts","../src/commands/builtin/disk/comm.ts","../src/commands/builtin/disk/cp.ts","../src/core/disk/copy.ts","../src/core/disk/find.ts","../src/commands/builtin/disk/csplit.ts","../src/core/disk/write.ts","../src/commands/builtin/disk/cut/cut.ts","../src/commands/builtin/disk/diff.ts","../src/commands/builtin/disk/dirname.ts","../src/commands/builtin/disk/du.ts","../src/core/disk/du.ts","../src/commands/builtin/disk/expand.ts","../src/commands/builtin/disk/file/file.ts","../src/commands/builtin/disk/find.ts","../src/commands/builtin/disk/fmt.ts","../src/commands/builtin/disk/fold.ts","../src/commands/builtin/disk/grep/grep.ts","../src/core/disk/readdir.ts","../src/commands/builtin/disk/gunzip.ts","../src/core/disk/unlink.ts","../src/commands/builtin/disk/gzip.ts","../src/commands/builtin/disk/head/head.ts","../src/commands/builtin/disk/iconv.ts","../src/commands/builtin/disk/join.ts","../src/commands/builtin/disk/jq.ts","../src/commands/builtin/disk/ln.ts","../src/core/disk/exists.ts","../src/commands/builtin/disk/look.ts","../src/commands/builtin/disk/ls/ls.ts","../src/commands/builtin/disk/md5.ts","../src/commands/builtin/disk/mkdir.ts","../src/core/disk/mkdir.ts","../src/commands/builtin/disk/mktemp.ts","../src/commands/builtin/disk/mv.ts","../src/core/disk/rename.ts","../src/commands/builtin/disk/nl.ts","../src/commands/builtin/disk/paste.ts","../src/commands/builtin/disk/patch.ts","../src/commands/builtin/disk/readlink.ts","../src/commands/builtin/disk/realpath.ts","../src/commands/builtin/disk/rev.ts","../src/commands/builtin/disk/rg.ts","../src/commands/builtin/disk/rm.ts","../src/core/disk/rmdir.ts","../src/core/disk/rm.ts","../src/commands/builtin/disk/sed.ts","../src/commands/builtin/disk/sha256sum.ts","../src/commands/builtin/disk/shuf.ts","../src/commands/builtin/disk/sort.ts","../src/commands/builtin/disk/split.ts","../src/commands/builtin/disk/stat/stat.ts","../src/commands/builtin/disk/strings.ts","../src/commands/builtin/disk/tac.ts","../src/commands/builtin/disk/tail/tail.ts","../src/commands/builtin/disk/tar.ts","../src/commands/builtin/disk/tee.ts","../src/commands/builtin/disk/touch.ts","../src/commands/builtin/disk/tr.ts","../src/commands/builtin/disk/tree.ts","../src/commands/builtin/disk/tsort.ts","../src/commands/builtin/disk/unexpand.ts","../src/commands/builtin/disk/uniq.ts","../src/commands/builtin/disk/unzip.ts","../src/commands/builtin/disk/wc/wc.ts","../src/commands/builtin/disk/xxd.ts","../src/commands/builtin/disk/zcat.ts","../src/commands/builtin/disk/zgrep.ts","../src/commands/builtin/disk/zip_cmd.ts","../src/core/disk/append.ts","../src/core/disk/create.ts","../src/core/disk/glob.ts","../src/core/disk/truncate.ts","../src/accessor/disk.ts","../src/ops/disk/append.ts","../src/ops/disk/create.ts","../src/ops/disk/mkdir.ts","../src/ops/disk/read.ts","../src/ops/disk/read_feather.ts","../src/ops/disk/read_hdf5.ts","../src/ops/disk/read_parquet.ts","../src/ops/disk/readdir.ts","../src/ops/disk/rename.ts","../src/ops/disk/rmdir.ts","../src/ops/disk/stat.ts","../src/ops/disk/truncate.ts","../src/ops/disk/unlink.ts","../src/ops/disk/write.ts","../src/ops/disk/index.ts","../src/resource/disk/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 { mkdir, readdir, readFile, writeFile } from 'node:fs/promises'\nimport path from 'node:path'\nimport {\n BaseResource,\n type FileStat,\n type FindOptions,\n PathSpec,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n} from '@struktoai/mirage-core'\nimport { DISK_COMMANDS } from '../../commands/builtin/disk/index.ts'\nimport { appendBytes as appendCore } from '../../core/disk/append.ts'\nimport { copy as copyCore } from '../../core/disk/copy.ts'\nimport { create as createCore } from '../../core/disk/create.ts'\nimport { du as duCore, duAll as duAllCore } from '../../core/disk/du.ts'\nimport { exists as existsCore } from '../../core/disk/exists.ts'\nimport { find as findCore, type FindOptions as DiskFindOptions } from '../../core/disk/find.ts'\nimport { resolveGlob as globCore } from '../../core/disk/glob.ts'\nimport { mkdir as mkdirCore } from '../../core/disk/mkdir.ts'\nimport { read as readCoreFn } from '../../core/disk/read.ts'\nimport { readdir as readdirCore } from '../../core/disk/readdir.ts'\nimport { rename as renameCore } from '../../core/disk/rename.ts'\nimport { rmR as rmRCore } from '../../core/disk/rm.ts'\nimport { rmdir as rmdirCore } from '../../core/disk/rmdir.ts'\nimport { stat as statCore } from '../../core/disk/stat.ts'\nimport { stream as streamCore } from '../../core/disk/stream.ts'\nimport { truncate as truncateCore } from '../../core/disk/truncate.ts'\nimport { unlink as unlinkCore } from '../../core/disk/unlink.ts'\nimport { writeBytes as writeCore } from '../../core/disk/write.ts'\nimport { DiskAccessor } from '../../accessor/disk.ts'\nimport { DISK_OPS } from '../../ops/disk/index.ts'\nimport { DISK_PROMPT } from './prompt.ts'\n\nexport interface DiskResourceOptions {\n root: string\n}\n\nexport interface DiskResourceState {\n type: string\n files: Record<string, Uint8Array>\n}\n\nasync function walkFiles(root: string, current: string, out: string[]): Promise<void> {\n const entries = await readdir(current, { withFileTypes: true })\n for (const e of entries) {\n const child = path.join(current, e.name)\n if (e.isDirectory()) {\n await walkFiles(root, child, out)\n } else if (e.isFile()) {\n out.push(child)\n }\n }\n}\n\nexport class DiskResource extends BaseResource implements Resource {\n readonly kind = ResourceName.DISK\n readonly isRemote: boolean = false\n readonly indexTtl: number = 60\n readonly prompt = DISK_PROMPT\n readonly root: string\n readonly accessor: DiskAccessor\n readonly opsMap: Record<string, unknown> = {\n read_bytes: readCoreFn,\n write: writeCore,\n readdir: readdirCore,\n stat: statCore,\n unlink: unlinkCore,\n rmdir: rmdirCore,\n copy: copyCore,\n rename: renameCore,\n mkdir: mkdirCore,\n read_stream: streamCore,\n rm_recursive: rmRCore,\n du_total: duCore,\n du_all: duAllCore,\n create: createCore,\n truncate: truncateCore,\n exists: existsCore,\n find_flat: findCore,\n append: appendCore,\n }\n\n constructor(options: DiskResourceOptions) {\n super()\n this.root = path.resolve(options.root)\n this.accessor = new DiskAccessor(this.root)\n }\n\n async open(): Promise<void> {\n await mkdir(this.root, { recursive: true })\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n ops(): readonly RegisteredOp[] {\n return DISK_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return DISK_COMMANDS\n }\n\n streamPath(p: PathSpec): AsyncIterable<Uint8Array> {\n return streamCore(this.accessor, p)\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return readCoreFn(this.accessor, p)\n }\n\n writeFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return writeCore(this.accessor, p, data)\n }\n\n appendFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return appendCore(this.accessor, p, data)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return readdirCore(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return statCore(this.accessor, p)\n }\n\n exists(p: PathSpec): Promise<boolean> {\n return existsCore(this.accessor, p)\n }\n\n mkdir(p: PathSpec, options?: { recursive?: boolean }): Promise<void> {\n return mkdirCore(this.accessor, p, options?.recursive === true)\n }\n\n rmdir(p: PathSpec): Promise<void> {\n return rmdirCore(this.accessor, p)\n }\n\n unlink(p: PathSpec): Promise<void> {\n return unlinkCore(this.accessor, p)\n }\n\n rename(src: PathSpec, dst: PathSpec): Promise<void> {\n return renameCore(this.accessor, src, dst)\n }\n\n truncate(p: PathSpec, length: number): Promise<void> {\n return truncateCore(this.accessor, p, length)\n }\n\n copy(src: PathSpec, dst: PathSpec): Promise<void> {\n return copyCore(this.accessor, src, dst)\n }\n\n rmR(p: PathSpec): Promise<void> {\n return rmRCore(this.accessor, p)\n }\n\n du(p: PathSpec): Promise<number> {\n return duCore(this.accessor, p)\n }\n\n find(p: PathSpec, options: FindOptions = {}): Promise<string[]> {\n return findCore(this.accessor, p, options as DiskFindOptions)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n try {\n const remote = await statCore(this.accessor, p)\n return remote.modified ?? null\n } catch {\n return null\n }\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective = prefix\n ? paths.map((p) =>\n p.prefix\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return globCore(this.accessor, effective, this.index)\n }\n\n async getState(): Promise<DiskResourceState> {\n await mkdir(this.root, { recursive: true })\n const files: Record<string, Uint8Array> = {}\n const fileList: string[] = []\n await walkFiles(this.root, this.root, fileList)\n for (const full of fileList) {\n const rel = path.relative(this.root, full).split(path.sep).join('/')\n const data = await readFile(full)\n files[rel] = new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n }\n return {\n type: this.kind,\n files,\n }\n }\n\n async loadState(state: DiskResourceState): Promise<void> {\n await mkdir(this.root, { recursive: true })\n for (const [rel, data] of Object.entries(state.files)) {\n const full = path.join(this.root, rel)\n await mkdir(path.dirname(full), { recursive: true })\n await writeFile(full, data)\n }\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { makeFiletypeCommands, ResourceName, type RegisteredCommand } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { read as diskRead } from '../../../core/disk/read.ts'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport { DISK_AWK } from './awk.ts'\nimport { DISK_BASE64 } from './base64_cmd.ts'\nimport { DISK_BASENAME } from './basename.ts'\nimport { DISK_CAT } from './cat/cat.ts'\nimport { DISK_CMP } from './cmp.ts'\nimport { DISK_COLUMN } from './column.ts'\nimport { DISK_COMM } from './comm.ts'\nimport { DISK_CP } from './cp.ts'\nimport { DISK_CSPLIT } from './csplit.ts'\nimport { DISK_CUT } from './cut/cut.ts'\nimport { DISK_DIFF } from './diff.ts'\nimport { DISK_DIRNAME } from './dirname.ts'\nimport { DISK_DU } from './du.ts'\nimport { DISK_EXPAND } from './expand.ts'\nimport { DISK_FILE } from './file/file.ts'\nimport { DISK_FIND } from './find.ts'\nimport { DISK_FMT } from './fmt.ts'\nimport { DISK_FOLD } from './fold.ts'\nimport { DISK_GREP } from './grep/grep.ts'\nimport { DISK_GUNZIP } from './gunzip.ts'\nimport { DISK_GZIP } from './gzip.ts'\nimport { DISK_HEAD } from './head/head.ts'\nimport { DISK_ICONV } from './iconv.ts'\nimport { DISK_JOIN } from './join.ts'\nimport { DISK_JQ } from './jq.ts'\nimport { DISK_LN } from './ln.ts'\nimport { DISK_LOOK } from './look.ts'\nimport { DISK_LS } from './ls/ls.ts'\nimport { DISK_MD5 } from './md5.ts'\nimport { DISK_MKDIR } from './mkdir.ts'\nimport { DISK_MKTEMP } from './mktemp.ts'\nimport { DISK_MV } from './mv.ts'\nimport { DISK_NL } from './nl.ts'\nimport { DISK_PASTE } from './paste.ts'\nimport { DISK_PATCH } from './patch.ts'\nimport { DISK_READLINK } from './readlink.ts'\nimport { DISK_REALPATH } from './realpath.ts'\nimport { DISK_REV } from './rev.ts'\nimport { DISK_RG } from './rg.ts'\nimport { DISK_RM } from './rm.ts'\nimport { DISK_SED } from './sed.ts'\nimport { DISK_SHA256SUM } from './sha256sum.ts'\nimport { DISK_SHUF } from './shuf.ts'\nimport { DISK_SORT } from './sort.ts'\nimport { DISK_SPLIT } from './split.ts'\nimport { DISK_STAT } from './stat/stat.ts'\nimport { DISK_STRINGS } from './strings.ts'\nimport { DISK_TAC } from './tac.ts'\nimport { DISK_TAIL } from './tail/tail.ts'\nimport { DISK_TAR } from './tar.ts'\nimport { DISK_TEE } from './tee.ts'\nimport { DISK_TOUCH } from './touch.ts'\nimport { DISK_TR } from './tr.ts'\nimport { DISK_TREE } from './tree.ts'\nimport { DISK_TSORT } from './tsort.ts'\nimport { DISK_UNEXPAND } from './unexpand.ts'\nimport { DISK_UNIQ } from './uniq.ts'\nimport { DISK_UNZIP } from './unzip.ts'\nimport { DISK_WC } from './wc/wc.ts'\nimport { DISK_XXD } from './xxd.ts'\nimport { DISK_ZCAT } from './zcat.ts'\nimport { DISK_ZGREP } from './zgrep.ts'\nimport { DISK_ZIP } from './zip_cmd.ts'\n\nexport const DISK_COMMANDS: readonly RegisteredCommand[] = [\n ...makeFiletypeCommands<DiskAccessor>({\n resource: ResourceName.DISK,\n readBytes: diskRead,\n statEntry: diskStat,\n }),\n ...DISK_AWK,\n ...DISK_BASE64,\n ...DISK_BASENAME,\n ...DISK_CAT,\n ...DISK_CMP,\n ...DISK_COLUMN,\n ...DISK_COMM,\n ...DISK_CP,\n ...DISK_CSPLIT,\n ...DISK_CUT,\n ...DISK_DIFF,\n ...DISK_DIRNAME,\n ...DISK_DU,\n ...DISK_EXPAND,\n ...DISK_FILE,\n ...DISK_FIND,\n ...DISK_FMT,\n ...DISK_FOLD,\n ...DISK_GREP,\n ...DISK_GUNZIP,\n ...DISK_GZIP,\n ...DISK_HEAD,\n ...DISK_ICONV,\n ...DISK_JOIN,\n ...DISK_JQ,\n ...DISK_LN,\n ...DISK_LOOK,\n ...DISK_LS,\n ...DISK_MD5,\n ...DISK_MKDIR,\n ...DISK_MKTEMP,\n ...DISK_MV,\n ...DISK_NL,\n ...DISK_PASTE,\n ...DISK_PATCH,\n ...DISK_READLINK,\n ...DISK_REALPATH,\n ...DISK_REV,\n ...DISK_RG,\n ...DISK_RM,\n ...DISK_SED,\n ...DISK_SHA256SUM,\n ...DISK_SHUF,\n ...DISK_SORT,\n ...DISK_SPLIT,\n ...DISK_STAT,\n ...DISK_STRINGS,\n ...DISK_TAC,\n ...DISK_TAIL,\n ...DISK_TAR,\n ...DISK_TEE,\n ...DISK_TOUCH,\n ...DISK_TR,\n ...DISK_TREE,\n ...DISK_TSORT,\n ...DISK_UNEXPAND,\n ...DISK_UNIQ,\n ...DISK_UNZIP,\n ...DISK_WC,\n ...DISK_XXD,\n ...DISK_ZCAT,\n ...DISK_ZGREP,\n ...DISK_ZIP,\n]\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { readFile } from 'node:fs/promises'\nimport { enoent, type PathSpec, record, ResourceName } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function read(accessor: DiskAccessor, path: PathSpec): Promise<Uint8Array> {\n const start = performance.now()\n const virtual = path.stripPrefix\n const full = resolveSafe(accessor.root, virtual)\n let data: Buffer\n try {\n data = await readFile(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(path)\n }\n throw err\n }\n record('read', virtual, ResourceName.DISK, data.byteLength, start)\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\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 path from 'node:path'\nimport { lstripSlash } from '@struktoai/mirage-core'\n\nexport { norm, parent, gnuBasename as basename } from '@struktoai/mirage-core'\n\nexport function resolveSafe(root: string, virtual: string): string {\n const relative = lstripSlash(virtual)\n const resolved = path.resolve(root, relative)\n const rootResolved = path.resolve(root)\n if (resolved !== rootResolved && !resolved.startsWith(rootResolved + path.sep)) {\n throw new Error(`path escapes root: ${virtual}`)\n }\n return resolved\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { stat as fsStat } from 'node:fs/promises'\nimport path from 'node:path'\nimport { enoent, FileStat, FileType, guessType, type PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function stat(accessor: DiskAccessor, p: PathSpec): Promise<FileStat> {\n const virtual = p.stripPrefix\n const full = resolveSafe(accessor.root, virtual)\n let st\n try {\n st = await fsStat(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(p)\n }\n throw err\n }\n const modified = st.mtime.toISOString()\n const name = path.basename(full)\n if (st.isDirectory()) {\n return new FileStat({\n name,\n size: null,\n modified,\n type: FileType.DIRECTORY,\n })\n }\n return new FileStat({\n name,\n size: st.size,\n modified,\n fingerprint: modified,\n type: guessType(name),\n })\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, awkGeneric, command, specOf } from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_AWK = command({\n name: 'awk',\n resource: ResourceName.DISK,\n spec: specOf('awk'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n awkGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { createReadStream } from 'node:fs'\nimport { enoent, type PathSpec, recordStream, ResourceName } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function* stream(accessor: DiskAccessor, path: PathSpec): AsyncIterable<Uint8Array> {\n const virtual = path.stripPrefix\n const full = resolveSafe(accessor.root, virtual)\n const rec = recordStream('read', virtual, ResourceName.DISK)\n const rs = createReadStream(full, { highWaterMark: 65536 })\n try {\n for await (const chunk of rs) {\n const buf = chunk as Buffer\n const u8 = new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength)\n if (rec !== null) rec.bytes += u8.byteLength\n yield u8\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(path)\n }\n throw err\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, base64Generic } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_BASE64 = command({\n name: 'base64',\n resource: ResourceName.DISK,\n spec: specOf('base64'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n base64Generic(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, basenameFn } from '@struktoai/mirage-core'\n\nexport const DISK_BASENAME = command({\n name: 'basename',\n resource: ResourceName.DISK,\n spec: specOf('basename'),\n fn: basenameFn,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n ResourceName,\n catGeneric,\n catProvisionGeneric,\n command,\n concatAggregate,\n specOf,\n} from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../../core/disk/stream.ts'\nimport { stat as diskStat } from '../../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_CAT = command({\n name: 'cat',\n resource: ResourceName.DISK,\n spec: specOf('cat'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n catGeneric(\n paths,\n texts,\n opts,\n (p) => diskStat(accessor, p),\n (p) => diskStream(accessor, p),\n ),\n provision: (accessor: DiskAccessor, paths, _texts, _opts) =>\n catProvisionGeneric(paths, (p) => diskStat(accessor, p)),\n aggregate: concatAggregate,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, cmpGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_CMP = command({\n name: 'cmp',\n resource: ResourceName.DISK,\n spec: specOf('cmp'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n cmpGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, columnGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_COLUMN = command({\n name: 'column',\n resource: ResourceName.DISK,\n spec: specOf('column'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n columnGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, commGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_COMM = command({\n name: 'comm',\n resource: ResourceName.DISK,\n spec: specOf('comm'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n commGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n IOResult,\n ResourceName,\n command,\n cpGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type FindOptions,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { copy as coreCopy } from '../../../core/disk/copy.ts'\nimport { find as coreFind } from '../../../core/disk/find.ts'\nimport { stat as coreStat } from '../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nfunction cpCommand(\n accessor: DiskAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length < 2) {\n return Promise.resolve([\n null,\n new IOResult({ exitCode: 1, stderr: new TextEncoder().encode('cp: missing operand\\n') }),\n ])\n }\n const recursive = opts.flags.r === true || opts.flags.R === true || opts.flags.a === true\n return cpGeneric(\n paths,\n (src: PathSpec, target: PathSpec) => coreCopy(accessor, src, target),\n (src: PathSpec, options: FindOptions) => coreFind(accessor, src, options),\n (p: PathSpec) => coreStat(accessor, p),\n recursive,\n opts.flags.n === true,\n opts.flags.v === true,\n opts.index ?? undefined,\n )\n}\n\nexport const DISK_CP = command({\n name: 'cp',\n resource: ResourceName.DISK,\n spec: specOf('cp'),\n fn: cpCommand,\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { copyFile, mkdir } from 'node:fs/promises'\nimport path from 'node:path'\nimport { enoent, type PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function copy(accessor: DiskAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const s = resolveSafe(accessor.root, src.stripPrefix)\n const d = resolveSafe(accessor.root, dst.stripPrefix)\n await mkdir(path.dirname(d), { recursive: true })\n try {\n await copyFile(s, d)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(src)\n }\n throw err\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { readdir, stat } from 'node:fs/promises'\nimport path from 'node:path'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { norm, resolveSafe } from './utils.ts'\nimport { buildTree, type PredNode, keep } from '@struktoai/mirage-core'\n\nexport interface FindOptions {\n name?: string | null\n type?: 'f' | 'd' | null\n minSize?: number | null\n maxSize?: number | null\n maxDepth?: number | null\n minDepth?: number | null\n nameExclude?: string | null\n orNames?: string[] | null\n iname?: string | null\n pathPattern?: string | null\n empty?: boolean | null\n tree?: PredNode | null\n mtimeMin?: number | null\n mtimeMax?: number | null\n}\n\ninterface WalkCtx {\n accessor: DiskAccessor\n base: string\n baseDepth: number\n options: FindOptions\n tree: PredNode\n results: string[]\n}\n\nasync function walk(ctx: WalkCtx, full: string, current: string, depth: number): Promise<void> {\n const opts = ctx.options\n if (opts.maxDepth !== null && opts.maxDepth !== undefined && depth > opts.maxDepth) return\n let entries\n try {\n entries = await readdir(full, { withFileTypes: true })\n } catch {\n return\n }\n for (const e of entries) {\n const kind: 'f' | 'd' = e.isDirectory() ? 'd' : 'f'\n const entryPath = current === '/' ? `/${e.name}` : `${current}/${e.name}`\n const entryName = e.name\n const entrySlashCount = (entryPath.match(/\\//g) ?? []).length\n const entryDepth = entrySlashCount - ctx.baseDepth\n\n let accept = true\n if (opts.maxDepth !== null && opts.maxDepth !== undefined && entryDepth > opts.maxDepth) {\n accept = false\n }\n let isEmpty: boolean | null = null\n if (accept && opts.empty === true) {\n try {\n isEmpty =\n kind === 'f'\n ? (await stat(path.join(full, e.name))).size === 0\n : (await readdir(path.join(full, e.name))).length === 0\n } catch {\n isEmpty = null\n }\n }\n if (\n accept &&\n !keep(\n { key: entryPath, name: entryName, kind, depth: entryDepth, isEmpty },\n ctx.tree,\n opts.minDepth,\n )\n ) {\n accept = false\n }\n\n if (\n accept &&\n kind === 'f' &&\n (opts.minSize !== null ||\n opts.maxSize !== null ||\n opts.mtimeMin !== null ||\n opts.mtimeMax !== null)\n ) {\n try {\n const st = await stat(path.join(full, e.name))\n if (opts.minSize !== null && opts.minSize !== undefined && st.size < opts.minSize)\n accept = false\n if (opts.maxSize !== null && opts.maxSize !== undefined && st.size > opts.maxSize)\n accept = false\n if (accept && (opts.mtimeMin !== undefined || opts.mtimeMax !== undefined)) {\n const mtime = st.mtime.getTime() / 1000\n if (opts.mtimeMin !== null && opts.mtimeMin !== undefined && mtime < opts.mtimeMin)\n accept = false\n if (opts.mtimeMax !== null && opts.mtimeMax !== undefined && mtime > opts.mtimeMax)\n accept = false\n }\n } catch {\n accept = false\n }\n }\n\n if (accept) ctx.results.push(entryPath)\n\n if (kind === 'd') {\n await walk(ctx, path.join(full, e.name), entryPath, depth + 1)\n }\n }\n}\n\nexport async function find(\n accessor: DiskAccessor,\n p: PathSpec,\n options: FindOptions = {},\n): Promise<string[]> {\n const virtual = norm(p.stripPrefix)\n const full = resolveSafe(accessor.root, virtual)\n const baseDepth = virtual === '/' ? 0 : (virtual.match(/\\//g) ?? []).length\n const results: string[] = []\n const tree =\n options.tree ??\n buildTree({\n name: options.name,\n iname: options.iname,\n pathPattern: options.pathPattern,\n type: options.type,\n nameExclude: options.nameExclude,\n orNames: options.orNames,\n empty: options.empty,\n })\n if (virtual !== '/' && (options.maxDepth == null || options.maxDepth >= 0)) {\n let isDir = false\n try {\n isDir = (await stat(full)).isDirectory()\n } catch {\n isDir = false\n }\n let rootEmpty: boolean | null = null\n if (isDir && options.empty === true) {\n try {\n rootEmpty = (await readdir(full)).length === 0\n } catch {\n rootEmpty = null\n }\n }\n if (\n isDir &&\n keep(\n {\n key: virtual,\n name: virtual.slice(virtual.lastIndexOf('/') + 1),\n kind: 'd',\n depth: 0,\n isEmpty: rootEmpty,\n },\n tree,\n options.minDepth,\n )\n ) {\n results.push(virtual)\n }\n }\n await walk({ accessor, base: virtual, baseDepth, options, tree, results }, full, virtual, 0)\n results.sort()\n return results\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, csplitGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_CSPLIT = command({\n name: 'csplit',\n resource: ResourceName.DISK,\n spec: specOf('csplit'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n csplitGeneric(\n paths,\n texts,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { mkdir, writeFile } from 'node:fs/promises'\nimport path from 'node:path'\nimport { type PathSpec, record, ResourceName } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function writeBytes(\n accessor: DiskAccessor,\n p: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const start = performance.now()\n const virtual = p.stripPrefix\n const full = resolveSafe(accessor.root, virtual)\n await mkdir(path.dirname(full), { recursive: true })\n await writeFile(full, data)\n record('write', virtual, ResourceName.DISK, data.byteLength, start)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, cutGeneric, specOf } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../../core/disk/stream.ts'\n\nexport const DISK_CUT = command({\n name: 'cut',\n resource: ResourceName.DISK,\n spec: specOf('cut'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n cutGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, diffGeneric, specOf } from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_DIFF = command({\n name: 'diff',\n resource: ResourceName.DISK,\n spec: specOf('diff'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n diffGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, dirnameFn } from '@struktoai/mirage-core'\n\nexport const DISK_DIRNAME = command({\n name: 'dirname',\n resource: ResourceName.DISK,\n spec: specOf('dirname'),\n fn: dirnameFn,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, duGeneric, specOf } from '@struktoai/mirage-core'\nimport { du as diskDu, duAll as diskDuAll } from '../../../core/disk/du.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_DU = command({\n name: 'du',\n resource: ResourceName.DISK,\n spec: specOf('du'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n duGeneric(\n paths,\n opts,\n (p) => diskDu(accessor, p),\n (p) => diskDuAll(accessor, p),\n ),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { readdir, stat } from 'node:fs/promises'\nimport path from 'node:path'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { norm, resolveSafe } from './utils.ts'\n\nasync function walkSizes(full: string): Promise<number> {\n let total = 0\n let st\n try {\n st = await stat(full)\n } catch {\n return 0\n }\n if (st.isFile()) return st.size\n if (!st.isDirectory()) return 0\n const entries = await readdir(full, { withFileTypes: true })\n for (const e of entries) {\n const child = path.join(full, e.name)\n if (e.isDirectory()) total += await walkSizes(child)\n else if (e.isFile()) {\n try {\n const cst = await stat(child)\n total += cst.size\n } catch {\n // ignore\n }\n }\n }\n return total\n}\n\nasync function walkAll(\n accessor: DiskAccessor,\n full: string,\n entries: [string, number][],\n): Promise<number> {\n let total = 0\n let st\n try {\n st = await stat(full)\n } catch {\n return 0\n }\n if (st.isFile()) {\n const rel = '/' + path.relative(accessor.root, full).split(path.sep).join('/')\n entries.push([rel, st.size])\n return st.size\n }\n if (!st.isDirectory()) return 0\n const children = await readdir(full, { withFileTypes: true })\n for (const e of children) {\n const child = path.join(full, e.name)\n if (e.isDirectory()) {\n total += await walkAll(accessor, child, entries)\n } else if (e.isFile()) {\n try {\n const cst = await stat(child)\n const rel = '/' + path.relative(accessor.root, child).split(path.sep).join('/')\n entries.push([rel, cst.size])\n total += cst.size\n } catch {\n // ignore\n }\n }\n }\n return total\n}\n\nexport async function du(accessor: DiskAccessor, p: PathSpec): Promise<number> {\n const virtual = p.stripPrefix\n const full = resolveSafe(accessor.root, virtual)\n return walkSizes(full)\n}\n\nexport async function duAll(\n accessor: DiskAccessor,\n p: PathSpec,\n): Promise<[entries: [string, number][], total: number]> {\n const virtual = norm(p.stripPrefix)\n const full = resolveSafe(accessor.root, virtual)\n const entries: [string, number][] = []\n const total = await walkAll(accessor, full, entries)\n entries.sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0))\n return [entries, total]\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, expandGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_EXPAND = command({\n name: 'expand',\n resource: ResourceName.DISK,\n spec: specOf('expand'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n expandGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, fileGeneric, specOf } from '@struktoai/mirage-core'\nimport { stat as diskStat } from '../../../../core/disk/stat.ts'\nimport { read as diskRead } from '../../../../core/disk/read.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_FILE = command({\n name: 'file',\n resource: ResourceName.DISK,\n spec: specOf('file'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n fileGeneric(\n paths,\n opts,\n (p) => diskStat(accessor, p),\n (p) => diskRead(accessor, p),\n ),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, findGeneric, specOf } from '@struktoai/mirage-core'\nimport { find as diskFind } from '../../../core/disk/find.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_FIND = command({\n name: 'find',\n resource: ResourceName.DISK,\n spec: specOf('find'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n findGeneric(paths, texts, opts, (root, options) => diskFind(accessor, root, options)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n ResourceName,\n command,\n fmtGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nasync function fmtCommand(\n accessor: DiskAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n return fmtGeneric(paths, opts, (p) => diskStream(accessor, p))\n}\n\nexport const DISK_FMT = command({\n name: 'fmt',\n resource: ResourceName.DISK,\n spec: specOf('fmt'),\n fn: fmtCommand,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, foldGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_FOLD = command({\n name: 'fold',\n resource: ResourceName.DISK,\n spec: specOf('fold'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n foldGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, grepGeneric, prefixAggregate, specOf } from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../../core/disk/stream.ts'\nimport { stat as diskStat } from '../../../../core/disk/stat.ts'\nimport { readdir as diskReaddir } from '../../../../core/disk/readdir.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_GREP = command({\n name: 'grep',\n resource: ResourceName.DISK,\n spec: specOf('grep'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n grepGeneric(\n 'grep',\n paths,\n texts,\n opts,\n (p) => diskStat(accessor, p),\n (p) => diskReaddir(accessor, p),\n (p) => diskStream(accessor, p),\n ),\n aggregate: prefixAggregate,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { readdir as fsReaddir } from 'node:fs/promises'\nimport {\n enotdir,\n IndexEntry,\n type IndexCacheStore,\n type PathSpec,\n ResourceType,\n} from '@struktoai/mirage-core'\nimport { norm, resolveSafe } from './utils.ts'\n\nexport async function readdir(\n accessor: DiskAccessor,\n path: PathSpec,\n index?: IndexCacheStore,\n): Promise<string[]> {\n const virtual = path.pattern !== null ? path.directory : path.stripPrefix\n const mountPrefix = path.prefix\n const virtualKey = mountPrefix + virtual\n if (index !== undefined) {\n const cached = await index.listDir(virtualKey)\n if (cached.entries !== undefined && cached.entries !== null) {\n return cached.entries\n }\n }\n const full = resolveSafe(accessor.root, virtual)\n let entries: string[]\n try {\n entries = await fsReaddir(full)\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code\n if (code === 'ENOTDIR') throw enotdir(path)\n if (code === 'ENOENT') throw enotdir(path)\n throw err\n }\n const base = norm(virtual)\n const dirPrefix = base === '/' ? '/' : `${base}/`\n const sorted = [...entries].sort()\n const virtualEntries = sorted.map((e) => `${mountPrefix}${dirPrefix}${e}`)\n if (index !== undefined) {\n const indexEntries: [string, IndexEntry][] = sorted.map((name) => [\n name,\n new IndexEntry({\n id: `${dirPrefix}${name}`,\n name,\n resourceType: ResourceType.FILE,\n }),\n ])\n await index.setDir(virtualKey, indexEntries)\n }\n return virtualEntries\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, gunzipGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\nimport { unlink as diskUnlink } from '../../../core/disk/unlink.ts'\n\nexport const DISK_GUNZIP = command({\n name: 'gunzip',\n resource: ResourceName.DISK,\n spec: specOf('gunzip'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n gunzipGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n (p) => diskUnlink(accessor, p),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { unlink as fsUnlink } from 'node:fs/promises'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function unlink(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n const full = resolveSafe(accessor.root, path.stripPrefix)\n try {\n await fsUnlink(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') return\n throw err\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, gzipGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\nimport { unlink as diskUnlink } from '../../../core/disk/unlink.ts'\n\nexport const DISK_GZIP = command({\n name: 'gzip',\n resource: ResourceName.DISK,\n spec: specOf('gzip'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n gzipGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n (p) => diskUnlink(accessor, p),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n ResourceName,\n command,\n headGeneric,\n headProvisionGeneric,\n headerAggregate,\n specOf,\n} from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../../core/disk/stream.ts'\nimport { stat as diskStat } from '../../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_HEAD = command({\n name: 'head',\n resource: ResourceName.DISK,\n spec: specOf('head'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n headGeneric(\n paths,\n texts,\n opts,\n (p) => diskStat(accessor, p),\n (p) => diskStream(accessor, p),\n ),\n provision: (accessor: DiskAccessor, paths, texts, opts) =>\n headProvisionGeneric(paths, texts, opts, (p) => diskStat(accessor, p)),\n aggregate: headerAggregate,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, iconvGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_ICONV = command({\n name: 'iconv',\n resource: ResourceName.DISK,\n spec: specOf('iconv'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n iconvGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, joinGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_JOIN = command({\n name: 'join',\n resource: ResourceName.DISK,\n spec: specOf('join'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n joinGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n ResourceName,\n command,\n jqGeneric,\n jqProvisionGeneric,\n specOf,\n} from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_JQ = command({\n name: 'jq',\n resource: ResourceName.DISK,\n spec: specOf('jq'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n jqGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n provision: (accessor: DiskAccessor, paths, texts, _opts) =>\n jqProvisionGeneric(paths, texts, (p) => diskStat(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n IOResult,\n ResourceName,\n command,\n materialize,\n specOf,\n type ByteSource,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\nimport { exists as diskExists } from '../../../core/disk/exists.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nconst ENC = new TextEncoder()\n\nasync function lnCommand(\n accessor: DiskAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length < 2) {\n return [\n null,\n new IOResult({ exitCode: 1, stderr: ENC.encode('ln: usage: ln [-s] [-f] source dest\\n') }),\n ]\n }\n const source = paths[0]\n const dest = paths[1]\n if (source === undefined || dest === undefined) return [null, new IOResult()]\n if (opts.flags.n === true && (await diskExists(accessor, dest))) {\n return [null, new IOResult()]\n }\n const data = await materialize(diskStream(accessor, source))\n await diskWrite(accessor, dest, data)\n const out: ByteSource | null =\n opts.flags.v === true ? ENC.encode(`'${source.original}' -> '${dest.original}'\\n`) : null\n return [out, new IOResult({ writes: { [dest.stripPrefix]: data } })]\n}\n\nexport const DISK_LN = command({\n name: 'ln',\n resource: ResourceName.DISK,\n spec: specOf('ln'),\n fn: lnCommand,\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { access } from 'node:fs/promises'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function exists(accessor: DiskAccessor, path: PathSpec): Promise<boolean> {\n const full = resolveSafe(accessor.root, path.stripPrefix)\n try {\n await access(full)\n return true\n } catch {\n return false\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, lookGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_LOOK = command({\n name: 'look',\n resource: ResourceName.DISK,\n spec: specOf('look'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n lookGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, lsGeneric, specOf } from '@struktoai/mirage-core'\nimport { stat as diskStat } from '../../../../core/disk/stat.ts'\nimport { readdir as diskReaddir } from '../../../../core/disk/readdir.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_LS = command({\n name: 'ls',\n resource: ResourceName.DISK,\n spec: specOf('ls'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n lsGeneric(\n paths,\n opts,\n (p) => diskReaddir(accessor, p),\n (p) => diskStat(accessor, p),\n ),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, md5Generic } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_MD5 = command({\n name: 'md5',\n resource: ResourceName.DISK,\n spec: specOf('md5'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n md5Generic(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n IOResult,\n ResourceName,\n command,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { mkdir as diskMkdir } from '../../../core/disk/mkdir.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nasync function mkdirCommand(\n accessor: DiskAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const parents = opts.flags.p === true\n const verbose = opts.flags.v === true\n if (paths.length === 0) {\n return [\n null,\n new IOResult({\n exitCode: 1,\n stderr: new TextEncoder().encode('mkdir: missing operand\\n'),\n }),\n ]\n }\n const lines: string[] = []\n for (const p of paths) {\n await diskMkdir(accessor, p, parents)\n if (verbose) lines.push(`mkdir: created directory '${p.original}'`)\n }\n const out = lines.length > 0 ? new TextEncoder().encode(lines.join('\\n') + '\\n') : null\n return [out, new IOResult()]\n}\n\nexport const DISK_MKDIR = command({\n name: 'mkdir',\n resource: ResourceName.DISK,\n spec: specOf('mkdir'),\n fn: mkdirCommand,\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { mkdir as fsMkdir } from 'node:fs/promises'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function mkdir(\n accessor: DiskAccessor,\n path: PathSpec,\n parents = false,\n): Promise<void> {\n const full = resolveSafe(accessor.root, path.stripPrefix)\n if (parents) {\n await fsMkdir(full, { recursive: true })\n return\n }\n try {\n await fsMkdir(full)\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code\n if (code === 'EEXIST') return\n if (code === 'ENOENT') {\n throw new Error(`parent directory does not exist: ${path.stripPrefix}`)\n }\n throw err\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, mktempGeneric, specOf } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { mkdir as diskMkdir } from '../../../core/disk/mkdir.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_MKTEMP = command({\n name: 'mktemp',\n resource: ResourceName.DISK,\n spec: specOf('mktemp'),\n fn: (accessor: DiskAccessor, _paths, texts, opts) =>\n mktempGeneric(\n texts,\n opts,\n (p, parents) => diskMkdir(accessor, p, parents),\n (p, d) => diskWrite(accessor, p, d),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n IOResult,\n ResourceName,\n command,\n mvGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { rename as coreRename } from '../../../core/disk/rename.ts'\nimport { stat as coreStat } from '../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nfunction mvCommand(\n accessor: DiskAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length < 2) {\n return Promise.resolve([\n null,\n new IOResult({ exitCode: 1, stderr: new TextEncoder().encode('mv: missing operand\\n') }),\n ])\n }\n return mvGeneric(\n paths,\n (src: PathSpec, target: PathSpec) => coreRename(accessor, src, target),\n (p: PathSpec) => coreStat(accessor, p),\n opts.flags.n === true,\n opts.flags.v === true,\n opts.index ?? undefined,\n )\n}\n\nexport const DISK_MV = command({\n name: 'mv',\n resource: ResourceName.DISK,\n spec: specOf('mv'),\n fn: mvCommand,\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { rename as fsRename } from 'node:fs/promises'\nimport { enoent, type PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function rename(accessor: DiskAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const s = resolveSafe(accessor.root, src.stripPrefix)\n const d = resolveSafe(accessor.root, dst.stripPrefix)\n try {\n await fsRename(s, d)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n throw enoent(src)\n }\n throw err\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, nlGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_NL = command({\n name: 'nl',\n resource: ResourceName.DISK,\n spec: specOf('nl'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n nlGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, pasteGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_PASTE = command({\n name: 'paste',\n resource: ResourceName.DISK,\n spec: specOf('paste'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n pasteGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, patchGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_PATCH = command({\n name: 'patch',\n resource: ResourceName.DISK,\n spec: specOf('patch'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n patchGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n ResourceName,\n command,\n readlinkGeneric,\n specOf,\n type Accessor,\n} from '@struktoai/mirage-core'\n\nexport const DISK_READLINK = command({\n name: 'readlink',\n resource: ResourceName.DISK,\n spec: specOf('readlink'),\n fn: (_accessor: Accessor, paths, texts, opts) => readlinkGeneric(paths, texts, opts),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, realpathGeneric, specOf } from '@struktoai/mirage-core'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_REALPATH = command({\n name: 'realpath',\n resource: ResourceName.DISK,\n spec: specOf('realpath'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n realpathGeneric(paths, texts, opts, (p) => diskStat(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, revGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_REV = command({\n name: 'rev',\n resource: ResourceName.DISK,\n spec: specOf('rev'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n revGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, rgGeneric, specOf } from '@struktoai/mirage-core'\nimport { readdir as diskReaddir } from '../../../core/disk/readdir.ts'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_RG = command({\n name: 'rg',\n resource: ResourceName.DISK,\n spec: specOf('rg'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n rgGeneric(\n paths,\n texts,\n opts,\n (p) => diskStat(accessor, p),\n (p) => diskReaddir(accessor, p),\n (p) => diskStream(accessor, p),\n ),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n FileType,\n IOResult,\n ResourceName,\n command,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n formatRecords,\n} from '@struktoai/mirage-core'\nimport { rmdir as diskRmdir } from '../../../core/disk/rmdir.ts'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport { unlink as diskUnlink } from '../../../core/disk/unlink.ts'\nimport { rmR as diskRmR } from '../../../core/disk/rm.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nasync function rmCommand(\n accessor: DiskAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length === 0) {\n return [\n null,\n new IOResult({\n exitCode: 1,\n stderr: new TextEncoder().encode('rm: missing operand\\n'),\n }),\n ]\n }\n const recursive = opts.flags.r === true || opts.flags.R === true\n const force = opts.flags.f === true\n const verbose = opts.flags.v === true\n const lines: string[] = []\n for (const p of paths) {\n let isDir = false\n try {\n const st = await diskStat(accessor, p)\n isDir = st.type === FileType.DIRECTORY\n } catch {\n if (force) continue\n throw new Error(`rm: cannot remove '${p.original}': No such file or directory`)\n }\n if (isDir) {\n if (recursive) {\n await diskRmR(accessor, p)\n } else {\n await diskRmdir(accessor, p)\n }\n } else {\n await diskUnlink(accessor, p)\n }\n if (verbose) lines.push(`removed '${p.original}'`)\n }\n const out = lines.length > 0 ? formatRecords(lines) : null\n return [out, new IOResult()]\n}\n\nexport const DISK_RM = command({\n name: 'rm',\n resource: ResourceName.DISK,\n spec: specOf('rm'),\n fn: rmCommand,\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { rmdir as fsRmdir } from 'node:fs/promises'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function rmdir(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n const full = resolveSafe(accessor.root, path.stripPrefix)\n try {\n await fsRmdir(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') return\n throw err\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { rm } from 'node:fs/promises'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function rmR(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n const full = resolveSafe(accessor.root, path.stripPrefix)\n await rm(full, { recursive: true, force: true })\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, sedGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_SED = command({\n name: 'sed',\n resource: ResourceName.DISK,\n spec: specOf('sed'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n sedGeneric(\n paths,\n texts,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n ),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, sha256sumGeneric, specOf } from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_SHA256SUM = command({\n name: 'sha256sum',\n resource: ResourceName.DISK,\n spec: specOf('sha256sum'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n sha256sumGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, shufGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_SHUF = command({\n name: 'shuf',\n resource: ResourceName.DISK,\n spec: specOf('shuf'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n shufGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, sortGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_SORT = command({\n name: 'sort',\n resource: ResourceName.DISK,\n spec: specOf('sort'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n sortGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, splitGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_SPLIT = command({\n name: 'split',\n resource: ResourceName.DISK,\n spec: specOf('split'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n splitGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n ResourceName,\n command,\n specOf,\n statGeneric,\n statProvisionGeneric,\n} from '@struktoai/mirage-core'\nimport { stat as diskStat } from '../../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_STAT = command({\n name: 'stat',\n resource: ResourceName.DISK,\n spec: specOf('stat'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n statGeneric(paths, opts, (p) => diskStat(accessor, p)),\n provision: statProvisionGeneric,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, stringsGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_STRINGS = command({\n name: 'strings',\n resource: ResourceName.DISK,\n spec: specOf('strings'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n stringsGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, tacGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_TAC = command({\n name: 'tac',\n resource: ResourceName.DISK,\n spec: specOf('tac'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n tacGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, headerAggregate, specOf, tailGeneric } from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../../core/disk/stream.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_TAIL = command({\n name: 'tail',\n resource: ResourceName.DISK,\n spec: specOf('tail'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n tailGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n aggregate: headerAggregate,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, tarGeneric } from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\nimport { mkdir as diskMkdir } from '../../../core/disk/mkdir.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_TAR = command({\n name: 'tar',\n resource: ResourceName.DISK,\n spec: specOf('tar'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n tarGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, data) => diskWrite(accessor, p, data),\n (p) => diskMkdir(accessor, p),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, teeGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_TEE = command({\n name: 'tee',\n resource: ResourceName.DISK,\n spec: specOf('tee'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n teeGeneric(\n paths,\n texts,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n IOResult,\n ResourceName,\n command,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\nimport { exists as diskExists } from '../../../core/disk/exists.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nconst ENC = new TextEncoder()\n\nasync function touchCommand(\n accessor: DiskAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length === 0) {\n return [null, new IOResult({ exitCode: 1, stderr: ENC.encode('touch: missing operand\\n') })]\n }\n const createOnly = opts.flags.c === true\n for (const p of paths) {\n if (createOnly) continue\n if (!(await diskExists(accessor, p))) {\n await diskWrite(accessor, p, new Uint8Array(0))\n }\n }\n return [null, new IOResult()]\n}\n\nexport const DISK_TOUCH = command({\n name: 'touch',\n resource: ResourceName.DISK,\n spec: specOf('touch'),\n fn: touchCommand,\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, trGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_TR = command({\n name: 'tr',\n resource: ResourceName.DISK,\n spec: specOf('tr'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n trGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, treeGeneric } from '@struktoai/mirage-core'\nimport { readdir as diskReaddir } from '../../../core/disk/readdir.ts'\nimport { stat as diskStat } from '../../../core/disk/stat.ts'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\n\nexport const DISK_TREE = command({\n name: 'tree',\n resource: ResourceName.DISK,\n spec: specOf('tree'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n treeGeneric(\n paths,\n opts,\n (p) => diskReaddir(accessor, p),\n (p) => diskStat(accessor, p),\n ),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, tsortGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_TSORT = command({\n name: 'tsort',\n resource: ResourceName.DISK,\n spec: specOf('tsort'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n tsortGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, unexpandGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_UNEXPAND = command({\n name: 'unexpand',\n resource: ResourceName.DISK,\n spec: specOf('unexpand'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n unexpandGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, uniqGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_UNIQ = command({\n name: 'uniq',\n resource: ResourceName.DISK,\n spec: specOf('uniq'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n uniqGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, unzipGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\nimport { mkdir as diskMkdir } from '../../../core/disk/mkdir.ts'\n\nexport const DISK_UNZIP = command({\n name: 'unzip',\n resource: ResourceName.DISK,\n spec: specOf('unzip'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n unzipGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n (p, parents) => diskMkdir(accessor, p, parents),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, wcAggregate, wcGeneric } from '@struktoai/mirage-core'\nimport { stream as diskStream } from '../../../../core/disk/stream.ts'\nimport type { DiskAccessor } from '../../../../accessor/disk.ts'\n\nexport const DISK_WC = command({\n name: 'wc',\n resource: ResourceName.DISK,\n spec: specOf('wc'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n wcGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n aggregate: wcAggregate,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, xxdGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_XXD = command({\n name: 'xxd',\n resource: ResourceName.DISK,\n spec: specOf('xxd'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n xxdGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, zcatGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_ZCAT = command({\n name: 'zcat',\n resource: ResourceName.DISK,\n spec: specOf('zcat'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n zcatGeneric(paths, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, zgrepGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\n\nexport const DISK_ZGREP = command({\n name: 'zgrep',\n resource: ResourceName.DISK,\n spec: specOf('zgrep'),\n fn: (accessor: DiskAccessor, paths, texts, opts) =>\n zgrepGeneric(paths, texts, opts, (p) => diskStream(accessor, p)),\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, zipGeneric } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../../accessor/disk.ts'\nimport { stream as diskStream } from '../../../core/disk/stream.ts'\nimport { writeBytes as diskWrite } from '../../../core/disk/write.ts'\n\nexport const DISK_ZIP = command({\n name: 'zip',\n resource: ResourceName.DISK,\n spec: specOf('zip'),\n fn: (accessor: DiskAccessor, paths, _texts, opts) =>\n zipGeneric(\n paths,\n opts,\n (p) => diskStream(accessor, p),\n (p, d) => diskWrite(accessor, p, d),\n ),\n write: true,\n})\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { appendFile, mkdir } from 'node:fs/promises'\nimport path from 'node:path'\nimport { type PathSpec, record, ResourceName } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function appendBytes(\n accessor: DiskAccessor,\n p: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const start = performance.now()\n const virtual = p.stripPrefix\n const full = resolveSafe(accessor.root, virtual)\n await mkdir(path.dirname(full), { recursive: true })\n await appendFile(full, data)\n record('append', virtual, ResourceName.DISK, data.byteLength, start)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { writeBytes } from './write.ts'\n\nexport function create(accessor: DiskAccessor, path: PathSpec): Promise<void> {\n return writeBytes(accessor, path, new Uint8Array())\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { type IndexCacheStore, PathSpec } from '@struktoai/mirage-core'\nimport { SCOPE_ERROR } from './constants.ts'\nimport { readdir } from './readdir.ts'\nimport { fnmatch } from '@struktoai/mirage-core'\nimport { gnuBasename } from '@struktoai/mirage-core'\n\nexport async function resolveGlob(\n accessor: DiskAccessor,\n paths: readonly PathSpec[],\n index?: IndexCacheStore,\n): Promise<PathSpec[]> {\n const result: PathSpec[] = []\n for (const p of paths) {\n if (p.resolved) {\n result.push(p)\n } else if (p.pattern !== null) {\n const dirSpec = new PathSpec({\n original: p.directory,\n directory: p.directory,\n resolved: true,\n prefix: p.prefix,\n })\n const entries = await readdir(accessor, dirSpec, index)\n const matched: PathSpec[] = []\n for (const e of entries) {\n if (fnmatch(gnuBasename(e), p.pattern)) {\n matched.push(\n new PathSpec({\n original: e,\n directory: p.directory,\n resolved: true,\n prefix: p.prefix,\n }),\n )\n }\n }\n if (matched.length > SCOPE_ERROR) matched.length = SCOPE_ERROR\n result.push(...matched)\n } else {\n result.push(p)\n }\n }\n return result\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { readFile, writeFile } from 'node:fs/promises'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { resolveSafe } from './utils.ts'\n\nexport async function truncate(\n accessor: DiskAccessor,\n path: PathSpec,\n length: number,\n): Promise<void> {\n const full = resolveSafe(accessor.root, path.stripPrefix)\n let data: Buffer\n try {\n data = await readFile(full)\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n data = Buffer.alloc(0)\n } else {\n throw err\n }\n }\n const out = new Uint8Array(length)\n out.set(data.subarray(0, Math.min(data.byteLength, length)))\n await writeFile(full, out)\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { Accessor } from '@struktoai/mirage-core'\n\nexport class DiskAccessor extends Accessor {\n readonly root: string\n\n constructor(root: string) {\n super()\n this.root = root\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { appendBytes as coreAppend } from '../../core/disk/append.ts'\n\nexport const appendOp: RegisteredOp = {\n name: 'append',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec, args: readonly unknown[]) => {\n const data = args[0]\n if (!(data instanceof Uint8Array)) {\n throw new TypeError('append op requires a Uint8Array as the first arg')\n }\n return coreAppend(accessor, path, data)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { create as coreCreate } from '../../core/disk/create.ts'\n\nexport const createOp: RegisteredOp = {\n name: 'create',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec) => {\n return coreCreate(accessor, path)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { mkdir as coreMkdir } from '../../core/disk/mkdir.ts'\n\nexport const mkdirOp: RegisteredOp = {\n name: 'mkdir',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec) => {\n return coreMkdir(accessor, path, true)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { read as coreRead } from '../../core/disk/read.ts'\n\nexport const readOp: RegisteredOp = {\n name: 'read',\n resource: ResourceName.DISK,\n filetype: null,\n write: false,\n fn: (accessor: DiskAccessor, path: PathSpec) => {\n return coreRead(accessor, path)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { featherCat, type PathSpec, type RegisteredOp, ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { read as coreRead } from '../../core/disk/read.ts'\n\nexport const readFeatherOp: RegisteredOp = {\n name: 'read',\n resource: ResourceName.DISK,\n filetype: '.feather',\n write: false,\n fn: async (accessor: DiskAccessor, path: PathSpec) => {\n const raw = await coreRead(accessor, path)\n return featherCat(raw)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { hdf5Cat, type PathSpec, type RegisteredOp, ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { read as coreRead } from '../../core/disk/read.ts'\n\nexport const readHdf5Op: RegisteredOp = {\n name: 'read',\n resource: ResourceName.DISK,\n filetype: '.hdf5',\n write: false,\n fn: async (accessor: DiskAccessor, path: PathSpec) => {\n const raw = await coreRead(accessor, path)\n return hdf5Cat(raw)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { parquetCat, type PathSpec, type RegisteredOp, ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { read as coreRead } from '../../core/disk/read.ts'\n\nexport const readParquetOp: RegisteredOp = {\n name: 'read',\n resource: ResourceName.DISK,\n filetype: '.parquet',\n write: false,\n fn: async (accessor: DiskAccessor, path: PathSpec) => {\n const raw = await coreRead(accessor, path)\n return parquetCat(raw)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { readdir as coreReaddir } from '../../core/disk/readdir.ts'\n\nexport const readdirOp: RegisteredOp = {\n name: 'readdir',\n resource: ResourceName.DISK,\n filetype: null,\n write: false,\n fn: (accessor: DiskAccessor, path: PathSpec) => {\n return coreReaddir(accessor, path)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { rename as coreRename } from '../../core/disk/rename.ts'\n\nexport const renameOp: RegisteredOp = {\n name: 'rename',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec, args: readonly unknown[]) => {\n const dst = args[0]\n if (dst === undefined || dst === null || typeof dst !== 'object' || !('original' in dst)) {\n throw new TypeError('rename op requires a PathSpec destination as the first arg')\n }\n return coreRename(accessor, path, dst as PathSpec)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { rmdir as coreRmdir } from '../../core/disk/rmdir.ts'\n\nexport const rmdirOp: RegisteredOp = {\n name: 'rmdir',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec) => {\n return coreRmdir(accessor, path)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { stat as coreStat } from '../../core/disk/stat.ts'\n\nexport const statOp: RegisteredOp = {\n name: 'stat',\n resource: ResourceName.DISK,\n filetype: null,\n write: false,\n fn: (accessor: DiskAccessor, path: PathSpec) => {\n return coreStat(accessor, path)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { truncate as coreTruncate } from '../../core/disk/truncate.ts'\n\nexport const truncateOp: RegisteredOp = {\n name: 'truncate',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec, args: readonly unknown[]) => {\n const length = args[0]\n if (typeof length !== 'number') {\n throw new TypeError('truncate op requires a number length as the first arg')\n }\n return coreTruncate(accessor, path, length)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { unlink as coreUnlink } from '../../core/disk/unlink.ts'\n\nexport const unlinkOp: RegisteredOp = {\n name: 'unlink',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec) => {\n return coreUnlink(accessor, path)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { extractWriteData, type PathSpec, type RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { DiskAccessor } from '../../accessor/disk.ts'\nimport { writeBytes } from '../../core/disk/write.ts'\n\nexport const writeOp: RegisteredOp = {\n name: 'write',\n resource: ResourceName.DISK,\n filetype: null,\n write: true,\n fn: (accessor: DiskAccessor, path: PathSpec, args: readonly unknown[]) => {\n const data = extractWriteData(args)\n return writeBytes(accessor, path, data)\n },\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { RegisteredOp } from '@struktoai/mirage-core'\nimport { appendOp } from './append.ts'\nimport { createOp } from './create.ts'\nimport { mkdirOp } from './mkdir.ts'\nimport { readOp } from './read.ts'\nimport { readFeatherOp } from './read_feather.ts'\nimport { readHdf5Op } from './read_hdf5.ts'\nimport { readParquetOp } from './read_parquet.ts'\nimport { readdirOp } from './readdir.ts'\nimport { renameOp } from './rename.ts'\nimport { rmdirOp } from './rmdir.ts'\nimport { statOp } from './stat.ts'\nimport { truncateOp } from './truncate.ts'\nimport { unlinkOp } from './unlink.ts'\nimport { writeOp } from './write.ts'\n\nexport const DISK_OPS: readonly RegisteredOp[] = [\n appendOp,\n createOp,\n mkdirOp,\n readOp,\n readFeatherOp,\n readHdf5Op,\n readParquetOp,\n readdirOp,\n renameOp,\n rmdirOp,\n statOp,\n truncateOp,\n unlinkOp,\n writeOp,\n]\n\nexport {\n appendOp,\n createOp,\n mkdirOp,\n readOp,\n readFeatherOp,\n readHdf5Op,\n readParquetOp,\n readdirOp,\n renameOp,\n rmdirOp,\n statOp,\n truncateOp,\n unlinkOp,\n writeOp,\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const DISK_PROMPT = `{prefix}\n Local disk filesystem. Mirrors the configured root directory.\n Standard commands: ls, cat, head, tail, grep, wc, find, tree, mkdir, touch, cp, mv, rm, tee.`\n"],"mappings":";;;;;AAcA,SAAS,SAAAA,QAAO,WAAAC,UAAS,YAAAC,WAAU,aAAAC,kBAAiB;AACpD,OAAOC,WAAU;AACjB;AAAA,EACE;AAAA,EAGA,YAAAC;AAAA,EAIA,gBAAAC;AAAA,OACK;;;ACXP,SAAS,sBAAsB,gBAAAC,sBAA4C;;;ACC3E,SAAS,gBAAgB;AACzB,SAAS,QAAuB,QAAQ,oBAAoB;;;ACF5D,OAAO,UAAU;AACjB,SAAS,mBAAmB;AAE5B,SAAS,MAAM,QAAuB,mBAAgB;AAE/C,SAAS,YAAY,MAAc,SAAyB;AACjE,QAAM,WAAW,YAAY,OAAO;AACpC,QAAM,WAAW,KAAK,QAAQ,MAAM,QAAQ;AAC5C,QAAM,eAAe,KAAK,QAAQ,IAAI;AACtC,MAAI,aAAa,gBAAgB,CAAC,SAAS,WAAW,eAAe,KAAK,GAAG,GAAG;AAC9E,UAAM,IAAI,MAAM,sBAAsB,OAA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Spec","ResourceName","ResourceName","path","path","enoent","enoent","path","ResourceName","enoent","ResourceName","path","ResourceName","enoent","ResourceName","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","path","enoent","path","enoent","stat","path","stat","path","command","ResourceName","specOf","ResourceName","command","specOf","mkdir","path","record","ResourceName","mkdir","path","record","ResourceName","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","ResourceName","command","specOf","readdir","stat","path","stat","readdir","path","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","readdir","path","command","ResourceName","specOf","readdir","ResourceName","command","specOf","path","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","path","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","readdir","ResourceName","command","specOf","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","mkdir","path","IOResult","mkdir","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","mkdir","IOResult","ResourceName","command","specOf","enoent","enoent","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","readdir","FileType","IOResult","ResourceName","command","specOf","path","path","IOResult","FileType","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","headerAggregate","specOf","command","ResourceName","specOf","headerAggregate","ResourceName","command","specOf","command","ResourceName","specOf","mkdir","ResourceName","command","specOf","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","ENC","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","readdir","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","mkdir","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","mkdir","path","record","ResourceName","mkdir","path","record","ResourceName","path","gnuBasename","readdir","readFile","writeFile","path","readFile","writeFile","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","mkdir","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","readdir","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","ResourceName","ResourceName","path","readdir","path","ResourceName","mkdir","PathSpec","readFile","writeFile"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/mongodb/mongodb.ts","../src/resource/mongodb/store.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n detectMongoScope,\n type FileStat,\n MONGODB_COMMANDS,\n MONGODB_OPS,\n MONGODB_PROMPT,\n MongoDBAccessor,\n type MongoDBConfig,\n type MongoDBConfigResolved,\n mongoRead,\n mongoReaddir,\n mongoStat,\n PathSpec,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n resolveMongoGlob,\n ResourceName,\n resolveMongoDBConfig,\n} from '@struktoai/mirage-core'\nimport { MongoDBStore } from './store.ts'\n\nvoid detectMongoScope\n\nexport interface MongoDBResourceOptions {\n config: MongoDBConfig\n prefix?: string\n}\n\nexport class MongoDBResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.MONGODB\n readonly isRemote: boolean = true\n readonly indexTtl: number = 0\n readonly prompt: string\n readonly config: MongoDBConfigResolved\n readonly store: MongoDBStore\n readonly accessor: MongoDBAccessor\n\n constructor(options: MongoDBResourceOptions | MongoDBConfig) {\n super()\n const { config, prefix } =\n 'config' in options ? options : { config: options, prefix: undefined }\n this.config = resolveMongoDBConfig(config)\n this.store = new MongoDBStore(this.config.uri)\n this.accessor = new MongoDBAccessor(this.store, this.config)\n this.prompt = MONGODB_PROMPT.replace('{prefix}', prefix ?? '')\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n async close(): Promise<void> {\n await this.store.close()\n }\n\n ops(): readonly RegisteredOp[] {\n return MONGODB_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return MONGODB_COMMANDS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return mongoRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return mongoReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return mongoStat(this.accessor, p, this.index)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveMongoGlob(this.accessor, effective, this.index)\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n loadOptionalPeer,\n type EntityKind,\n type MongoCollectionSpec,\n type MongoDriver,\n type MongoFindOptions,\n type MongoIndexAccess,\n type MongoIterOptions,\n} from '@struktoai/mirage-core'\n\ninterface MongoCollectionLike {\n find: (\n filter: Record<string, unknown>,\n options?: { projection?: Record<string, unknown> },\n ) => {\n sort: (sort: Record<string, 1 | -1>) => MongoCursorLike\n skip: (n: number) => MongoCursorLike\n limit: (n: number) => MongoCursorLike\n batchSize: (n: number) => MongoCursorLike\n toArray: () => Promise<Record<string, unknown>[]>\n [Symbol.asyncIterator]?: () => AsyncIterableIterator<Record<string, unknown>>\n }\n countDocuments: (filter?: Record<string, unknown>) => Promise<number>\n listIndexes: () => { toArray: () => Promise<Record<string, unknown>[]> }\n aggregate: (pipeline: unknown[]) => { toArray: () => Promise<Record<string, unknown>[]> }\n watch: (\n pipeline?: unknown[],\n ) => AsyncIterableIterator<Record<string, unknown>> & { close: () => Promise<void> }\n}\n\ninterface MongoCursorLike {\n sort: (sort: Record<string, 1 | -1>) => MongoCursorLike\n skip: (n: number) => MongoCursorLike\n limit: (n: number) => MongoCursorLike\n batchSize: (n: number) => MongoCursorLike\n toArray: () => Promise<Record<string, unknown>[]>\n [Symbol.asyncIterator]?: () => AsyncIterableIterator<Record<string, unknown>>\n}\n\ninterface MongoDbLike {\n listCollections: (filter?: Record<string, unknown>) => {\n toArray: () => Promise<Record<string, unknown>[]>\n }\n collection: (name: string) => MongoCollectionLike\n admin: () => { listDatabases: () => Promise<{ databases: { name: string }[] }> }\n}\n\ninterface MongoClientLike {\n connect: () => Promise<MongoClientLike>\n db: (name?: string) => MongoDbLike\n close: () => Promise<void>\n}\n\ninterface MongoModule {\n MongoClient: new (uri: string) => MongoClientLike\n}\n\nexport class MongoDBStore implements MongoDriver {\n readonly uri: string\n private clientPromise: Promise<MongoClientLike> | null = null\n\n constructor(uri: string) {\n this.uri = uri\n }\n\n async listDatabases(): Promise<string[]> {\n const c = await this._client()\n const r = await c.db().admin().listDatabases()\n return r.databases.map((d) => d.name)\n }\n\n async listCollections(database: string, kind: EntityKind | null = null): Promise<string[]> {\n const c = await this._client()\n const filter = kind === null ? undefined : { type: kind }\n const cols = await c.db(database).listCollections(filter).toArray()\n return cols.map((col) => col.name as string).sort()\n }\n\n async listCollectionsDetailed(\n database: string,\n filter: { name?: string } = {},\n ): Promise<MongoCollectionSpec[]> {\n const c = await this._client()\n const cols = await c.db(database).listCollections(filter).toArray()\n return cols.map((col) => {\n const spec: MongoCollectionSpec = { name: col.name as string }\n if (col.type !== undefined) spec.type = col.type as string\n if (col.options !== undefined)\n spec.options = col.options as NonNullable<MongoCollectionSpec['options']>\n return spec\n })\n }\n\n async findDocuments<T = Record<string, unknown>>(\n database: string,\n collection: string,\n filter: Record<string, unknown> = {},\n options: MongoFindOptions = {},\n ): Promise<T[]> {\n const c = await this._client()\n let cursor = c\n .db(database)\n .collection(collection)\n .find(filter, {\n ...(options.projection !== undefined ? { projection: options.projection } : {}),\n }) as MongoCursorLike\n if (options.sort !== undefined) cursor = cursor.sort(options.sort)\n if (options.skip !== undefined) cursor = cursor.skip(options.skip)\n if (options.limit !== undefined) cursor = cursor.limit(options.limit)\n return (await cursor.toArray()) as T[]\n }\n\n async *iterDocuments<T = Record<string, unknown>>(\n database: string,\n collection: string,\n options: MongoIterOptions = {},\n ): AsyncIterableIterator<T> {\n const c = await this._client()\n const filter = options.filter ?? {}\n let cursor = c\n .db(database)\n .collection(collection)\n .find(filter, {\n ...(options.projection !== undefined ? { projection: options.projection } : {}),\n }) as MongoCursorLike\n if (options.sort !== undefined) cursor = cursor.sort(options.sort)\n if (options.batchSize !== undefined) cursor = cursor.batchSize(options.batchSize)\n if (cursor[Symbol.asyncIterator] === undefined) {\n const all = (await cursor.toArray()) as T[]\n for (const doc of all) yield doc\n return\n }\n for await (const doc of cursor as unknown as AsyncIterableIterator<T>) {\n yield doc\n }\n }\n\n async *iterInserts<T = Record<string, unknown>>(\n database: string,\n collection: string,\n ): AsyncIterableIterator<T> {\n const c = await this._client()\n const stream = c\n .db(database)\n .collection(collection)\n .watch([{ $match: { operationType: 'insert' } }])\n try {\n for await (const change of stream as AsyncIterableIterator<Record<string, unknown>>) {\n const doc = change.fullDocument\n if (doc !== undefined && doc !== null) yield doc as T\n }\n } finally {\n await stream.close()\n }\n }\n\n async countDocuments(\n database: string,\n collection: string,\n filter: Record<string, unknown> = {},\n ): Promise<number> {\n const c = await this._client()\n return c.db(database).collection(collection).countDocuments(filter)\n }\n\n async listIndexes(database: string, collection: string): Promise<Record<string, unknown>[]> {\n const c = await this._client()\n return c.db(database).collection(collection).listIndexes().toArray()\n }\n\n async getIndexStats(\n database: string,\n collection: string,\n ): Promise<Record<string, MongoIndexAccess>> {\n const c = await this._client()\n const docs = await c\n .db(database)\n .collection(collection)\n .aggregate([{ $indexStats: {} }])\n .toArray()\n const out: Record<string, MongoIndexAccess> = {}\n for (const d of docs) {\n const name = d.name as string | undefined\n if (name !== undefined) {\n out[name] = (d.accesses as MongoIndexAccess | undefined) ?? {}\n }\n }\n return out\n }\n\n async close(): Promise<void> {\n if (this.clientPromise === null) return\n const c = await this.clientPromise\n this.clientPromise = null\n await c.close()\n }\n\n private async _client(): Promise<MongoClientLike> {\n this.clientPromise ??= this._connect()\n return this.clientPromise\n }\n\n protected async _connect(): Promise<MongoClientLike> {\n const mod = await loadOptionalPeer(() => import('mongodb') as unknown as Promise<MongoModule>, {\n feature: 'MongoDBResource',\n packageName: 'mongodb',\n })\n const c = new mod.MongoClient(this.uri)\n await c.connect()\n return c\n }\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACpBP;AAAA,EACE;AAAA,OAOK;AAiDA,IAAM,eAAN,MAA0C;AAAA,EACtC;AAAA,EACD,gBAAiD;AAAA,EAEzD,YAAY,KAAa;AACvB,SAAK,MAAM;AAAA,EACb;AAAA,EAEA,MAAM,gBAAmC;AACvC,UAAM,IAAI,MAAM,KAAK,QAAQ;AAC7B,UAAM,IAAI,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc;AAC7C,WAAO,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE,IAAI;AAAA,EACtC;AAAA,EAEA,MAAM,gBAAgB,UAAkB,OAA0B,MAAyB;AACzF,UAAM,IAAI,MAAM,KAAK,QAAQ;AAC7B,UAAM,SAAS,SAAS,OAAO,SAAY,EAAE,MAA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