@struktoai/mirage-node 0.0.2 → 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resource/ssh/ssh.ts","../src/accessor/ssh.ts","../src/commands/builtin/ssh/basename.ts","../src/commands/builtin/ssh/cat/cat.ts","../src/core/ssh/glob.ts","../src/core/ssh/utils.ts","../src/core/ssh/readdir.ts","../src/core/ssh/stream.ts","../src/core/ssh/entry.ts","../src/core/ssh/stat.ts","../src/commands/builtin/ssh/cp.ts","../src/core/ssh/read.ts","../src/core/ssh/write.ts","../src/core/ssh/copy.ts","../src/core/ssh/find.ts","../src/commands/builtin/ssh/dirname.ts","../src/commands/builtin/ssh/du.ts","../src/core/ssh/du.ts","../src/commands/builtin/ssh/file/file.ts","../src/commands/builtin/ssh/find.ts","../src/commands/builtin/ssh/grep/grep.ts","../src/commands/builtin/ssh/head/head.ts","../src/commands/builtin/ssh/jq.ts","../src/commands/builtin/ssh/ls/ls.ts","../src/commands/builtin/ssh/mkdir.ts","../src/core/ssh/mkdir.ts","../src/commands/builtin/ssh/mv.ts","../src/core/ssh/rename.ts","../src/commands/builtin/ssh/realpath.ts","../src/commands/builtin/ssh/rg.ts","../src/commands/builtin/ssh/rm.ts","../src/core/ssh/rmdir.ts","../src/core/ssh/unlink.ts","../src/core/ssh/rm.ts","../src/commands/builtin/ssh/stat/stat.ts","../src/commands/builtin/ssh/tail/tail.ts","../src/commands/builtin/ssh/touch.ts","../src/core/ssh/exists.ts","../src/commands/builtin/ssh/tree.ts","../src/commands/builtin/ssh/wc/wc.ts","../src/commands/builtin/ssh/awk.ts","../src/commands/builtin/ssh/base64_cmd.ts","../src/commands/builtin/ssh/cmp.ts","../src/commands/builtin/ssh/column.ts","../src/commands/builtin/ssh/comm.ts","../src/commands/builtin/ssh/csplit.ts","../src/commands/builtin/ssh/cut.ts","../src/commands/builtin/ssh/diff.ts","../src/commands/builtin/ssh/expand.ts","../src/commands/builtin/ssh/fmt.ts","../src/commands/builtin/ssh/fold.ts","../src/commands/builtin/ssh/gunzip.ts","../src/commands/builtin/ssh/gzip.ts","../src/commands/builtin/ssh/iconv.ts","../src/commands/builtin/ssh/join.ts","../src/commands/builtin/ssh/ln.ts","../src/commands/builtin/ssh/look.ts","../src/commands/builtin/ssh/md5.ts","../src/commands/builtin/ssh/mktemp.ts","../src/commands/builtin/ssh/nl.ts","../src/commands/builtin/ssh/paste.ts","../src/commands/builtin/ssh/patch.ts","../src/commands/builtin/ssh/readlink.ts","../src/commands/builtin/ssh/rev.ts","../src/commands/builtin/ssh/sed.ts","../src/commands/builtin/ssh/sha256sum.ts","../src/commands/builtin/ssh/shuf.ts","../src/commands/builtin/ssh/sort.ts","../src/commands/builtin/ssh/split.ts","../src/commands/builtin/ssh/strings.ts","../src/commands/builtin/ssh/tac.ts","../src/commands/builtin/ssh/tar.ts","../src/commands/builtin/ssh/tee.ts","../src/commands/builtin/ssh/tr.ts","../src/commands/builtin/ssh/tsort.ts","../src/commands/builtin/ssh/unexpand.ts","../src/commands/builtin/ssh/uniq.ts","../src/commands/builtin/ssh/unzip.ts","../src/commands/builtin/ssh/xxd.ts","../src/commands/builtin/ssh/zcat.ts","../src/commands/builtin/ssh/zgrep.ts","../src/commands/builtin/ssh/zip_cmd.ts","../src/commands/builtin/ssh/index.ts","../src/core/ssh/append.ts","../src/core/ssh/create.ts","../src/core/ssh/truncate.ts","../src/ops/ssh/append.ts","../src/ops/ssh/create.ts","../src/ops/ssh/mkdir.ts","../src/ops/ssh/read.ts","../src/ops/ssh/readdir.ts","../src/ops/ssh/rename.ts","../src/ops/ssh/rmdir.ts","../src/ops/ssh/stat.ts","../src/ops/ssh/truncate.ts","../src/ops/ssh/unlink.ts","../src/ops/ssh/write.ts","../src/ops/ssh/index.ts","../src/resource/ssh/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { SSH_COMMANDS } from '../../commands/builtin/ssh/index.ts'\nimport { appendBytes as appendCore } from '../../core/ssh/append.ts'\nimport { copy as copyCore } from '../../core/ssh/copy.ts'\nimport { create as createCore } from '../../core/ssh/create.ts'\nimport { du as duCore, duAll as duAllCore } from '../../core/ssh/du.ts'\nimport { exists as existsCore } from '../../core/ssh/exists.ts'\nimport { find as findCore, type FindOptions as SshFindOptions } from '../../core/ssh/find.ts'\nimport { resolveGlob as globCore } from '../../core/ssh/glob.ts'\nimport { mkdir as mkdirCore } from '../../core/ssh/mkdir.ts'\nimport { read as readCoreFn } from '../../core/ssh/read.ts'\nimport { readdir as readdirCore } from '../../core/ssh/readdir.ts'\nimport { rename as renameCore } from '../../core/ssh/rename.ts'\nimport { rmR as rmRCore } from '../../core/ssh/rm.ts'\nimport { rmdir as rmdirCore } from '../../core/ssh/rmdir.ts'\nimport { stat as statCore } from '../../core/ssh/stat.ts'\nimport { rangeRead as rangeReadCore, stream as streamCore } from '../../core/ssh/stream.ts'\nimport { truncate as truncateCore } from '../../core/ssh/truncate.ts'\nimport { unlink as unlinkCore } from '../../core/ssh/unlink.ts'\nimport { writeBytes as writeCore } from '../../core/ssh/write.ts'\nimport { SSH_OPS } from '../../ops/ssh/index.ts'\nimport { type SSHConfig, type SSHConfigRedacted, redactSshConfig } from './config.ts'\nimport { SSH_PROMPT } from './prompt.ts'\n\nexport interface SSHResourceState {\n type: string\n config: SSHConfigRedacted\n}\n\nexport class SSHResource extends BaseResource implements Resource {\n readonly kind = ResourceName.SSH\n readonly cachesReads: boolean = true\n readonly indexTtl: number = 60\n readonly prompt = SSH_PROMPT\n readonly config: SSHConfig\n readonly accessor: SSHAccessor\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 range_read: rangeReadCore,\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(config: SSHConfig) {\n super()\n this.config = config\n this.accessor = new SSHAccessor(config)\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return this.accessor.close()\n }\n\n ops(): readonly RegisteredOp[] {\n return SSH_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return SSH_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)\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 SshFindOptions)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n try {\n const remote = await statCore(this.accessor, p)\n const mtime = remote.modified ?? ''\n const size = String(remote.size ?? 0)\n return `${mtime}:${size}`\n } catch (err) {\n if ((err as { code?: string }).code === 'ENOENT') return null\n throw err\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)\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n async getState(): Promise<SSHResourceState> {\n return {\n type: this.kind,\n config: redactSshConfig(this.config),\n }\n }\n\n loadState(_state: SSHResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type * as Ssh2Mod from 'ssh2'\nimport type { Client, SFTPWrapper } from 'ssh2'\nimport { Accessor } from '@struktoai/mirage-core'\nimport { homedir } from 'node:os'\nimport { readFileSync } from 'node:fs'\nimport { resolve } from 'node:path'\nimport type { SSHConfig } from '../resource/ssh/config.ts'\n\nfunction expandHome(p: string): string {\n if (p === '~') return homedir()\n if (p.startsWith('~/')) return resolve(homedir(), p.slice(2))\n return p\n}\n\nexport class SSHAccessor extends Accessor {\n private client: Client | null = null\n private sftpClient: SFTPWrapper | null = null\n private connectPromise: Promise<SFTPWrapper> | null = null\n\n constructor(public readonly config: SSHConfig) {\n super()\n }\n\n async sftp(): Promise<SFTPWrapper> {\n if (this.sftpClient !== null) return this.sftpClient\n if (this.connectPromise !== null) return this.connectPromise\n this.connectPromise = this.connect()\n try {\n return await this.connectPromise\n } finally {\n this.connectPromise = null\n }\n }\n\n private async connect(): Promise<SFTPWrapper> {\n let ssh2Mod: typeof Ssh2Mod\n try {\n ssh2Mod = await import('ssh2')\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err)\n throw new Error(`ssh2 is required for the SSH resource — install it as a peer dep: ${msg}`)\n }\n const { Client: ClientCtor } = ssh2Mod\n const c = new ClientCtor()\n const opts: Record<string, unknown> = {\n host: this.config.hostname ?? this.config.host,\n port: this.config.port ?? 22,\n readyTimeout: (this.config.timeout ?? 30) * 1000,\n }\n if (this.config.username !== undefined) opts.username = this.config.username\n if (this.config.password !== undefined) opts.password = this.config.password\n if (this.config.identityFile !== undefined) {\n opts.privateKey = readFileSync(expandHome(this.config.identityFile))\n if (this.config.passphrase !== undefined) opts.passphrase = this.config.passphrase\n }\n return new Promise<SFTPWrapper>((resolveFn, rejectFn) => {\n c.on('ready', () => {\n c.sftp((err: Error | undefined, sftp: SFTPWrapper) => {\n if (err !== undefined) {\n rejectFn(err)\n return\n }\n this.client = c\n this.sftpClient = sftp\n resolveFn(sftp)\n })\n })\n c.on('error', rejectFn)\n c.connect(opts as Parameters<Client['connect']>[0])\n })\n }\n\n close(): Promise<void> {\n if (this.client !== null) {\n this.client.end()\n this.client = null\n this.sftpClient = null\n }\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, command, specOf, basenameFn } from '@struktoai/mirage-core'\n\nexport const SSH_BASENAME = command({\n name: 'basename',\n resource: ResourceName.SSH,\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 type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveGlob } from '../../../../core/ssh/glob.ts'\nimport { stream as sshStream } from '../../../../core/ssh/stream.ts'\nimport { stat as sshStat } from '../../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nasync function catCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = paths.length > 0 ? await resolveGlob(accessor, paths) : []\n return catGeneric(\n resolved,\n texts,\n opts,\n (p) => sshStat(accessor, p),\n (p) => sshStream(accessor, p),\n )\n}\n\nexport const SSH_CAT = command({\n name: 'cat',\n resource: ResourceName.SSH,\n spec: specOf('cat'),\n fn: catCommand,\n provision: (accessor: SSHAccessor, paths: PathSpec[]) =>\n catProvisionGeneric(paths, (p) => sshStat(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 { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { SCOPE_ERROR } from '../disk/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: SSHAccessor,\n paths: readonly PathSpec[],\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 && p.pattern !== '') {\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)\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 { PathSpec } from '@struktoai/mirage-core'\nimport { lstripSlash, rstripSlash } from '@struktoai/mirage-core'\n\nconst S_IFMT = 0o170000\nconst S_IFDIR = 0o040000\nconst S_IFREG = 0o100000\n\nexport function stripPrefix(p: PathSpec): string {\n if (p.prefix && p.original.startsWith(p.prefix)) {\n return p.original.slice(p.prefix.length) || '/'\n }\n return p.original\n}\n\nexport function joinRoot(root: string, rel: string): string {\n const r = rstripSlash(root)\n const stripped = lstripSlash(rel)\n if (stripped === '') return r === '' ? '/' : r\n if (r === '') return `/${stripped}`\n return `${r}/${stripped}`\n}\n\nexport function isNoSuchFile(err: unknown): boolean {\n if (err === null || err === undefined) return false\n if (typeof err !== 'object') return false\n const code = (err as { code?: unknown }).code\n return code === 2\n}\n\nexport function isDirectoryAttrs(attrs: { mode?: number }): boolean {\n if (attrs.mode === undefined) return false\n return (attrs.mode & S_IFMT) === S_IFDIR\n}\n\nexport function isFileAttrs(attrs: { mode?: number }): boolean {\n if (attrs.mode === undefined) return false\n return (attrs.mode & S_IFMT) === S_IFREG\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 { FileEntryWithStats } from 'ssh2'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\nimport { enoent, stripSlash } from '@struktoai/mirage-core'\n\nexport async function readdir(accessor: SSHAccessor, p: PathSpec): Promise<string[]> {\n const sftp = await accessor.sftp()\n const virtual = p.pattern !== null ? p.directory.slice(p.prefix.length) || '/' : stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n const list = await new Promise<FileEntryWithStats[]>((resolveFn, rejectFn) => {\n sftp.readdir(remote, (err, entries) => {\n if (err !== undefined) {\n if (isNoSuchFile(err)) rejectFn(enoent(p))\n else rejectFn(err)\n return\n }\n resolveFn(entries)\n })\n })\n const base = `/${stripSlash(virtual)}`\n const dirPrefix = base === '/' ? '/' : `${base}/`\n const mountPrefix = p.prefix\n const names: string[] = []\n for (const entry of list) {\n if (entry.filename === '.' || entry.filename === '..') continue\n names.push(`${mountPrefix}${dirPrefix}${entry.filename}`)\n }\n names.sort()\n return names\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 } from '@struktoai/mirage-core'\nimport { enoent } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\n\nexport async function* stream(accessor: SSHAccessor, p: PathSpec): AsyncIterable<Uint8Array> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n const rs = sftp.createReadStream(remote)\n try {\n for await (const chunk of rs) {\n const buf = chunk as Buffer\n yield new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength)\n }\n } catch (err) {\n if (isNoSuchFile(err)) throw enoent(p)\n throw err\n }\n}\n\nexport async function rangeRead(\n accessor: SSHAccessor,\n p: PathSpec,\n start: number,\n end: number,\n): Promise<Uint8Array> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n const rs = sftp.createReadStream(remote, { start, end: end - 1 })\n const chunks: Uint8Array[] = []\n let total = 0\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 chunks.push(u8)\n total += u8.byteLength\n }\n } catch (err) {\n if (isNoSuchFile(err)) throw enoent(p)\n throw err\n }\n const out = new Uint8Array(total)\n let offset = 0\n for (const c of chunks) {\n out.set(c, offset)\n offset += c.byteLength\n }\n return 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 { FileStat, FileType, guessType } from '@struktoai/mirage-core'\nimport { isDirectoryAttrs } from './utils.ts'\n\nexport interface SshAttrs {\n size?: number\n mode?: number\n mtime?: number\n atime?: number\n uid?: number\n gid?: number\n}\n\nexport function attrsToFileStat(name: string, attrs: SshAttrs): FileStat {\n const modified = attrs.mtime !== undefined ? new Date(attrs.mtime * 1000).toISOString() : null\n const extra: Record<string, unknown> = {}\n if (attrs.mode !== undefined) extra.mode = attrs.mode\n if (attrs.uid !== undefined) extra.uid = attrs.uid\n if (attrs.gid !== undefined) extra.gid = attrs.gid\n if (isDirectoryAttrs(attrs)) {\n return new FileStat({\n name,\n size: null,\n modified,\n type: FileType.DIRECTORY,\n extra,\n })\n }\n return new FileStat({\n name,\n size: attrs.size ?? null,\n modified,\n fingerprint: null,\n type: guessType(name),\n extra,\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 { FileStat, PathSpec } from '@struktoai/mirage-core'\nimport type { Stats } from 'ssh2'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { attrsToFileStat } from './entry.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\nimport { enoent, rstripSlash } from '@struktoai/mirage-core'\n\nexport async function stat(accessor: SSHAccessor, p: PathSpec): Promise<FileStat> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n const attrs = await new Promise<Stats>((resolveFn, rejectFn) => {\n sftp.lstat(remote, (err, stats) => {\n if (err !== undefined) {\n if (isNoSuchFile(err)) rejectFn(enoent(p))\n else rejectFn(err)\n return\n }\n resolveFn(stats)\n })\n })\n const cleaned = rstripSlash(virtual)\n const name = cleaned.length === 0 ? '/' : (cleaned.split('/').pop() ?? '/')\n return attrsToFileStat(name, attrs)\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/ssh/copy.ts'\nimport { find as coreFind } from '../../../core/ssh/find.ts'\nimport { stat as coreStat } from '../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nfunction cpCommand(\n accessor: SSHAccessor,\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 SSH_CP = command({\n name: 'cp',\n resource: ResourceName.SSH,\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 { PathSpec } from '@struktoai/mirage-core'\nimport { enoent } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\n\nexport async function read(accessor: SSHAccessor, p: PathSpec): Promise<Uint8Array> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n return new Promise<Uint8Array>((resolveFn, rejectFn) => {\n sftp.readFile(remote, (err, buf) => {\n if (err !== undefined) {\n if (isNoSuchFile(err)) rejectFn(enoent(p))\n else rejectFn(err)\n return\n }\n resolveFn(new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength))\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 { invalidateAfterWrite } from '@struktoai/mirage-core'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { joinRoot, stripPrefix } from './utils.ts'\n\nexport async function writeBytes(\n accessor: SSHAccessor,\n p: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n await new Promise<void>((resolveFn, rejectFn) => {\n sftp.writeFile(remote, Buffer.from(data), (err) => {\n if (err) rejectFn(err)\n else resolveFn()\n })\n })\n await invalidateAfterWrite(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 { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { read } from './read.ts'\nimport { writeBytes } from './write.ts'\n\nexport async function copy(accessor: SSHAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const data = await read(accessor, src)\n await writeBytes(accessor, dst, data)\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 { FileEntryWithStats } from 'ssh2'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isDirectoryAttrs, joinRoot, stripPrefix } from './utils.ts'\nimport { norm } from '@struktoai/mirage-core'\nimport {\n buildTree,\n emitStartPath,\n keep,\n type PredNode,\n startBasename,\n} from '@struktoai/mirage-core'\n\nexport interface FindOptions {\n name?: string | null\n type?: 'f' | 'd' | 'file' | 'directory' | 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: SSHAccessor\n options: FindOptions\n results: string[]\n baseDepth: number\n tree: PredNode\n}\n\nfunction isFileType(t: FindOptions['type']): boolean {\n return t === 'f' || t === 'file'\n}\n\nfunction isDirType(t: FindOptions['type']): boolean {\n return t === 'd' || t === 'directory'\n}\n\nfunction matches(\n entry: FileEntryWithStats,\n entryPath: string,\n isDir: boolean,\n depth: number,\n opts: FindOptions,\n tree: PredNode,\n): boolean {\n if (opts.maxDepth !== null && opts.maxDepth !== undefined && depth > opts.maxDepth) return false\n const basename = entryPath.slice(entryPath.lastIndexOf('/') + 1)\n const isEmpty = isDir ? false : entry.attrs.size === 0\n if (\n !keep(\n { key: entryPath, name: basename, kind: isDir ? 'd' : 'f', depth, isEmpty },\n tree,\n opts.minDepth,\n )\n ) {\n return false\n }\n if (!isDir) {\n const size = entry.attrs.size\n if (opts.minSize !== null && opts.minSize !== undefined && size < opts.minSize) return false\n if (opts.maxSize !== null && opts.maxSize !== undefined && size > opts.maxSize) return false\n }\n if (\n (opts.mtimeMin !== null && opts.mtimeMin !== undefined) ||\n (opts.mtimeMax !== null && opts.mtimeMax !== undefined)\n ) {\n const mtime = entry.attrs.mtime\n if (opts.mtimeMin !== null && opts.mtimeMin !== undefined && mtime < opts.mtimeMin) return false\n if (opts.mtimeMax !== null && opts.mtimeMax !== undefined && mtime > opts.mtimeMax) return false\n }\n return true\n}\n\nasync function readRemoteDir(\n accessor: SSHAccessor,\n remote: string,\n): Promise<FileEntryWithStats[] | null> {\n const sftp = await accessor.sftp()\n return new Promise<FileEntryWithStats[] | null>((resolveFn, rejectFn) => {\n sftp.readdir(remote, (err, entries) => {\n if (err !== undefined) {\n const code = (err as { code?: unknown }).code\n if (code === 2) {\n resolveFn(null)\n return\n }\n rejectFn(err)\n return\n }\n resolveFn(entries)\n })\n })\n}\n\nasync function statRemote(\n accessor: SSHAccessor,\n remote: string,\n): Promise<{ isDir: boolean; size: number } | null> {\n const sftp = await accessor.sftp()\n return new Promise<{ isDir: boolean; size: number } | null>((resolveFn, rejectFn) => {\n sftp.stat(remote, (err, stats) => {\n if (err !== undefined) {\n const code = (err as { code?: unknown }).code\n if (code === 2) {\n resolveFn(null)\n return\n }\n rejectFn(err)\n return\n }\n resolveFn({ isDir: stats.isDirectory(), size: stats.size })\n })\n })\n}\n\nasync function walk(ctx: WalkCtx, virtual: string, depth: number): Promise<void> {\n const opts = ctx.options\n if (opts.maxDepth !== null && opts.maxDepth !== undefined && depth > opts.maxDepth) return\n const remote = joinRoot(ctx.accessor.config.root ?? '/', virtual)\n const entries = await readRemoteDir(ctx.accessor, remote)\n if (entries === null) return\n for (const entry of entries) {\n if (entry.filename === '.' || entry.filename === '..') continue\n const childPath = virtual === '/' ? `/${entry.filename}` : `${virtual}/${entry.filename}`\n const isDir = isDirectoryAttrs(entry.attrs)\n if (matches(entry, childPath, isDir, depth + 1, opts, ctx.tree)) {\n ctx.results.push(childPath)\n }\n if (isDir) {\n await walk(ctx, childPath, depth + 1)\n }\n }\n}\n\nexport async function find(\n accessor: SSHAccessor,\n p: PathSpec,\n options: FindOptions = {},\n): Promise<string[]> {\n const virtual = norm(stripPrefix(p))\n const startName = startBasename(p.original)\n const results: string[] = []\n const baseDepth = (virtual.match(/\\//g) ?? []).length\n const typeKind: 'f' | 'd' | null = isFileType(options.type)\n ? 'f'\n : isDirType(options.type)\n ? 'd'\n : null\n const tree =\n options.tree ??\n buildTree({\n name: options.name,\n iname: options.iname,\n pathPattern: options.pathPattern,\n type: typeKind,\n nameExclude: options.nameExclude,\n orNames: options.orNames,\n })\n if (options.maxDepth == null || options.maxDepth >= 0) {\n const st = await statRemote(accessor, joinRoot(accessor.config.root ?? '/', virtual))\n emitStartPath(results, virtual, startName, {\n kind: st?.isDir ? 'd' : 'f',\n isEmpty: st === null ? null : st.isDir ? false : st.size === 0,\n exists: st !== null,\n tree,\n maxDepth: options.maxDepth,\n minDepth: options.minDepth,\n })\n }\n await walk({ accessor, options, results, baseDepth, tree }, 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, dirnameFn } from '@struktoai/mirage-core'\n\nexport const SSH_DIRNAME = command({\n name: 'dirname',\n resource: ResourceName.SSH,\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 {\n ResourceName,\n command,\n duGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { du as sshDu, duAll as sshDuAll } from '../../../core/ssh/du.ts'\nimport { resolveGlob } from '../../../core/ssh/glob.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nasync function duCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = paths.length > 0 ? await resolveGlob(accessor, paths) : []\n return duGeneric(\n resolved,\n opts,\n (p) => sshDu(accessor, p),\n (p) => sshDuAll(accessor, p),\n )\n}\n\nexport const SSH_DU = command({\n name: 'du',\n resource: ResourceName.SSH,\n spec: specOf('du'),\n fn: duCommand,\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 { FileEntryWithStats } from 'ssh2'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isDirectoryAttrs, isFileAttrs, joinRoot, stripPrefix } from './utils.ts'\nimport { norm } from '@struktoai/mirage-core'\n\nasync function readRemoteDir(\n accessor: SSHAccessor,\n remote: string,\n): Promise<FileEntryWithStats[] | null> {\n const sftp = await accessor.sftp()\n return new Promise<FileEntryWithStats[] | null>((resolveFn, rejectFn) => {\n sftp.readdir(remote, (err, entries) => {\n if (err !== undefined) {\n const code = (err as { code?: unknown }).code\n if (code === 2) {\n resolveFn(null)\n return\n }\n rejectFn(err)\n return\n }\n resolveFn(entries)\n })\n })\n}\n\nasync function statRemote(\n accessor: SSHAccessor,\n remote: string,\n): Promise<{ mode: number; size: number } | null> {\n const sftp = await accessor.sftp()\n return new Promise<{ mode: number; size: number } | null>((resolveFn, rejectFn) => {\n sftp.lstat(remote, (err, stats) => {\n if (err !== undefined) {\n const code = (err as { code?: unknown }).code\n if (code === 2) {\n resolveFn(null)\n return\n }\n rejectFn(err)\n return\n }\n resolveFn({ mode: stats.mode, size: stats.size })\n })\n })\n}\n\nasync function walkSizes(accessor: SSHAccessor, virtual: string): Promise<number> {\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n const st = await statRemote(accessor, remote)\n if (st === null) return 0\n if (isFileAttrs(st)) return st.size\n if (!isDirectoryAttrs(st)) return 0\n const entries = await readRemoteDir(accessor, remote)\n if (entries === null) return 0\n let total = 0\n for (const entry of entries) {\n if (entry.filename === '.' || entry.filename === '..') continue\n const child = virtual === '/' ? `/${entry.filename}` : `${virtual}/${entry.filename}`\n if (isDirectoryAttrs(entry.attrs)) {\n total += await walkSizes(accessor, child)\n } else {\n total += entry.attrs.size\n }\n }\n return total\n}\n\nasync function walkAll(\n accessor: SSHAccessor,\n virtual: string,\n entries: [string, number][],\n): Promise<number> {\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n const st = await statRemote(accessor, remote)\n if (st === null) return 0\n if (isFileAttrs(st)) {\n entries.push([virtual, st.size])\n return st.size\n }\n if (!isDirectoryAttrs(st)) return 0\n const list = await readRemoteDir(accessor, remote)\n if (list === null) return 0\n let total = 0\n for (const entry of list) {\n if (entry.filename === '.' || entry.filename === '..') continue\n const child = virtual === '/' ? `/${entry.filename}` : `${virtual}/${entry.filename}`\n if (isDirectoryAttrs(entry.attrs)) {\n total += await walkAll(accessor, child, entries)\n } else {\n const size = entry.attrs.size\n entries.push([child, size])\n total += size\n }\n }\n return total\n}\n\nexport async function du(accessor: SSHAccessor, p: PathSpec): Promise<number> {\n const virtual = stripPrefix(p)\n return walkSizes(accessor, virtual)\n}\n\nexport async function duAll(\n accessor: SSHAccessor,\n p: PathSpec,\n): Promise<[entries: [string, number][], total: number]> {\n const virtual = norm(stripPrefix(p))\n const entries: [string, number][] = []\n const total = await walkAll(accessor, virtual, 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 {\n ResourceName,\n command,\n fileGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveGlob } from '../../../../core/ssh/glob.ts'\nimport { read as sshRead } from '../../../../core/ssh/read.ts'\nimport { stat as sshStat } from '../../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nasync function fileCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = paths.length > 0 ? await resolveGlob(accessor, paths) : []\n return fileGeneric(\n resolved,\n opts,\n (p) => sshStat(accessor, p),\n (p) => sshRead(accessor, p),\n )\n}\n\nexport const SSH_FILE = command({\n name: 'file',\n resource: ResourceName.SSH,\n spec: specOf('file'),\n fn: fileCommand,\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 sshFind } from '../../../core/ssh/find.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nexport const SSH_FIND = command({\n name: 'find',\n resource: ResourceName.SSH,\n spec: specOf('find'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n findGeneric(paths, texts, opts, (root, options) => sshFind(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 grepGeneric,\n prefixAggregate,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type FileStat,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveGlob } from '../../../../core/ssh/glob.ts'\nimport { readdir as sshReaddir } from '../../../../core/ssh/readdir.ts'\nimport { stat as sshStat } from '../../../../core/ssh/stat.ts'\nimport { stream as sshStream } from '../../../../core/ssh/stream.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nasync function grepFn(\n accessor: SSHAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = paths.length > 0 ? await resolveGlob(accessor, paths) : []\n const stat = (p: PathSpec): Promise<FileStat> => sshStat(accessor, p)\n const readdir = (p: PathSpec): Promise<string[]> => sshReaddir(accessor, p)\n return grepGeneric('grep', resolved, texts, opts, stat, readdir, (p) => sshStream(accessor, p))\n}\n\nexport const SSH_GREP = command({\n name: 'grep',\n resource: ResourceName.SSH,\n spec: specOf('grep'),\n fn: grepFn,\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 {\n ResourceName,\n command,\n headGeneric,\n headProvisionGeneric,\n headerAggregate,\n specOf,\n} from '@struktoai/mirage-core'\nimport { stream as sshStream } from '../../../../core/ssh/stream.ts'\nimport { stat as sshStat } from '../../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nexport const SSH_HEAD = command({\n name: 'head',\n resource: ResourceName.SSH,\n spec: specOf('head'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n headGeneric(\n paths,\n texts,\n opts,\n (p) => sshStat(accessor, p),\n (p) => sshStream(accessor, p),\n ),\n provision: (accessor: SSHAccessor, paths, texts, opts) =>\n headProvisionGeneric(paths, texts, opts, (p) => sshStat(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 {\n ResourceName,\n command,\n jqGeneric,\n jqProvisionGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveGlob } from '../../../core/ssh/glob.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { stat as sshStat } from '../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nasync function jqCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = paths.length > 0 ? await resolveGlob(accessor, paths) : []\n return jqGeneric(resolved, texts, opts, (p) => sshStream(accessor, p))\n}\n\nexport const SSH_JQ = command({\n name: 'jq',\n resource: ResourceName.SSH,\n spec: specOf('jq'),\n fn: jqCommand,\n provision: (accessor: SSHAccessor, paths: PathSpec[], texts: string[]) =>\n jqProvisionGeneric(paths, texts, (p) => sshStat(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 sshStat } from '../../../../core/ssh/stat.ts'\nimport { readdir as sshReaddir } from '../../../../core/ssh/readdir.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nexport const SSH_LS = command({\n name: 'ls',\n resource: ResourceName.SSH,\n spec: specOf('ls'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n lsGeneric(\n paths,\n opts,\n (p) => sshReaddir(accessor, p),\n (p) => sshStat(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 IOResult,\n ResourceName,\n command,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { mkdir as sshMkdir } from '../../../core/ssh/mkdir.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nasync function mkdirCommand(\n accessor: SSHAccessor,\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 sshMkdir(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 SSH_MKDIR = command({\n name: 'mkdir',\n resource: ResourceName.SSH,\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 { invalidateAfterWrite } from '@struktoai/mirage-core'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { SFTPWrapper, Stats } from 'ssh2'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\nimport { enoent, stripSlash } from '@struktoai/mirage-core'\n\nasync function statRemote(sftp: SFTPWrapper, remote: string): Promise<Stats | null> {\n return new Promise<Stats | null>((resolveFn) => {\n sftp.lstat(remote, (err, stats) => {\n if (err) resolveFn(null)\n else resolveFn(stats)\n })\n })\n}\n\nasync function mkdirOne(sftp: SFTPWrapper, remote: string, ignoreExisting: boolean): Promise<void> {\n return new Promise<void>((resolveFn, rejectFn) => {\n sftp.mkdir(remote, (err) => {\n if (!err) {\n resolveFn()\n return\n }\n if (ignoreExisting) {\n // ignore: dir already exists\n resolveFn()\n return\n }\n rejectFn(err)\n })\n })\n}\n\nexport async function mkdir(accessor: SSHAccessor, p: PathSpec, recursive: boolean): Promise<void> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const root = accessor.config.root ?? '/'\n const remote = joinRoot(root, virtual)\n if (!recursive) {\n try {\n await mkdirOne(sftp, remote, false)\n } catch (err) {\n if (isNoSuchFile(err)) throw enoent(p)\n throw err\n }\n return\n }\n const cleaned = stripSlash(virtual)\n if (cleaned.length === 0) return\n const parts = cleaned.split('/')\n let cur = ''\n for (const part of parts) {\n cur = cur === '' ? `/${part}` : `${cur}/${part}`\n const stepRemote = joinRoot(root, cur)\n const existing = await statRemote(sftp, stepRemote)\n if (existing?.isDirectory()) continue\n await mkdirOne(sftp, stepRemote, true)\n }\n await invalidateAfterWrite(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 mvGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { rename as coreRename } from '../../../core/ssh/rename.ts'\nimport { stat as coreStat } from '../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nfunction mvCommand(\n accessor: SSHAccessor,\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 SSH_MV = command({\n name: 'mv',\n resource: ResourceName.SSH,\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 { invalidateAfterUnlink, invalidateAfterWrite } from '@struktoai/mirage-core'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { enoent } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\n\nexport async function rename(accessor: SSHAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const sftp = await accessor.sftp()\n const root = accessor.config.root ?? '/'\n const srcVirtual = stripPrefix(src)\n const dstVirtual = stripPrefix(dst)\n const remoteSrc = joinRoot(root, srcVirtual)\n const remoteDst = joinRoot(root, dstVirtual)\n await new Promise<void>((resolveFn, rejectFn) => {\n sftp.rename(remoteSrc, remoteDst, (err) => {\n if (!err) {\n resolveFn()\n return\n }\n if (isNoSuchFile(err)) rejectFn(enoent(src))\n else rejectFn(err)\n })\n })\n await invalidateAfterWrite(dst)\n await invalidateAfterUnlink(src)\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 sshStat } from '../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nexport const SSH_REALPATH = command({\n name: 'realpath',\n resource: ResourceName.SSH,\n spec: specOf('realpath'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n realpathGeneric(paths, texts, opts, (p) => sshStat(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 rgGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type FileStat,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveGlob } from '../../../core/ssh/glob.ts'\nimport { readdir as sshReaddir } from '../../../core/ssh/readdir.ts'\nimport { stat as sshStat } from '../../../core/ssh/stat.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nasync function rgCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = paths.length > 0 ? await resolveGlob(accessor, paths) : []\n const stat = (p: PathSpec): Promise<FileStat> => sshStat(accessor, p)\n const readdir = (p: PathSpec): Promise<string[]> => sshReaddir(accessor, p)\n return rgGeneric(resolved, texts, opts, stat, readdir, (p) => sshStream(accessor, p))\n}\n\nexport const SSH_RG = command({\n name: 'rg',\n resource: ResourceName.SSH,\n spec: specOf('rg'),\n fn: rgCommand,\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 sshRmdir } from '../../../core/ssh/rmdir.ts'\nimport { stat as sshStat } from '../../../core/ssh/stat.ts'\nimport { unlink as sshUnlink } from '../../../core/ssh/unlink.ts'\nimport { rmR as sshRmR } from '../../../core/ssh/rm.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nasync function rmCommand(\n accessor: SSHAccessor,\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 sshStat(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 sshRmR(accessor, p)\n } else {\n await sshRmdir(accessor, p)\n }\n } else {\n await sshUnlink(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 SSH_RM = command({\n name: 'rm',\n resource: ResourceName.SSH,\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 { PathSpec } from '@struktoai/mirage-core'\nimport { enoent, invalidateAfterUnlink } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\n\nexport async function rmdir(accessor: SSHAccessor, p: PathSpec): Promise<void> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n await new Promise<void>((resolveFn, rejectFn) => {\n sftp.rmdir(remote, (err) => {\n if (!err) {\n resolveFn()\n return\n }\n if (isNoSuchFile(err)) rejectFn(enoent(p))\n else rejectFn(err)\n })\n })\n await invalidateAfterUnlink(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 { invalidateAfterUnlink } from '@struktoai/mirage-core'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { enoent } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\n\nexport async function unlink(accessor: SSHAccessor, p: PathSpec): Promise<void> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n await new Promise<void>((resolveFn, rejectFn) => {\n sftp.unlink(remote, (err) => {\n if (!err) {\n resolveFn()\n return\n }\n if (isNoSuchFile(err)) rejectFn(enoent(p))\n else rejectFn(err)\n })\n })\n await invalidateAfterUnlink(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 { FileEntryWithStats, SFTPWrapper, Stats } from 'ssh2'\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport { enoent, invalidateAfterUnlink } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { isDirectoryAttrs, isNoSuchFile, joinRoot, stripPrefix } from './utils.ts'\n\nasync function statRemote(sftp: SFTPWrapper, remote: string): Promise<Stats> {\n return new Promise<Stats>((resolveFn, rejectFn) => {\n sftp.lstat(remote, (err, stats) => {\n if (err !== undefined) rejectFn(err)\n else resolveFn(stats)\n })\n })\n}\n\nasync function readdirRemote(sftp: SFTPWrapper, remote: string): Promise<FileEntryWithStats[]> {\n return new Promise<FileEntryWithStats[]>((resolveFn, rejectFn) => {\n sftp.readdir(remote, (err, list) => {\n if (err !== undefined) rejectFn(err)\n else resolveFn(list)\n })\n })\n}\n\nasync function unlinkRemote(sftp: SFTPWrapper, remote: string): Promise<void> {\n return new Promise<void>((resolveFn, rejectFn) => {\n sftp.unlink(remote, (err) => {\n if (err) rejectFn(err)\n else resolveFn()\n })\n })\n}\n\nasync function rmdirRemote(sftp: SFTPWrapper, remote: string): Promise<void> {\n return new Promise<void>((resolveFn, rejectFn) => {\n sftp.rmdir(remote, (err) => {\n if (err) rejectFn(err)\n else resolveFn()\n })\n })\n}\n\nasync function rmRecurse(sftp: SFTPWrapper, remote: string): Promise<void> {\n const stats = await statRemote(sftp, remote)\n if (isDirectoryAttrs(stats)) {\n const entries = await readdirRemote(sftp, remote)\n for (const entry of entries) {\n if (entry.filename === '.' || entry.filename === '..') continue\n const child = remote === '/' ? `/${entry.filename}` : `${remote}/${entry.filename}`\n await rmRecurse(sftp, child)\n }\n await rmdirRemote(sftp, remote)\n return\n }\n await unlinkRemote(sftp, remote)\n}\n\nexport async function rmR(accessor: SSHAccessor, p: PathSpec): Promise<void> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n try {\n await rmRecurse(sftp, remote)\n } catch (err) {\n if (isNoSuchFile(err)) throw enoent(p)\n throw err\n }\n await invalidateAfterUnlink(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 specOf,\n statGeneric,\n statProvisionGeneric,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveGlob } from '../../../../core/ssh/glob.ts'\nimport { stat as sshStat } from '../../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nasync function statCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = paths.length > 0 ? await resolveGlob(accessor, paths) : []\n return statGeneric(resolved, opts, (p) => sshStat(accessor, p))\n}\n\nexport const SSH_STAT = command({\n name: 'stat',\n resource: ResourceName.SSH,\n spec: specOf('stat'),\n fn: statCommand,\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, headerAggregate, specOf, tailGeneric } from '@struktoai/mirage-core'\nimport { stream as sshStream } from '../../../../core/ssh/stream.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nexport const SSH_TAIL = command({\n name: 'tail',\n resource: ResourceName.SSH,\n spec: specOf('tail'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n tailGeneric(paths, texts, opts, (p) => sshStream(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 {\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 sshWrite } from '../../../core/ssh/write.ts'\nimport { exists as sshExists } from '../../../core/ssh/exists.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nconst ENC = new TextEncoder()\n\nasync function touchCommand(\n accessor: SSHAccessor,\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 sshExists(accessor, p))) {\n await sshWrite(accessor, p, new Uint8Array(0))\n }\n }\n return [null, new IOResult()]\n}\n\nexport const SSH_TOUCH = command({\n name: 'touch',\n resource: ResourceName.SSH,\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 type { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { joinRoot, stripPrefix } from './utils.ts'\n\nexport async function exists(accessor: SSHAccessor, p: PathSpec): Promise<boolean> {\n const sftp = await accessor.sftp()\n const remote = joinRoot(accessor.config.root ?? '/', stripPrefix(p))\n return new Promise<boolean>((resolveFn) => {\n sftp.exists(remote, (yes) => {\n resolveFn(yes)\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 {\n ResourceName,\n command,\n specOf,\n treeGeneric,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { resolveGlob } from '../../../core/ssh/glob.ts'\nimport { readdir as sshReaddir } from '../../../core/ssh/readdir.ts'\nimport { stat as sshStat } from '../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nasync function treeCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const resolved = await resolveGlob(accessor, paths)\n return treeGeneric(\n resolved,\n opts,\n (p) => sshReaddir(accessor, p),\n (p) => sshStat(accessor, p),\n )\n}\n\nexport const SSH_TREE = command({\n name: 'tree',\n resource: ResourceName.SSH,\n spec: specOf('tree'),\n fn: treeCommand,\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 sshStream } from '../../../../core/ssh/stream.ts'\nimport type { SSHAccessor } from '../../../../accessor/ssh.ts'\n\nexport const SSH_WC = command({\n name: 'wc',\n resource: ResourceName.SSH,\n spec: specOf('wc'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n wcGeneric(paths, texts, opts, (p) => sshStream(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, awkGeneric, command, specOf } from '@struktoai/mirage-core'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nexport const SSH_AWK = command({\n name: 'awk',\n resource: ResourceName.SSH,\n spec: specOf('awk'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n awkGeneric(paths, texts, opts, (p) => sshStream(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, base64Generic } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_BASE64 = command({\n name: 'base64',\n resource: ResourceName.SSH,\n spec: specOf('base64'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n base64Generic(paths, opts, (p) => sshStream(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, cmpGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_CMP = command({\n name: 'cmp',\n resource: ResourceName.SSH,\n spec: specOf('cmp'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n cmpGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_COLUMN = command({\n name: 'column',\n resource: ResourceName.SSH,\n spec: specOf('column'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n columnGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_COMM = command({\n name: 'comm',\n resource: ResourceName.SSH,\n spec: specOf('comm'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n commGeneric(paths, opts, (p) => sshStream(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, csplitGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_CSPLIT = command({\n name: 'csplit',\n resource: ResourceName.SSH,\n spec: specOf('csplit'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n csplitGeneric(\n paths,\n texts,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(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, cutGeneric, specOf } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_CUT = command({\n name: 'cut',\n resource: ResourceName.SSH,\n spec: specOf('cut'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n cutGeneric(paths, opts, (p) => sshStream(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 sshStream } from '../../../core/ssh/stream.ts'\nimport { readdir as sshReaddir } from '../../../core/ssh/readdir.ts'\nimport { stat as sshStat } from '../../../core/ssh/stat.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nexport const SSH_DIFF = command({\n name: 'diff',\n resource: ResourceName.SSH,\n spec: specOf('diff'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n diffGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p) => sshReaddir(accessor, p, opts.index ?? undefined),\n (p) => sshStat(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, expandGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_EXPAND = command({\n name: 'expand',\n resource: ResourceName.SSH,\n spec: specOf('expand'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n expandGeneric(paths, opts, (p) => sshStream(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 fmtGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nasync function fmtCommand(\n accessor: SSHAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n return fmtGeneric(paths, opts, (p) => sshStream(accessor, p))\n}\n\nexport const SSH_FMT = command({\n name: 'fmt',\n resource: ResourceName.SSH,\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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_FOLD = command({\n name: 'fold',\n resource: ResourceName.SSH,\n spec: specOf('fold'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n foldGeneric(paths, opts, (p) => sshStream(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, gunzipGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\nimport { unlink as sshUnlink } from '../../../core/ssh/unlink.ts'\n\nexport const SSH_GUNZIP = command({\n name: 'gunzip',\n resource: ResourceName.SSH,\n spec: specOf('gunzip'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n gunzipGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(accessor, p, d),\n (p) => sshUnlink(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, gzipGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\nimport { unlink as sshUnlink } from '../../../core/ssh/unlink.ts'\n\nexport const SSH_GZIP = command({\n name: 'gzip',\n resource: ResourceName.SSH,\n spec: specOf('gzip'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n gzipGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(accessor, p, d),\n (p) => sshUnlink(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, iconvGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_ICONV = command({\n name: 'iconv',\n resource: ResourceName.SSH,\n spec: specOf('iconv'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n iconvGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_JOIN = command({\n name: 'join',\n resource: ResourceName.SSH,\n spec: specOf('join'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n joinGeneric(paths, opts, (p) => sshStream(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 sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\nimport { exists as sshExists } from '../../../core/ssh/exists.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nconst ENC = new TextEncoder()\n\nasync function lnCommand(\n accessor: SSHAccessor,\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 sshExists(accessor, dest))) {\n return [null, new IOResult()]\n }\n const data = await materialize(sshStream(accessor, source))\n await sshWrite(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 SSH_LN = command({\n name: 'ln',\n resource: ResourceName.SSH,\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 { ResourceName, command, specOf, lookGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_LOOK = command({\n name: 'look',\n resource: ResourceName.SSH,\n spec: specOf('look'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n lookGeneric(paths, texts, opts, (p) => sshStream(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, md5Generic } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_MD5 = command({\n name: 'md5',\n resource: ResourceName.SSH,\n spec: specOf('md5'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n md5Generic(paths, opts, (p) => sshStream(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, mktempGeneric, specOf } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { mkdir as sshMkdir } from '../../../core/ssh/mkdir.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_MKTEMP = command({\n name: 'mktemp',\n resource: ResourceName.SSH,\n spec: specOf('mktemp'),\n fn: (accessor: SSHAccessor, _paths, texts, opts) =>\n mktempGeneric(\n texts,\n opts,\n (p, parents) => sshMkdir(accessor, p, parents ?? false),\n (p, d) => sshWrite(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, nlGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_NL = command({\n name: 'nl',\n resource: ResourceName.SSH,\n spec: specOf('nl'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n nlGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_PASTE = command({\n name: 'paste',\n resource: ResourceName.SSH,\n spec: specOf('paste'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n pasteGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_PATCH = command({\n name: 'patch',\n resource: ResourceName.SSH,\n spec: specOf('patch'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n patchGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(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 SSH_READLINK = command({\n name: 'readlink',\n resource: ResourceName.SSH,\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, specOf, revGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_REV = command({\n name: 'rev',\n resource: ResourceName.SSH,\n spec: specOf('rev'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n revGeneric(paths, opts, (p) => sshStream(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, makeSed } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_SED = makeSed<SSHAccessor>({\n resource: ResourceName.SSH,\n stream: (a, p) => sshStream(a, p),\n write: (a, p, d) => sshWrite(a, p, d),\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 sshStream } from '../../../core/ssh/stream.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nexport const SSH_SHA256SUM = command({\n name: 'sha256sum',\n resource: ResourceName.SSH,\n spec: specOf('sha256sum'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n sha256sumGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_SHUF = command({\n name: 'shuf',\n resource: ResourceName.SSH,\n spec: specOf('shuf'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n shufGeneric(paths, texts, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_SORT = command({\n name: 'sort',\n resource: ResourceName.SSH,\n spec: specOf('sort'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n sortGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_SPLIT = command({\n name: 'split',\n resource: ResourceName.SSH,\n spec: specOf('split'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n splitGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(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, stringsGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_STRINGS = command({\n name: 'strings',\n resource: ResourceName.SSH,\n spec: specOf('strings'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n stringsGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_TAC = command({\n name: 'tac',\n resource: ResourceName.SSH,\n spec: specOf('tac'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n tacGeneric(paths, opts, (p) => sshStream(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, tarGeneric } from '@struktoai/mirage-core'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\nimport { mkdir as sshMkdir } from '../../../core/ssh/mkdir.ts'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\n\nexport const SSH_TAR = command({\n name: 'tar',\n resource: ResourceName.SSH,\n spec: specOf('tar'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n tarGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, data) => sshWrite(accessor, p, data),\n (p) => sshMkdir(accessor, p, false),\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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_TEE = command({\n name: 'tee',\n resource: ResourceName.SSH,\n spec: specOf('tee'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n teeGeneric(\n paths,\n texts,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(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, trGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_TR = command({\n name: 'tr',\n resource: ResourceName.SSH,\n spec: specOf('tr'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n trGeneric(paths, texts, opts, (p) => sshStream(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, tsortGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_TSORT = command({\n name: 'tsort',\n resource: ResourceName.SSH,\n spec: specOf('tsort'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n tsortGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_UNEXPAND = command({\n name: 'unexpand',\n resource: ResourceName.SSH,\n spec: specOf('unexpand'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n unexpandGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_UNIQ = command({\n name: 'uniq',\n resource: ResourceName.SSH,\n spec: specOf('uniq'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n uniqGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\nimport { mkdir as sshMkdir } from '../../../core/ssh/mkdir.ts'\n\nexport const SSH_UNZIP = command({\n name: 'unzip',\n resource: ResourceName.SSH,\n spec: specOf('unzip'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n unzipGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(accessor, p, d),\n (p, parents) => sshMkdir(accessor, p, parents ?? false),\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, xxdGeneric } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_XXD = command({\n name: 'xxd',\n resource: ResourceName.SSH,\n spec: specOf('xxd'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n xxdGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_ZCAT = command({\n name: 'zcat',\n resource: ResourceName.SSH,\n spec: specOf('zcat'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n zcatGeneric(paths, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\n\nexport const SSH_ZGREP = command({\n name: 'zgrep',\n resource: ResourceName.SSH,\n spec: specOf('zgrep'),\n fn: (accessor: SSHAccessor, paths, texts, opts) =>\n zgrepGeneric(paths, texts, opts, (p) => sshStream(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 { SSHAccessor } from '../../../accessor/ssh.ts'\nimport { stream as sshStream } from '../../../core/ssh/stream.ts'\nimport { writeBytes as sshWrite } from '../../../core/ssh/write.ts'\n\nexport const SSH_ZIP = command({\n name: 'zip',\n resource: ResourceName.SSH,\n spec: specOf('zip'),\n fn: (accessor: SSHAccessor, paths, _texts, opts) =>\n zipGeneric(\n paths,\n opts,\n (p) => sshStream(accessor, p),\n (p, d) => sshWrite(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 { RegisteredCommand } from '@struktoai/mirage-core'\nimport { SSH_BASENAME } from './basename.ts'\nimport { SSH_CAT } from './cat/cat.ts'\nimport { SSH_CP } from './cp.ts'\nimport { SSH_DIRNAME } from './dirname.ts'\nimport { SSH_DU } from './du.ts'\nimport { SSH_FILE } from './file/file.ts'\nimport { SSH_FIND } from './find.ts'\nimport { SSH_GREP } from './grep/grep.ts'\nimport { SSH_HEAD } from './head/head.ts'\nimport { SSH_JQ } from './jq.ts'\nimport { SSH_LS } from './ls/ls.ts'\nimport { SSH_MKDIR } from './mkdir.ts'\nimport { SSH_MV } from './mv.ts'\nimport { SSH_REALPATH } from './realpath.ts'\nimport { SSH_RG } from './rg.ts'\nimport { SSH_RM } from './rm.ts'\nimport { SSH_STAT } from './stat/stat.ts'\nimport { SSH_TAIL } from './tail/tail.ts'\nimport { SSH_TOUCH } from './touch.ts'\nimport { SSH_TREE } from './tree.ts'\nimport { SSH_WC } from './wc/wc.ts'\nimport { SSH_AWK } from './awk.ts'\nimport { SSH_BASE64 } from './base64_cmd.ts'\nimport { SSH_CMP } from './cmp.ts'\nimport { SSH_COLUMN } from './column.ts'\nimport { SSH_COMM } from './comm.ts'\nimport { SSH_CSPLIT } from './csplit.ts'\nimport { SSH_CUT } from './cut.ts'\nimport { SSH_DIFF } from './diff.ts'\nimport { SSH_EXPAND } from './expand.ts'\nimport { SSH_FMT } from './fmt.ts'\nimport { SSH_FOLD } from './fold.ts'\nimport { SSH_GUNZIP } from './gunzip.ts'\nimport { SSH_GZIP } from './gzip.ts'\nimport { SSH_ICONV } from './iconv.ts'\nimport { SSH_JOIN } from './join.ts'\nimport { SSH_LN } from './ln.ts'\nimport { SSH_LOOK } from './look.ts'\nimport { SSH_MD5 } from './md5.ts'\nimport { SSH_MKTEMP } from './mktemp.ts'\nimport { SSH_NL } from './nl.ts'\nimport { SSH_PASTE } from './paste.ts'\nimport { SSH_PATCH } from './patch.ts'\nimport { SSH_READLINK } from './readlink.ts'\nimport { SSH_REV } from './rev.ts'\nimport { SSH_SED } from './sed.ts'\nimport { SSH_SHA256SUM } from './sha256sum.ts'\nimport { SSH_SHUF } from './shuf.ts'\nimport { SSH_SORT } from './sort.ts'\nimport { SSH_SPLIT } from './split.ts'\nimport { SSH_STRINGS } from './strings.ts'\nimport { SSH_TAC } from './tac.ts'\nimport { SSH_TAR } from './tar.ts'\nimport { SSH_TEE } from './tee.ts'\nimport { SSH_TR } from './tr.ts'\nimport { SSH_TSORT } from './tsort.ts'\nimport { SSH_UNEXPAND } from './unexpand.ts'\nimport { SSH_UNIQ } from './uniq.ts'\nimport { SSH_UNZIP } from './unzip.ts'\nimport { SSH_XXD } from './xxd.ts'\nimport { SSH_ZCAT } from './zcat.ts'\nimport { SSH_ZGREP } from './zgrep.ts'\nimport { SSH_ZIP } from './zip_cmd.ts'\n\nexport const SSH_COMMANDS: readonly RegisteredCommand[] = [\n ...SSH_LS,\n ...SSH_TREE,\n ...SSH_CAT,\n ...SSH_HEAD,\n ...SSH_TAIL,\n ...SSH_WC,\n ...SSH_FIND,\n ...SSH_GREP,\n ...SSH_RG,\n ...SSH_STAT,\n ...SSH_JQ,\n ...SSH_DU,\n ...SSH_FILE,\n ...SSH_BASENAME,\n ...SSH_DIRNAME,\n ...SSH_REALPATH,\n ...SSH_CP,\n ...SSH_MV,\n ...SSH_RM,\n ...SSH_MKDIR,\n ...SSH_TOUCH,\n ...SSH_AWK,\n ...SSH_BASE64,\n ...SSH_CMP,\n ...SSH_COLUMN,\n ...SSH_COMM,\n ...SSH_CSPLIT,\n ...SSH_CUT,\n ...SSH_DIFF,\n ...SSH_EXPAND,\n ...SSH_FMT,\n ...SSH_FOLD,\n ...SSH_GUNZIP,\n ...SSH_GZIP,\n ...SSH_ICONV,\n ...SSH_JOIN,\n ...SSH_LN,\n ...SSH_LOOK,\n ...SSH_MD5,\n ...SSH_MKTEMP,\n ...SSH_NL,\n ...SSH_PASTE,\n ...SSH_PATCH,\n ...SSH_READLINK,\n ...SSH_REV,\n ...SSH_SED,\n ...SSH_SHA256SUM,\n ...SSH_SHUF,\n ...SSH_SORT,\n ...SSH_SPLIT,\n ...SSH_STRINGS,\n ...SSH_TAC,\n ...SSH_TAR,\n ...SSH_TEE,\n ...SSH_TR,\n ...SSH_TSORT,\n ...SSH_UNEXPAND,\n ...SSH_UNIQ,\n ...SSH_UNZIP,\n ...SSH_XXD,\n ...SSH_ZCAT,\n ...SSH_ZGREP,\n ...SSH_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 { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { joinRoot, stripPrefix } from './utils.ts'\n\nexport async function appendBytes(\n accessor: SSHAccessor,\n p: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const sftp = await accessor.sftp()\n const virtual = stripPrefix(p)\n const remote = joinRoot(accessor.config.root ?? '/', virtual)\n await new Promise<void>((resolveFn, rejectFn) => {\n sftp.appendFile(remote, Buffer.from(data), (err) => {\n if (err) rejectFn(err)\n else resolveFn()\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 type { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { writeBytes } from './write.ts'\n\nexport function create(accessor: SSHAccessor, 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 { PathSpec } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { read } from './read.ts'\nimport { writeBytes } from './write.ts'\n\nexport async function truncate(accessor: SSHAccessor, p: PathSpec, length: number): Promise<void> {\n let data: Uint8Array\n try {\n data = await read(accessor, p)\n } catch (err) {\n if ((err as { code?: string }).code === 'ENOENT') {\n data = new Uint8Array(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 writeBytes(accessor, p, 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 type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { appendBytes as coreAppend } from '../../core/ssh/append.ts'\n\nexport const appendOp: RegisteredOp = {\n name: 'append',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { create as coreCreate } from '../../core/ssh/create.ts'\n\nexport const createOp: RegisteredOp = {\n name: 'create',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { mkdir as coreMkdir } from '../../core/ssh/mkdir.ts'\n\nexport const mkdirOp: RegisteredOp = {\n name: 'mkdir',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { read as coreRead } from '../../core/ssh/read.ts'\n\nexport const readOp: RegisteredOp = {\n name: 'read',\n resource: ResourceName.SSH,\n filetype: null,\n write: false,\n fn: (accessor: SSHAccessor, 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 type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { SSHAccessor } from '../../accessor/ssh.ts'\nimport { readdir as coreReaddir } from '../../core/ssh/readdir.ts'\n\nexport const readdirOp: RegisteredOp = {\n name: 'readdir',\n resource: ResourceName.SSH,\n filetype: null,\n write: false,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { rename as coreRename } from '../../core/ssh/rename.ts'\n\nexport const renameOp: RegisteredOp = {\n name: 'rename',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { rmdir as coreRmdir } from '../../core/ssh/rmdir.ts'\n\nexport const rmdirOp: RegisteredOp = {\n name: 'rmdir',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { stat as coreStat } from '../../core/ssh/stat.ts'\n\nexport const statOp: RegisteredOp = {\n name: 'stat',\n resource: ResourceName.SSH,\n filetype: null,\n write: false,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { truncate as coreTruncate } from '../../core/ssh/truncate.ts'\n\nexport const truncateOp: RegisteredOp = {\n name: 'truncate',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { unlink as coreUnlink } from '../../core/ssh/unlink.ts'\n\nexport const unlinkOp: RegisteredOp = {\n name: 'unlink',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { SSHAccessor } from '../../accessor/ssh.ts'\nimport { writeBytes } from '../../core/ssh/write.ts'\n\nexport const writeOp: RegisteredOp = {\n name: 'write',\n resource: ResourceName.SSH,\n filetype: null,\n write: true,\n fn: (accessor: SSHAccessor, 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 { 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 SSH_OPS: readonly RegisteredOp[] = [\n appendOp,\n createOp,\n mkdirOp,\n readOp,\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 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 SSH_PROMPT = `{prefix}\n Remote filesystem via SSH/SFTP.\n IMPORTANT: This is a remote mount. Prefer targeted reads over full scans.\n Supports: ls, cat, head, tail, grep, rg, wc, find, tree, stat, mkdir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,KAAK;AAAA,MACX,QAAQ,gBAAgB,KAAK,MAAM;AAAA,IACrC;AAAA,EACF;AAAA,EAEA,UAAU,QAAyC;AACjD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":["PathSpec","ResourceName","ResourceName","command","specOf","enoent","enoent","enoent","rstripSlash","command","ResourceName","specOf","ResourceName","command","specOf","enoent","enoent","command","ResourceName","specOf","ResourceName","command","specOf","ResourceName","command","specOf","norm","readRemoteDir","statRemote","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","stat","readdir","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","invalidateAfterWrite","enoent","stripSlash","statRemote","invalidateAfterWrite","IOResult","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","invalidateAfterWrite","enoent","enoent","invalidateAfterWrite","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","stat","readdir","command","ResourceName","specOf","FileType","IOResult","ResourceName","command","specOf","enoent","invalidateAfterUnlink","enoent","invalidateAfterUnlink","invalidateAfterUnlink","enoent","enoent","invalidateAfterUnlink","enoent","invalidateAfterUnlink","statRemote","enoent","invalidateAfterUnlink","IOResult","FileType","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","headerAggregate","specOf","command","ResourceName","specOf","headerAggregate","IOResult","ResourceName","command","specOf","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","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","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","ENC","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","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","ResourceName","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","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","specOf","command","ResourceName","specOf","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","PathSpec"]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XHCBHYN4.js";
|
|
5
5
|
import {
|
|
6
6
|
S3Resource
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TA3WMOMU.js";
|
|
8
8
|
|
|
9
9
|
// src/resource/backblaze/backblaze.ts
|
|
10
10
|
import {
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
BACKBLAZE_PROMPT,
|
|
55
55
|
BackblazeResource
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-X3G37FXT.js.map
|