@poe-platform/safe-bash 0.1.788 → 0.1.790

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +1 -1
  2. package/dist/image-ast/index.browser.js +147 -80
  3. package/dist/image-ast/index.js +147 -80
  4. package/dist/mp4-ast/mp4.d.ts +2 -0
  5. package/dist/pdf-ast/cos/parser.d.ts +1 -0
  6. package/dist/pdf-ast/cos/security.d.ts +2 -0
  7. package/dist/pdf-ast/cos/writer.d.ts +1 -0
  8. package/dist/pdf-ast/document.d.ts +3 -0
  9. package/dist/pdf-ast/edit/forms.d.ts +1 -0
  10. package/dist/pdf-ast/index.js +171 -82
  11. package/dist/safe-bash/chunks/{chunk-L5QQLNTO.js → chunk-22PI65AH.js} +2 -2
  12. package/dist/safe-bash/chunks/{chunk-Q3E6C3DX.js → chunk-2TAGYMPK.js} +49 -34
  13. package/dist/safe-bash/chunks/{chunk-Z3HX3ZBA.js → chunk-2W4HTMEK.js} +52 -48
  14. package/dist/safe-bash/chunks/{chunk-FFZXP6ZC.js → chunk-3M7L7XU2.js} +2 -2
  15. package/dist/safe-bash/chunks/{chunk-XNODZRVD.js → chunk-3QAO6UYS.js} +2 -2
  16. package/dist/safe-bash/chunks/{chunk-YPETOVQU.js → chunk-3VKFK3NF.js} +2 -2
  17. package/dist/safe-bash/chunks/chunk-5OST7NOX.js +42 -0
  18. package/dist/safe-bash/chunks/{chunk-KEBSX2AX.js → chunk-6HLURHVU.js} +2 -2
  19. package/dist/safe-bash/chunks/chunk-DYEUZE6Z.js +19 -0
  20. package/dist/safe-bash/chunks/{chunk-T2TGCHKE.js → chunk-FM3WBSZT.js} +2 -2
  21. package/dist/safe-bash/chunks/chunk-GAYRKQM6.js +22 -0
  22. package/dist/safe-bash/chunks/{chunk-Q45QCA4J.js → chunk-I3KSESCR.js} +0 -7
  23. package/dist/safe-bash/chunks/{chunk-OSKDIBQS.js → chunk-JLIMK5TD.js} +1 -1
  24. package/dist/safe-bash/chunks/{chunk-2AYZCT5X.js → chunk-JQ2FAJJT.js} +27 -23
  25. package/dist/safe-bash/chunks/{chunk-QA3NVP43.js → chunk-JRE6Z3T7.js} +2 -2
  26. package/dist/safe-bash/chunks/{chunk-DC5EHLKS.js → chunk-NDIL6T7Y.js} +5 -5
  27. package/dist/safe-bash/chunks/{chunk-747G42FY.js → chunk-OPR4UAIT.js} +2 -2
  28. package/dist/safe-bash/chunks/chunk-OSMQCYSP.js +19 -0
  29. package/dist/safe-bash/chunks/chunk-OYB332PQ.js +17 -0
  30. package/dist/safe-bash/chunks/{chunk-ZMYVCRAF.js → chunk-QTIH2AFE.js} +77 -69
  31. package/dist/safe-bash/chunks/{chunk-PYTLIUST.js → chunk-SBESXWT2.js} +43 -44
  32. package/dist/safe-bash/chunks/{chunk-4FDQJUFW.js → chunk-SDEPGTOF.js} +1 -1
  33. package/dist/safe-bash/chunks/chunk-UZU5BIJI.js +32 -0
  34. package/dist/safe-bash/chunks/{chunk-BI6JV62X.js → chunk-VCCMROTL.js} +7 -10
  35. package/dist/safe-bash/chunks/chunk-W47GHRRF.js +13 -0
  36. package/dist/safe-bash/chunks/{chunk-NPMQWZUZ.js → chunk-WS7KZIUM.js} +2 -2
  37. package/dist/safe-bash/chunks/{chunk-3PZYHMGM.js → chunk-YYAERCWS.js} +7 -7
  38. package/dist/safe-bash/chunks/{chunk-5U7JECDB.js → chunk-ZPGVEUKF.js} +8 -7
  39. package/dist/safe-bash/chunks/{csvkit-K55OYAQC.js → csvkit-USUJG62I.js} +65 -11
  40. package/dist/safe-bash/chunks/{ffmpeg-BEFTQ6DZ.js → ffmpeg-KRGG5DLH.js} +21 -10
  41. package/dist/safe-bash/chunks/{gh-HQWOWLWE.js → gh-UCFDUZCX.js} +16 -8
  42. package/dist/safe-bash/chunks/{git-UFNPAOYZ.js → git-LPAF6KDG.js} +7 -9
  43. package/dist/safe-bash/chunks/{imagemagick-53BMHH6D.js → imagemagick-KGREKK4G.js} +38 -7
  44. package/dist/safe-bash/chunks/{implementation-QUTAAYMT.js → implementation-FXDRYS5A.js} +34 -8
  45. package/dist/safe-bash/chunks/{pdfimages-4OYI6FLG.js → pdfimages-UADCF4G4.js} +12 -8
  46. package/dist/safe-bash/chunks/{pdfinfo-I7U6TQPP.js → pdfinfo-O7UWPF4W.js} +38 -13
  47. package/dist/safe-bash/chunks/{pdftk-SUA6FMHI.js → pdftk-AERXIJTN.js} +13 -8
  48. package/dist/safe-bash/chunks/{pdftoppm-4C5DGEWX.js → pdftoppm-L466JQKI.js} +17 -10
  49. package/dist/safe-bash/chunks/{pdftotext-Y4WI225Y.js → pdftotext-SUSI4WXS.js} +19 -9
  50. package/dist/safe-bash/chunks/{qpdf-IORB4RV5.js → qpdf-YL24KVRH.js} +14 -8
  51. package/dist/safe-bash/chunks/{sips-WHAMJFEU.js → sips-QXEQZERX.js} +14 -7
  52. package/dist/safe-bash/chunks/{soffice-SYEK6WJS.js → soffice-TBITRML3.js} +16 -8
  53. package/dist/safe-bash/chunks/{wkhtmltopdf-ZIICWJLF.js → wkhtmltopdf-NJA2THRC.js} +27 -7
  54. package/dist/safe-bash/command-chunks/chunk-2C5BEBPY.js +1388 -0
  55. package/dist/safe-bash/command-chunks/{chunk-FXYWQ6S4.js → chunk-2EXV2ZLV.js} +2 -2
  56. package/dist/safe-bash/command-chunks/{chunk-PFBJR2PY.js → chunk-2KRKKW5S.js} +2 -2
  57. package/dist/safe-bash/command-chunks/{chunk-4DSJDVBM.js → chunk-32F3RBUW.js} +10 -749
  58. package/dist/safe-bash/command-chunks/{chunk-L3MLMXL4.js → chunk-3ZK5F23O.js} +1 -1
  59. package/dist/safe-bash/command-chunks/{chunk-4QX6XCDD.js → chunk-4RNIZ3RT.js} +79 -0
  60. package/dist/safe-bash/command-chunks/{chunk-D7TADAYG.js → chunk-64LG3EVJ.js} +17 -0
  61. package/dist/safe-bash/command-chunks/{chunk-TOSM3T3A.js → chunk-6EASC5EC.js} +20 -9
  62. package/dist/safe-bash/command-chunks/{chunk-ZF3ZVGQC.js → chunk-7JRITHKW.js} +150 -80
  63. package/dist/safe-bash/command-chunks/{chunk-IJ3FXP4Q.js → chunk-A3ZX6SCY.js} +1 -1
  64. package/dist/safe-bash/{chunks/chunk-LD76P7AG.js → command-chunks/chunk-AKDMCNX4.js} +74 -39
  65. package/dist/safe-bash/command-chunks/{chunk-KSIGF4AG.js → chunk-BK4CMEE6.js} +1 -1
  66. package/dist/safe-bash/command-chunks/{chunk-JUDOV5MJ.js → chunk-CBDVLMJB.js} +1 -1
  67. package/dist/safe-bash/command-chunks/{chunk-XGMWWUHV.js → chunk-CZ5DAK4K.js} +1 -1
  68. package/dist/safe-bash/command-chunks/{chunk-Z57TV6TC.js → chunk-EZ2DTOLI.js} +4 -2
  69. package/dist/safe-bash/command-chunks/{chunk-ADCGH6A7.js → chunk-FH3D75FC.js} +1 -1
  70. package/dist/safe-bash/command-chunks/{chunk-WYJTWJZ5.js → chunk-G3G6W5ZE.js} +1 -1
  71. package/dist/safe-bash/command-chunks/{chunk-3HDIDEUJ.js → chunk-GF54KE2M.js} +1 -1
  72. package/dist/safe-bash/command-chunks/chunk-H4LWTITX.js +169 -0
  73. package/dist/safe-bash/command-chunks/chunk-I2MQNBGR.js +145 -0
  74. package/dist/safe-bash/command-chunks/{chunk-Z7TYZG3A.js → chunk-IHHTTQX6.js} +5 -3
  75. package/dist/safe-bash/command-chunks/{chunk-5GRLAARV.js → chunk-IOXI5ZAJ.js} +1 -1
  76. package/dist/safe-bash/command-chunks/{chunk-INDIFLBW.js → chunk-JTAGNROA.js} +4 -0
  77. package/dist/safe-bash/command-chunks/{chunk-Y5IHIAY3.js → chunk-MDPIOQUD.js} +12 -8
  78. package/dist/safe-bash/command-chunks/chunk-PGEYORBZ.js +25 -0
  79. package/dist/safe-bash/command-chunks/chunk-QI4MGIN6.js +6 -0
  80. package/dist/safe-bash/command-chunks/chunk-QM4UZF3C.js +753 -0
  81. package/dist/safe-bash/command-chunks/chunk-QTYZAWSB.js +91 -0
  82. package/dist/safe-bash/command-chunks/chunk-SNK7K3XW.js +90 -0
  83. package/dist/safe-bash/command-chunks/chunk-T5OLGM43.js +314 -0
  84. package/dist/safe-bash/command-chunks/chunk-TB7IFMUZ.js +802 -0
  85. package/dist/safe-bash/command-chunks/{chunk-YNT4ZJHW.js → chunk-TPPBPIWL.js} +3 -3
  86. package/dist/safe-bash/command-chunks/chunk-VMK4XVKO.js +82 -0
  87. package/dist/safe-bash/command-chunks/chunk-VNSJKXDU.js +130 -0
  88. package/dist/safe-bash/command-chunks/{chunk-2LP3VMPA.js → chunk-WFDW4XXD.js} +1 -17
  89. package/dist/safe-bash/command-chunks/chunk-WR37IS4O.js +318 -0
  90. package/dist/safe-bash/command-chunks/chunk-YFNTMH6Z.js +6 -0
  91. package/dist/safe-bash/commands/basic.js +148 -48
  92. package/dist/safe-bash/commands/bytes/compression/index.js +5 -6
  93. package/dist/safe-bash/commands/cmp.d.ts +2 -3
  94. package/dist/safe-bash/commands/cmp.js +2 -689
  95. package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
  96. package/dist/safe-bash/commands/docx/index.browser.js +4 -47
  97. package/dist/safe-bash/commands/docx/index.d.ts +2 -24
  98. package/dist/safe-bash/commands/docx/index.js +2 -41
  99. package/dist/safe-bash/commands/docx/io.d.ts +1 -14
  100. package/dist/safe-bash/commands/docx/io.js +1 -15
  101. package/dist/safe-bash/commands/factor/index.browser.js +2 -2
  102. package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
  103. package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
  104. package/dist/safe-bash/commands/iconv/index.browser.js +2 -2
  105. package/dist/safe-bash/commands/line-endings/index.browser.js +2 -2
  106. package/dist/safe-bash/commands/llm/command.d.ts +1 -4
  107. package/dist/safe-bash/commands/llm/command.js +1 -248
  108. package/dist/safe-bash/commands/llm/elevenlabs-stream.d.ts +1 -2
  109. package/dist/safe-bash/commands/llm/elevenlabs-stream.js +1 -117
  110. package/dist/safe-bash/commands/llm/elevenlabs.d.ts +1 -15
  111. package/dist/safe-bash/commands/llm/elevenlabs.js +1 -123
  112. package/dist/safe-bash/commands/llm/index.browser.js +20 -15
  113. package/dist/safe-bash/commands/llm/index.d.ts +1 -6
  114. package/dist/safe-bash/commands/llm/index.js +1 -4
  115. package/dist/safe-bash/commands/llm/mime.d.ts +1 -2
  116. package/dist/safe-bash/commands/llm/mime.js +1 -136
  117. package/dist/safe-bash/commands/llm/openai-http.d.ts +1 -8
  118. package/dist/safe-bash/commands/llm/openai-http.js +1 -143
  119. package/dist/safe-bash/commands/llm/openai-sse.d.ts +1 -3
  120. package/dist/safe-bash/commands/llm/openai-sse.js +1 -78
  121. package/dist/safe-bash/commands/llm/openai.d.ts +1 -14
  122. package/dist/safe-bash/commands/llm/openai.js +1 -288
  123. package/dist/safe-bash/commands/llm/providers/elevenlabs.d.ts +1 -1
  124. package/dist/safe-bash/commands/llm/providers/elevenlabs.js +1 -1
  125. package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -6
  126. package/dist/safe-bash/commands/llm/providers/index.d.ts +1 -3
  127. package/dist/safe-bash/commands/llm/providers/index.js +1 -2
  128. package/dist/safe-bash/commands/llm/providers/openai.d.ts +1 -1
  129. package/dist/safe-bash/commands/llm/providers/openai.js +1 -1
  130. package/dist/safe-bash/commands/llm/providers/shared.d.ts +1 -23
  131. package/dist/safe-bash/commands/llm/providers/shared.js +1 -65
  132. package/dist/safe-bash/commands/llm/service.d.ts +1 -37
  133. package/dist/safe-bash/commands/llm/service.js +1 -151
  134. package/dist/safe-bash/commands/llm/types.d.ts +1 -52
  135. package/dist/safe-bash/commands/llm/types.js +1 -1
  136. package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
  137. package/dist/safe-bash/commands/media/index.browser.js +1 -1
  138. package/dist/safe-bash/commands/network/index.browser.js +9 -9
  139. package/dist/safe-bash/commands/network/types.d.ts +2 -40
  140. package/dist/safe-bash/commands/node/index.browser.js +6 -8
  141. package/dist/safe-bash/commands/op/index.browser.js +3 -3
  142. package/dist/safe-bash/commands/op/index.js +12 -28
  143. package/dist/safe-bash/commands/pptx/index.d.ts +2 -28
  144. package/dist/safe-bash/commands/pptx/index.js +2 -152
  145. package/dist/safe-bash/commands/pr/index.browser.js +2 -2
  146. package/dist/safe-bash/commands/printf-float.d.ts +1 -0
  147. package/dist/safe-bash/commands/printf-float.js +48 -38
  148. package/dist/safe-bash/commands/printf-format.js +9 -6
  149. package/dist/safe-bash/commands/printf-quote.d.ts +3 -0
  150. package/dist/safe-bash/commands/printf-quote.js +62 -0
  151. package/dist/safe-bash/commands/printf-wide.d.ts +5 -0
  152. package/dist/safe-bash/commands/printf-wide.js +41 -0
  153. package/dist/safe-bash/commands/python/index.browser.js +8 -8
  154. package/dist/safe-bash/commands/python/worker.browser.js +2 -2
  155. package/dist/safe-bash/commands/truncate.d.ts +2 -3
  156. package/dist/safe-bash/commands/truncate.js +2 -686
  157. package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
  158. package/dist/safe-bash/commands/xml/index.browser.js +2 -2
  159. package/dist/safe-bash/commands/yq/index.browser.js +3 -3
  160. package/dist/safe-bash/contracts/diagnostics.d.ts +2 -0
  161. package/dist/safe-bash/contracts/diagnostics.js +2 -0
  162. package/dist/safe-bash/contracts/runtime-control.d.ts +2 -0
  163. package/dist/safe-bash/contracts/runtime-control.js +2 -0
  164. package/dist/safe-bash/core.browser.d.ts +1 -1
  165. package/dist/safe-bash/core.browser.js +10645 -14065
  166. package/dist/safe-bash/core.d.ts +10 -1
  167. package/dist/safe-bash/core.js +0 -1
  168. package/dist/safe-bash/jobs.browser.js +5 -4
  169. package/dist/safe-bash/opt-in/commands/cmp/index.d.ts +6 -2
  170. package/dist/safe-bash/opt-in/commands/cmp/index.js +776 -79
  171. package/dist/safe-bash/opt-in/commands/cmp/options.d.ts +0 -12
  172. package/dist/safe-bash/opt-in/commands/cmp/options.js +0 -153
  173. package/dist/safe-bash/opt-in/commands/truncate/index.d.ts +8 -3
  174. package/dist/safe-bash/opt-in/commands/truncate/index.js +790 -272
  175. package/dist/safe-bash/opt-in/commands/truncate/sync.d.ts +1 -0
  176. package/dist/safe-bash/opt-in/commands/truncate/sync.js +60 -0
  177. package/dist/safe-bash/optional-host.browser.js +61 -80
  178. package/dist/safe-bash/optional-host.d.ts +3 -1
  179. package/dist/safe-bash/optional-host.js +3 -1
  180. package/dist/safe-bash/shell/runtime.js +44 -18
  181. package/dist/safe-bash/yq-browser/index.js +1 -1
  182. package/dist/safe-bash-checksum-engine/index.d.ts +1 -1
  183. package/dist/safe-bash-checksum-engine/index.js +14 -2
  184. package/dist/safe-bash-command-bzip2/index.js +2 -1
  185. package/dist/safe-bash-command-cmp/index.d.ts +10 -0
  186. package/dist/safe-bash-command-cmp/index.js +796 -0
  187. package/dist/safe-bash-command-cmp/options.d.ts +12 -0
  188. package/dist/safe-bash-command-cmp/options.js +42 -0
  189. package/dist/safe-bash-command-csvcut/index.js +11 -8
  190. package/dist/safe-bash-command-csvgrep/index.js +35 -7
  191. package/dist/safe-bash-command-csvkit/codecs/python.js +4 -3
  192. package/dist/safe-bash-command-csvkit/codecs/utf8.js +3 -2
  193. package/dist/safe-bash-command-csvkit/index.js +80 -324
  194. package/dist/safe-bash-command-csvkit/python-regex.d.ts +5 -0
  195. package/dist/safe-bash-command-csvkit/python-regex.js +14 -0
  196. package/dist/safe-bash-command-csvkit/runtime.d.ts +1 -0
  197. package/dist/safe-bash-command-csvkit/sync-support.js +4 -2
  198. package/dist/safe-bash-command-diff3/index.js +3 -0
  199. package/dist/safe-bash-command-docx/LICENSE +21 -0
  200. package/dist/safe-bash-command-docx/index.d.ts +30 -0
  201. package/dist/safe-bash-command-docx/index.js +67 -0
  202. package/dist/safe-bash-command-docx/io.d.ts +14 -0
  203. package/dist/safe-bash-command-docx/io.js +26 -0
  204. package/dist/safe-bash-command-envsubst/index.js +34 -3
  205. package/dist/safe-bash-command-exiftool/index.js +3 -0
  206. package/dist/safe-bash-command-ffmpeg/index.js +8073 -7940
  207. package/dist/safe-bash-command-fold/family.js +1 -1
  208. package/dist/safe-bash-command-fold/index.js +1 -1
  209. package/dist/safe-bash-command-git/git_rust.wasm +0 -0
  210. package/dist/safe-bash-command-git/wasm.generated.js +1 -1
  211. package/dist/safe-bash-command-htmlq/index.js +5 -0
  212. package/dist/safe-bash-command-imagemagick/index.d.ts +25 -21
  213. package/dist/safe-bash-command-imagemagick/index.js +671 -273
  214. package/dist/safe-bash-command-llm/LICENSE +21 -0
  215. package/dist/safe-bash-command-llm/command.d.ts +5 -0
  216. package/dist/safe-bash-command-llm/command.js +14 -0
  217. package/dist/safe-bash-command-llm/configuration.d.ts +18 -0
  218. package/dist/safe-bash-command-llm/elevenlabs-stream.d.ts +2 -0
  219. package/dist/safe-bash-command-llm/elevenlabs-stream.js +7 -0
  220. package/dist/safe-bash-command-llm/elevenlabs.d.ts +15 -0
  221. package/dist/safe-bash-command-llm/elevenlabs.js +10 -0
  222. package/dist/safe-bash-command-llm/index.d.ts +10 -0
  223. package/dist/safe-bash-command-llm/index.js +46 -0
  224. package/dist/safe-bash-command-llm/mime.d.ts +2 -0
  225. package/dist/safe-bash-command-llm/mime.js +9 -0
  226. package/dist/safe-bash-command-llm/model-options.d.ts +3 -0
  227. package/dist/safe-bash-command-llm/openai-http.d.ts +8 -0
  228. package/dist/safe-bash-command-llm/openai-http.js +17 -0
  229. package/dist/safe-bash-command-llm/openai-sse.d.ts +3 -0
  230. package/dist/safe-bash-command-llm/openai-sse.js +8 -0
  231. package/dist/safe-bash-command-llm/openai.d.ts +14 -0
  232. package/dist/safe-bash-command-llm/openai.js +12 -0
  233. package/dist/safe-bash-command-llm/providers/elevenlabs.d.ts +1 -0
  234. package/dist/safe-bash-command-llm/providers/elevenlabs.js +11 -0
  235. package/dist/safe-bash-command-llm/providers/index.d.ts +3 -0
  236. package/dist/safe-bash-command-llm/providers/index.js +24 -0
  237. package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -0
  238. package/dist/safe-bash-command-llm/providers/openai.js +13 -0
  239. package/dist/safe-bash-command-llm/providers/shared.d.ts +23 -0
  240. package/dist/safe-bash-command-llm/providers/shared.js +13 -0
  241. package/dist/safe-bash-command-llm/schemas.d.ts +2 -0
  242. package/dist/safe-bash-command-llm/service.d.ts +42 -0
  243. package/dist/safe-bash-command-llm/service.js +9 -0
  244. package/dist/safe-bash-command-llm/templates.d.ts +27 -0
  245. package/dist/safe-bash-command-llm/types.d.ts +87 -0
  246. package/dist/safe-bash-command-llm/types.js +6 -0
  247. package/dist/safe-bash-command-mmdc/command.d.ts +4 -0
  248. package/dist/safe-bash-command-mmdc/index.d.ts +1 -1
  249. package/dist/safe-bash-command-mmdc/index.js +7134 -6699
  250. package/dist/safe-bash-command-mmdc/layout.d.ts +1 -0
  251. package/dist/safe-bash-command-mmdc/parser.d.ts +1 -0
  252. package/dist/safe-bash-command-mmdc/png.d.ts +3 -0
  253. package/dist/safe-bash-command-mmdc/raster.d.ts +1 -0
  254. package/dist/safe-bash-command-mmdc/svg.d.ts +1 -0
  255. package/dist/safe-bash-command-op/index.js +19 -14
  256. package/dist/safe-bash-command-pandoc/command.js +3 -3
  257. package/dist/safe-bash-command-pandoc/index.js +3 -3
  258. package/dist/safe-bash-command-pdfimages/index.d.ts +7 -1
  259. package/dist/safe-bash-command-pdfimages/index.js +210 -113
  260. package/dist/safe-bash-command-pdfinfo/index.d.ts +24 -20
  261. package/dist/safe-bash-command-pdfinfo/index.js +517 -241
  262. package/dist/safe-bash-command-pdftk/index.d.ts +7 -3
  263. package/dist/safe-bash-command-pdftk/index.js +261 -125
  264. package/dist/safe-bash-command-pdftoppm/index.d.ts +15 -7
  265. package/dist/safe-bash-command-pdftoppm/index.js +326 -189
  266. package/dist/safe-bash-command-pdftotext/index.d.ts +9 -5
  267. package/dist/safe-bash-command-pdftotext/index.js +237 -107
  268. package/dist/safe-bash-command-pptx/LICENSE +21 -0
  269. package/dist/safe-bash-command-pptx/index.d.ts +33 -0
  270. package/dist/safe-bash-command-pptx/index.js +168 -0
  271. package/dist/safe-bash-command-qpdf/index.d.ts +9 -3
  272. package/dist/safe-bash-command-qpdf/index.js +254 -130
  273. package/dist/safe-bash-command-sha512sum/index.js +12 -475
  274. package/dist/safe-bash-command-sips/index.d.ts +9 -5
  275. package/dist/safe-bash-command-sips/index.js +65 -46
  276. package/dist/safe-bash-command-soffice/index.d.ts +9 -3
  277. package/dist/safe-bash-command-soffice/index.js +66 -25
  278. package/dist/safe-bash-command-sqlite3/engine.d.ts +9 -0
  279. package/dist/safe-bash-command-sqlite3/index.d.ts +1 -0
  280. package/dist/safe-bash-command-sqlite3/index.js +851 -352
  281. package/dist/safe-bash-command-ssconvert/formats/xls.js +3 -3
  282. package/dist/safe-bash-command-ssconvert/index.js +147 -80
  283. package/dist/safe-bash-command-timeout/index.js +3 -3
  284. package/dist/safe-bash-command-truncate/index.d.ts +8 -3
  285. package/dist/safe-bash-command-truncate/index.js +790 -272
  286. package/dist/safe-bash-command-truncate/sync.d.ts +1 -0
  287. package/dist/safe-bash-command-truncate/sync.js +60 -0
  288. package/dist/safe-bash-command-wkhtmltopdf/index.js +239 -118
  289. package/dist/safe-bash-command-wkhtmltopdf/pdf-renderer.d.ts +1 -1
  290. package/dist/safe-bash-command-xxd/index.js +78 -20
  291. package/dist/safe-bash-command-xz/command.d.ts +4 -0
  292. package/dist/safe-bash-command-xz/index.d.ts +1 -1
  293. package/dist/safe-bash-command-xz/index.js +1 -1
  294. package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
  295. package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
  296. package/dist/safe-bash-compression-engine/files.js +6 -6
  297. package/dist/safe-bash-compression-engine/index.js +5 -5
  298. package/dist/safe-bash-compression-engine/operand.js +6 -6
  299. package/dist/safe-bash-compression-engine/stream.js +5 -5
  300. package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
  301. package/dist/safe-bash-contracts/command.js +3 -3
  302. package/dist/safe-bash-contracts/default-executor.d.ts +5 -0
  303. package/dist/safe-bash-contracts/default-executor.js +37 -0
  304. package/dist/safe-bash-contracts/diagnostics.js +3 -3
  305. package/dist/safe-bash-contracts/escaping.js +9 -9
  306. package/dist/safe-bash-contracts/filesystem-descriptor.js +3 -3
  307. package/dist/safe-bash-contracts/filesystem-output.js +8 -8
  308. package/dist/safe-bash-contracts/http.d.ts +41 -0
  309. package/dist/safe-bash-contracts/http.js +6 -0
  310. package/dist/safe-bash-contracts/index.js +21 -19
  311. package/dist/safe-bash-contracts/io.d.ts +12 -0
  312. package/dist/safe-bash-contracts/io.js +4 -1
  313. package/dist/safe-bash-contracts/output.js +3 -2
  314. package/dist/safe-bash-contracts/runtime-control.js +2 -2
  315. package/dist/safe-bash-contracts/signals.js +1 -1
  316. package/dist/safe-bash-contracts/yield.d.ts +1 -0
  317. package/dist/safe-bash-contracts/yield.js +3 -1
  318. package/dist/safe-bash-csv-engine/index.d.ts +10 -1
  319. package/dist/safe-bash-csv-engine/index.js +78 -6
  320. package/dist/safe-bash-io-engine/commands/search/requirements.js +3 -3
  321. package/dist/safe-bash-io-engine/commands/text-programs/shared.js +3 -3
  322. package/dist/safe-bash-io-engine/gnu-information.d.ts +1 -1
  323. package/dist/safe-bash-io-engine/gnu-information.js +1 -1
  324. package/dist/safe-bash-io-engine/internal.d.ts +1 -1
  325. package/dist/safe-bash-io-engine/internal.js +2 -2
  326. package/dist/safe-bash-query-engine/index.js +5 -5
  327. package/dist/safe-bash-query-engine/interpreter.js +3 -3
  328. package/dist/safe-bash-query-engine/query-core.js +5 -5
  329. package/package.json +2 -2
  330. package/dist/safe-bash/chunks/chunk-2G2T5MEM.js +0 -14
  331. package/dist/safe-bash/chunks/chunk-FJZNUUOQ.js +0 -81
  332. package/dist/safe-bash/chunks/chunk-GJWUEOT6.js +0 -14
  333. package/dist/safe-bash/chunks/chunk-LAPF2XE6.js +0 -14
  334. package/dist/safe-bash/chunks/chunk-O6356Z27.js +0 -37
  335. package/dist/safe-bash/chunks/chunk-S2LSZFZ6.js +0 -758
  336. package/dist/safe-bash/chunks/chunk-T3VDYWKZ.js +0 -21
  337. package/dist/safe-bash/chunks/chunk-VYW4Q6KF.js +0 -12
  338. package/dist/safe-bash/chunks/chunk-WHURJBET.js +0 -409
  339. package/dist/safe-bash/opt-in/commands/cmp/compare.js +0 -95
  340. package/dist/safe-bash/opt-in/commands/cmp/io.js +0 -218
  341. package/dist/safe-bash/command-chunks/{chunk-RTOJNFFL.js → chunk-KNI4GRXF.js} +7 -7
  342. package/dist/safe-bash/command-chunks/{chunk-DEH3CMGL.js → chunk-QJ3ONEBI.js} +3 -3
@@ -1,3 +1,6 @@
1
+ import "../safe-bash/command-chunks/chunk-VBZMCL23.js";
2
+ import "../safe-bash/command-chunks/chunk-J7UMKBRK.js";
3
+ import "../safe-bash/command-chunks/chunk-6X2OX6IJ.js";
1
4
  import {
2
5
  BiffStrings,
3
6
  Binary,
@@ -6,12 +9,9 @@ import {
6
9
  readBiffRecords,
7
10
  readCfb
8
11
  } from "../safe-bash/command-chunks/chunk-KKJCKPTA.js";
9
- import "../safe-bash/command-chunks/chunk-KOM3FNCE.js";
10
- import "../safe-bash/command-chunks/chunk-VBZMCL23.js";
11
- import "../safe-bash/command-chunks/chunk-J7UMKBRK.js";
12
- import "../safe-bash/command-chunks/chunk-6X2OX6IJ.js";
13
12
  import "../safe-bash/command-chunks/chunk-FLMLM7Y4.js";
14
13
  import "../safe-bash/command-chunks/chunk-RID3B5RE.js";
14
+ import "../safe-bash/command-chunks/chunk-KOM3FNCE.js";
15
15
  import "../safe-bash/command-chunks/chunk-WKPOGTZY.js";
16
16
  import "../safe-bash/command-chunks/chunk-MED2BOOW.js";
17
17
  import {
@@ -24,10 +24,10 @@ import {
24
24
  pythonCodecAliases,
25
25
  pythonCodecs,
26
26
  resolveCodec
27
- } from "../safe-bash/command-chunks/chunk-Z7TYZG3A.js";
27
+ } from "../safe-bash/command-chunks/chunk-IHHTTQX6.js";
28
28
  import {
29
29
  utf8Codec
30
- } from "../safe-bash/command-chunks/chunk-Z57TV6TC.js";
30
+ } from "../safe-bash/command-chunks/chunk-EZ2DTOLI.js";
31
31
  import {
32
32
  CastError,
33
33
  Decimal,
@@ -38,7 +38,6 @@ import {
38
38
  bytesRepr,
39
39
  castValue,
40
40
  columnTypeOrder,
41
- decimalZeroes,
42
41
  defaultHeaders,
43
42
  diagnosticReport,
44
43
  emit,
@@ -47,7 +46,6 @@ import {
47
46
  inferTable,
48
47
  inputWriteCell,
49
48
  integer,
50
- integerWhitespace,
51
49
  jsonTable,
52
50
  match,
53
51
  normalizeHeaders,
@@ -65,15 +63,25 @@ import {
65
63
  upperText,
66
64
  warningText,
67
65
  writeCsvRow
68
- } from "../safe-bash/command-chunks/chunk-4DSJDVBM.js";
66
+ } from "../safe-bash/command-chunks/chunk-32F3RBUW.js";
67
+ import {
68
+ PythonException
69
+ } from "../safe-bash/command-chunks/chunk-PGEYORBZ.js";
70
+ import {
71
+ compilePythonSearch,
72
+ pythonWhitespace
73
+ } from "../safe-bash/command-chunks/chunk-WR37IS4O.js";
74
+ import {
75
+ decimalZeroes,
76
+ integerWhitespace
77
+ } from "../safe-bash/command-chunks/chunk-QM4UZF3C.js";
69
78
  import {
70
79
  CsvkitBlocked,
71
80
  CsvkitCleanupError,
72
81
  CsvkitDiagnostic,
73
82
  CsvkitOutputBudgetError,
74
- CsvkitWorkBudgetError,
75
- PythonException
76
- } from "../safe-bash/command-chunks/chunk-2LP3VMPA.js";
83
+ CsvkitWorkBudgetError
84
+ } from "../safe-bash/command-chunks/chunk-WFDW4XXD.js";
77
85
  import {
78
86
  createZipCodec
79
87
  } from "../safe-bash/command-chunks/chunk-MKQVQMXO.js";
@@ -1631,312 +1639,6 @@ var csvformat = {
1631
1639
 
1632
1640
  // packages/safe-bash-command-csvkit/dist/commands/csvgrep.js
1633
1641
  init_buffer();
1634
-
1635
- // packages/safe-bash-command-csvkit/dist/python-regex.js
1636
- init_buffer();
1637
- function pythonWhitespace(char) {
1638
- const code = char.codePointAt(0);
1639
- return code >= 9 && code <= 13 || code >= 28 && code <= 32 || code === 133 || code === 160 || code === 5760 || code >= 8192 && code <= 8202 || code === 8232 || code === 8233 || code === 8239 || code === 8287 || code === 12288;
1640
- }
1641
- function fixedWidth(node) {
1642
- if (node.kind === "char")
1643
- return 1;
1644
- if (node.kind === "anchor" || node.kind === "assertion")
1645
- return 0;
1646
- if (node.kind === "repeat") {
1647
- const width = fixedWidth(node.node);
1648
- return width === 0 ? 0 : width !== void 0 && node.min === node.max ? width * node.min : void 0;
1649
- }
1650
- const widths = node.nodes.map(fixedWidth);
1651
- if (widths.some((width) => width === void 0))
1652
- return void 0;
1653
- if (node.kind === "alternative")
1654
- return widths.every((width) => width === widths[0]) ? widths[0] : void 0;
1655
- return widths.reduce((sum, width) => sum + width, 0);
1656
- }
1657
- function compilePythonSearch(pattern, step, maxWork, retain) {
1658
- retain(64 + pattern.length * 8);
1659
- const chars = Array.from(pattern);
1660
- let index = 0;
1661
- let insensitive = false;
1662
- let dotall = false;
1663
- let multiline = false;
1664
- let ascii2 = false;
1665
- let unicode = false;
1666
- const unsupported = () => {
1667
- throw new CsvkitBlocked("Python regex syntax or diagnostic outside qualified subset");
1668
- };
1669
- while (chars[index] === "(" && chars[index + 1] === "?") {
1670
- let end = index + 2;
1671
- while (chars[end] && "aimsu".includes(chars[end])) {
1672
- step();
1673
- end++;
1674
- }
1675
- if (end > index + 2 && chars[end] === ")") {
1676
- const flags = chars.slice(index + 2, end);
1677
- insensitive ||= flags.includes("i");
1678
- dotall ||= flags.includes("s");
1679
- multiline ||= flags.includes("m");
1680
- ascii2 ||= flags.includes("a");
1681
- unicode ||= flags.includes("u");
1682
- if (ascii2 && unicode)
1683
- unsupported();
1684
- index = end + 1;
1685
- } else
1686
- break;
1687
- }
1688
- const digit = (char) => ascii2 ? char >= "0" && char <= "9" : decimalZeroes.some((zero) => char.codePointAt(0) >= zero && char.codePointAt(0) < zero + 10);
1689
- const word = (char) => {
1690
- if (!ascii2 && char.codePointAt(0) > 127)
1691
- return unsupported();
1692
- return char === "_" || /^[a-zA-Z0-9]$/.test(char);
1693
- };
1694
- const space = (char) => ascii2 ? " \n\r\f\v".includes(char) : pythonWhitespace(char);
1695
- const literal2 = (value) => ({ kind: "char", test: (char) => {
1696
- if (insensitive && (value.codePointAt(0) > 127 || char.codePointAt(0) > 127))
1697
- unsupported();
1698
- return insensitive ? char.toLowerCase() === value.toLowerCase() : char === value;
1699
- } });
1700
- function escape(inClass = false) {
1701
- const value = chars[index++];
1702
- if (!value)
1703
- return unsupported();
1704
- if (value === "x" || value === "u" || value === "U") {
1705
- const length = value === "x" ? 2 : value === "u" ? 4 : 8;
1706
- let hex = "";
1707
- for (let count = 0; count < length; count++) {
1708
- step();
1709
- const digit2 = chars[index++];
1710
- if (!digit2 || !"0123456789abcdefABCDEF".includes(digit2))
1711
- return unsupported();
1712
- hex += digit2;
1713
- }
1714
- const code = Number.parseInt(hex, 16);
1715
- if (code > 1114111)
1716
- return unsupported();
1717
- return literal2(String.fromCodePoint(code));
1718
- }
1719
- const predicate = { d: digit, s: space, w: word }[value.toLowerCase()];
1720
- if (predicate)
1721
- return { kind: "char", test: (char) => value === value.toLowerCase() ? predicate(char) : !predicate(char) };
1722
- if (!inClass && (value === "A" || value === "Z" || value === "z"))
1723
- return { kind: "anchor", test: (text2, position) => value === "A" ? position === 0 : position === text2.length };
1724
- if (!inClass && (value === "b" || value === "B"))
1725
- return { kind: "anchor", test: (text2, position) => {
1726
- if (value === "B" && text2.length === 0)
1727
- return true;
1728
- const boundary = (position > 0 && word(text2[position - 1])) !== (position < text2.length && word(text2[position]));
1729
- return value === "b" ? boundary : !boundary;
1730
- } };
1731
- const control = { n: "\n", r: "\r", t: " ", f: "\f", v: "\v", a: "\x07", b: "\b" }[value];
1732
- if (control !== void 0)
1733
- return literal2(control);
1734
- if (/^[a-zA-Z0-9]$/.test(value))
1735
- return unsupported();
1736
- return literal2(value);
1737
- }
1738
- function atom() {
1739
- step();
1740
- const value = chars[index++];
1741
- if (!value)
1742
- return unsupported();
1743
- if (value === "\\")
1744
- return escape();
1745
- if (value === ".")
1746
- return { kind: "char", test: (char) => dotall || char !== "\n" };
1747
- if (value === "^")
1748
- return { kind: "anchor", test: (text2, position) => position === 0 || multiline && text2[position - 1] === "\n" };
1749
- if (value === "$")
1750
- return { kind: "anchor", test: (text2, position) => position === text2.length || text2[position] === "\n" && (multiline || position === text2.length - 1) };
1751
- if (value === "(") {
1752
- let assertion;
1753
- if (chars[index] === "?") {
1754
- const modifier = chars[index + 1];
1755
- if (modifier === ":")
1756
- index += 2;
1757
- else if (modifier === "=" || modifier === "!") {
1758
- assertion = { negative: modifier === "!", behind: false };
1759
- index += 2;
1760
- } else if (modifier === "<" && (chars[index + 2] === "=" || chars[index + 2] === "!")) {
1761
- assertion = { negative: chars[index + 2] === "!", behind: true };
1762
- index += 3;
1763
- } else
1764
- return unsupported();
1765
- }
1766
- const node = expression();
1767
- if (chars[index++] !== ")")
1768
- return unsupported();
1769
- if (assertion) {
1770
- const behind = assertion.behind ? fixedWidth(node) : void 0;
1771
- if (assertion.behind && behind === void 0)
1772
- return unsupported();
1773
- return { kind: "assertion", node, negative: assertion.negative, behind };
1774
- }
1775
- return node;
1776
- }
1777
- if (value === "[") {
1778
- if (chars[index] === "[")
1779
- return unsupported();
1780
- const negate = chars[index] === "^";
1781
- if (negate)
1782
- index++;
1783
- const tests = [];
1784
- while (index < chars.length && (chars[index] !== "]" || tests.length === 0)) {
1785
- const first = chars[index++];
1786
- if (first && "&|~".includes(first) && chars[index] === first)
1787
- return unsupported();
1788
- if (first === "-" && tests.length > 0 && chars[index] === "-")
1789
- return unsupported();
1790
- if (first === "\\") {
1791
- const escaped = escape(true);
1792
- if (escaped.kind !== "char")
1793
- return unsupported();
1794
- if (chars[index] === "-" && chars[index + 1] !== "]")
1795
- return unsupported();
1796
- tests.push(escaped.test);
1797
- } else if (chars[index] === "-" && chars[index + 1] !== "]" && chars[index + 1] !== void 0) {
1798
- index++;
1799
- const last = chars[index++];
1800
- if (!first || !last || last === "\\" || first.codePointAt(0) > last.codePointAt(0) || insensitive)
1801
- return unsupported();
1802
- tests.push((char) => char.codePointAt(0) >= first.codePointAt(0) && char.codePointAt(0) <= last.codePointAt(0));
1803
- } else {
1804
- const item = literal2(first);
1805
- if (item.kind !== "char")
1806
- return unsupported();
1807
- tests.push(item.test);
1808
- }
1809
- }
1810
- if (chars[index++] !== "]")
1811
- return unsupported();
1812
- return { kind: "char", test: (char) => tests.some((test) => test(char)) !== negate };
1813
- }
1814
- if ("*+?{} )".includes(value) && value !== " ")
1815
- return unsupported();
1816
- return literal2(value);
1817
- }
1818
- function expression() {
1819
- const alternatives = [];
1820
- do {
1821
- const nodes = [];
1822
- while (index < chars.length && chars[index] !== "|" && chars[index] !== ")") {
1823
- let node = atom();
1824
- const quantifier = chars[index];
1825
- if (quantifier && "*+?{".includes(quantifier)) {
1826
- if (node.kind === "anchor")
1827
- return unsupported();
1828
- index++;
1829
- let min = quantifier === "+" ? 1 : 0;
1830
- let max = quantifier === "?" ? 1 : Infinity;
1831
- if (quantifier === "{") {
1832
- let digits2 = "";
1833
- while (chars[index] && "0123456789".includes(chars[index])) {
1834
- step();
1835
- digits2 += chars[index++];
1836
- }
1837
- if (!digits2 && chars[index] !== ",")
1838
- return unsupported();
1839
- min = digits2 ? Number(digits2) : 0;
1840
- max = min;
1841
- if (chars[index] === ",") {
1842
- index++;
1843
- digits2 = "";
1844
- while (chars[index] && "0123456789".includes(chars[index])) {
1845
- step();
1846
- digits2 += chars[index++];
1847
- }
1848
- max = digits2 ? Number(digits2) : Infinity;
1849
- }
1850
- if (chars[index++] !== "}" || min > max || !Number.isSafeInteger(min) || min >= 4294967295 || max !== Infinity && (!Number.isSafeInteger(max) || max >= 4294967295))
1851
- return unsupported();
1852
- }
1853
- node = { kind: "repeat", node, min, max };
1854
- if (chars[index] === "?")
1855
- index++;
1856
- if (chars[index] === "+")
1857
- return unsupported();
1858
- }
1859
- nodes.push(node);
1860
- }
1861
- alternatives.push({ kind: "sequence", nodes });
1862
- if (chars[index] !== "|")
1863
- break;
1864
- index++;
1865
- } while (index <= chars.length);
1866
- return { kind: "alternative", nodes: alternatives };
1867
- }
1868
- const root = expression();
1869
- if (index !== chars.length)
1870
- unsupported();
1871
- let work = 0;
1872
- const tick = () => {
1873
- step();
1874
- if (++work > maxWork)
1875
- throw new CsvkitBlocked("Python regex work budget exceeded");
1876
- };
1877
- function* evaluate(node, text2, position) {
1878
- tick();
1879
- if (node.kind === "char") {
1880
- if (position < text2.length && node.test(text2[position]))
1881
- yield position + 1;
1882
- } else if (node.kind === "anchor") {
1883
- if (node.test(text2, position))
1884
- yield position;
1885
- } else if (node.kind === "assertion") {
1886
- const start = node.behind === void 0 ? position : position - node.behind;
1887
- let matched = false;
1888
- if (start >= 0)
1889
- for (const end of evaluate(node.node, text2, start)) {
1890
- if (node.behind === void 0 || end === position) {
1891
- matched = true;
1892
- break;
1893
- }
1894
- }
1895
- if (matched !== node.negative)
1896
- yield position;
1897
- } else if (node.kind === "alternative") {
1898
- for (const child2 of node.nodes)
1899
- yield* evaluate(child2, text2, position);
1900
- } else if (node.kind === "sequence") {
1901
- const nodes = node.nodes;
1902
- function* sequence(index2, offset) {
1903
- tick();
1904
- if (index2 === nodes.length)
1905
- yield offset;
1906
- else
1907
- for (const next of evaluate(nodes[index2], text2, offset))
1908
- yield* sequence(index2 + 1, next);
1909
- }
1910
- yield* sequence(0, position);
1911
- } else {
1912
- let positions = /* @__PURE__ */ new Set([position]);
1913
- for (let count = 0; count <= node.max && positions.size; count++) {
1914
- tick();
1915
- if (count >= node.min)
1916
- yield* positions;
1917
- const next = /* @__PURE__ */ new Set();
1918
- for (const offset of positions)
1919
- for (const end of evaluate(node.node, text2, offset)) {
1920
- if (end !== offset || count < node.min)
1921
- next.add(end);
1922
- }
1923
- positions = next;
1924
- }
1925
- }
1926
- }
1927
- return (text2) => {
1928
- retain(64 + text2.length * 8);
1929
- const input = Array.from(text2);
1930
- for (let start = 0; start <= input.length; start++)
1931
- for (const ignored of evaluate(root, input, start)) {
1932
- void ignored;
1933
- return true;
1934
- }
1935
- return false;
1936
- };
1937
- }
1938
-
1939
- // packages/safe-bash-command-csvkit/dist/commands/csvgrep.js
1940
1642
  async function grep(runtime) {
1941
1643
  const o = runtime.options;
1942
1644
  if (o.names_only)
@@ -5384,7 +5086,7 @@ async function executeCsvpy(runtime) {
5384
5086
  }
5385
5087
  };
5386
5088
  },
5387
- table: () => readTable(runtime, String(o.input_path)),
5089
+ table: () => readTable(runtime, String(o.input_path), void 0, true),
5388
5090
  settings: o
5389
5091
  }, runtime.context.signal, work) : provider.load(mode, runtime.bytes(String(o.input_path), true), o, runtime.context.signal, work), (session2) => session2.close());
5390
5092
  const className = mode === "dict" ? "agate.csv.DictReader" : mode === "agate" ? "agate.Table" : "agate.csv.reader";
@@ -10992,6 +10694,7 @@ init_buffer();
10992
10694
 
10993
10695
  // packages/safe-bash-command-csvkit/dist/runtime.js
10994
10696
  init_buffer();
10697
+ import { yieldTurn } from "../safe-bash-contracts/yield.js";
10995
10698
  var sharedTextEncoder = new TextEncoder();
10996
10699
  var Runtime = class {
10997
10700
  context;
@@ -11006,6 +10709,7 @@ var Runtime = class {
11006
10709
  #output = 0;
11007
10710
  #retained = 0;
11008
10711
  #work = 0;
10712
+ #lastYieldWork = 0;
11009
10713
  #rows = 0;
11010
10714
  #writtenRows = 0;
11011
10715
  #sniffWarning = false;
@@ -11056,6 +10760,14 @@ var Runtime = class {
11056
10760
  if (++this.#work > this.context.limits.maxWork)
11057
10761
  throw new CsvkitWorkBudgetError();
11058
10762
  };
10763
+ async checkpoint() {
10764
+ this.#assertOpen();
10765
+ if (this.#work - this.#lastYieldWork < 4096)
10766
+ return;
10767
+ this.#lastYieldWork = this.#work;
10768
+ await yieldTurn(this.context.signal);
10769
+ this.#assertOpen();
10770
+ }
11059
10771
  retain(bytes) {
11060
10772
  this.#retained += bytes;
11061
10773
  if (!Number.isSafeInteger(this.#retained) || this.#retained > this.context.limits.maxRetainedBytes)
@@ -11241,14 +10953,19 @@ var Runtime = class {
11241
10953
  break;
11242
10954
  return;
11243
10955
  }
11244
- let emitted = 0;
10956
+ let emitted = 0, workRows = 0;
11245
10957
  for await (const record of readCsvStream(file.lines(skipped), dialect, this.step, this.#admitRow)) {
10958
+ if (++workRows % 128 === 0) {
10959
+ await yieldTurn(this.context.signal);
10960
+ this.context.signal.throwIfAborted();
10961
+ }
11246
10962
  const cells = record.cells;
11247
10963
  if (!cells.every((cell2) => {
11248
10964
  this.step();
11249
10965
  return preserveCells || typeof cell2 === "string";
11250
10966
  }))
11251
10967
  throw new CsvkitBlocked(`input quoting mode ${dialect.quoting} numeric/null operation cells`);
10968
+ await this.checkpoint();
11252
10969
  yield { cells, line: record.line };
11253
10970
  if (recordLimit !== void 0 && ++emitted >= recordLimit)
11254
10971
  return;
@@ -11289,6 +11006,7 @@ var Runtime = class {
11289
11006
  this.#output += size;
11290
11007
  }
11291
11008
  async write(text2, channel = "stdout") {
11009
+ await this.checkpoint();
11292
11010
  if (this.context.limits.maxOutputBytes === Infinity && this.context.limits.maxWork === Infinity) {
11293
11011
  this.step();
11294
11012
  this.#work += text2.length;
@@ -11415,6 +11133,7 @@ var Runtime = class {
11415
11133
  } });
11416
11134
  await this.context.stdout.write(sharedTextEncoder.encode(text2));
11417
11135
  this.step();
11136
+ await this.checkpoint();
11418
11137
  this.#writtenRows++;
11419
11138
  }
11420
11139
  async rows(rowList, dialect = {}, lineNumbers = Boolean(this.options.line_numbers)) {
@@ -11441,6 +11160,7 @@ var Runtime = class {
11441
11160
  this.#output += bytes;
11442
11161
  } });
11443
11162
  this.step();
11163
+ await this.checkpoint();
11444
11164
  this.#writtenRows++;
11445
11165
  buf += text2;
11446
11166
  if (buf.length >= 32768)
@@ -16679,11 +16399,18 @@ var portableLocale = Object.freeze({
16679
16399
  profile: "C",
16680
16400
  timezone: "UTC",
16681
16401
  formatNumber(value, _locale, format3) {
16402
+ const number2 = Number(value);
16403
+ if (format3 === "%d" || format3 === "%i") {
16404
+ if (!Number.isFinite(number2))
16405
+ throw new CsvkitBlocked("non-finite integer formatting");
16406
+ return BigInt(Math.trunc(number2)).toString();
16407
+ }
16408
+ if (format3 === "%f")
16409
+ format3 = "%.6f";
16682
16410
  const precisionText = format3.slice(2, -1);
16683
16411
  const precision2 = Number(precisionText);
16684
- if (!format3.startsWith("%.") || !format3.endsWith("f") || !precisionText || !Array.from(precisionText).every((character) => character >= "0" && character <= "9") || !Number.isSafeInteger(precision2) || precision2 > 100)
16412
+ if (!format3.startsWith("%.") || !format3.endsWith("f") || !precisionText || !Array.from(precisionText).every((character) => character >= "0" && character <= "9") || !Number.isSafeInteger(precision2))
16685
16413
  throw new CsvkitBlocked("portable locale supports %.Nf decimal formatting; bind locale for other formats");
16686
- const number2 = Number(value);
16687
16414
  if (!Number.isFinite(number2))
16688
16415
  return Number.isNaN(number2) ? "nan" : number2 < 0 ? "-inf" : "inf";
16689
16416
  const bytes = new DataView(new ArrayBuffer(8));
@@ -16729,7 +16456,7 @@ function createCsvkitCommands(options = {}) {
16729
16456
  ...options.sniffing,
16730
16457
  ...options.sniffing.warning === void 0 ? {} : { warning: Object.freeze({ ...options.sniffing.warning }) }
16731
16458
  });
16732
- const columnWarnings = options.columnWarnings === void 0 ? void 0 : Object.freeze({ ...options.columnWarnings });
16459
+ const columnWarnings = options.columnWarnings === void 0 ? Object.freeze({ suppressWarnings: true }) : Object.freeze({ ...options.columnWarnings });
16733
16460
  const probeInputOpen = options.probeInputOpen;
16734
16461
  return Object.freeze(commands.map((descriptor) => ({
16735
16462
  name: descriptor.name,
@@ -16767,6 +16494,8 @@ function createCsvkitCommands(options = {}) {
16767
16494
  const account = (bytes) => {
16768
16495
  inputBytes += bytes.byteLength;
16769
16496
  context.inputBudget?.check(inputBytes);
16497
+ if (inputBytes > limits.maxInputBytes)
16498
+ throw new CsvkitBlocked("input byte budget exceeded");
16770
16499
  return bytes;
16771
16500
  };
16772
16501
  result = await execute(descriptor.name, {
@@ -16859,7 +16588,34 @@ function createCsvkitCommands(options = {}) {
16859
16588
  databases: databases2,
16860
16589
  sqlDialects,
16861
16590
  ...interpreter === void 0 ? {} : { interpreter },
16862
- ...openMatchFile === void 0 ? {} : { openMatchFile },
16591
+ openMatchFile: openMatchFile ?? (async (path, settings) => {
16592
+ const resolved = virtualPath(settings.cwd, path);
16593
+ await context.fs.stat(resolved, { signal: settings.signal });
16594
+ settings.signal.throwIfAborted();
16595
+ const source = context.fs.readStream ? context.fs.readStream(resolved, { signal: settings.signal }) : (async function* () {
16596
+ yield await context.fs.readFile(resolved, { signal: settings.signal, ...Number.isFinite(limits.maxInputBytes) ? { maxBytes: limits.maxInputBytes } : {} });
16597
+ })();
16598
+ let retained = 0, work = 0, codepoints = 0;
16599
+ const file = new LazyInput(path, () => (async function* () {
16600
+ for await (const bytes of source) {
16601
+ yield account(bytes);
16602
+ }
16603
+ })(), utf8Codec, "utf-8", settings.signal, (bytes) => {
16604
+ retained += bytes;
16605
+ if (retained > limits.maxRetainedBytes)
16606
+ throw new CsvkitBlocked("retained byte budget exceeded");
16607
+ }, (text2) => {
16608
+ work += text2.length;
16609
+ if (work > limits.maxWork)
16610
+ throw new CsvkitBlocked("work budget exceeded");
16611
+ for (const char of text2) {
16612
+ void char;
16613
+ if (++codepoints > limits.maxCodepoints)
16614
+ throw new CsvkitBlocked("codepoint budget exceeded");
16615
+ }
16616
+ }, false);
16617
+ return { lines: () => file.lines(), close: () => file.close() };
16618
+ }),
16863
16619
  ...sniffing === void 0 ? {} : { sniffing },
16864
16620
  ...columnWarnings === void 0 ? {} : { columnWarnings },
16865
16621
  ...probeInputOpen ? { probeInputOpen } : {
@@ -0,0 +1,5 @@
1
+ export { CsvkitBlocked } from "./errors.js";
2
+ export declare function pythonWhitespace(char: string): boolean;
3
+ /** Bounded Python search subset. Unsupported syntax fails explicitly, never uses JS regex semantics. */
4
+ export declare function compilePythonSearch(pattern: string, step: () => void, maxWork: number, retain: (bytes: number) => void): (text: string) => boolean;
5
+ //# sourceMappingURL=python-regex.d.ts.map
@@ -0,0 +1,14 @@
1
+ import {
2
+ compilePythonSearch,
3
+ pythonWhitespace
4
+ } from "../safe-bash/command-chunks/chunk-WR37IS4O.js";
5
+ import "../safe-bash/command-chunks/chunk-QM4UZF3C.js";
6
+ import {
7
+ CsvkitBlocked
8
+ } from "../safe-bash/command-chunks/chunk-WFDW4XXD.js";
9
+ import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
10
+ export {
11
+ CsvkitBlocked,
12
+ compilePythonSearch,
13
+ pythonWhitespace
14
+ };
@@ -17,6 +17,7 @@ export declare class Runtime {
17
17
  constructor(context: Omit<CsvkitContext, "argv">, descriptor: CommandDescriptor, options: Settings, matchFiles?: MatchFileScope | undefined);
18
18
  readonly close: () => Promise<void>;
19
19
  readonly step: () => void;
20
+ checkpoint(): Promise<void>;
20
21
  retain(bytes: number): void;
21
22
  /** Binary readers use the raw source; common text opening opts into suffix decoding. */
22
23
  bytes(path?: string | null, commonText?: boolean): AsyncGenerator<Uint8Array>;
@@ -9,8 +9,10 @@ import {
9
9
  readCsv,
10
10
  sniff,
11
11
  writeCsvRow
12
- } from "../safe-bash/command-chunks/chunk-4DSJDVBM.js";
13
- import "../safe-bash/command-chunks/chunk-2LP3VMPA.js";
12
+ } from "../safe-bash/command-chunks/chunk-32F3RBUW.js";
13
+ import "../safe-bash/command-chunks/chunk-PGEYORBZ.js";
14
+ import "../safe-bash/command-chunks/chunk-QM4UZF3C.js";
15
+ import "../safe-bash/command-chunks/chunk-WFDW4XXD.js";
14
16
  import {
15
17
  init_buffer
16
18
  } from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
@@ -1084,6 +1084,7 @@ function compareDiff3(inputs, invocation, limits = diff3DefaultLimits, signal) {
1084
1084
 
1085
1085
  // packages/safe-bash-command-diff3/dist/command.js
1086
1086
  init_buffer();
1087
+ import { yieldTurn } from "../safe-bash-contracts/yield.js";
1087
1088
  import { commandRuntimeIdentity, getCommandArguments } from "../safe-bash-contracts/command.js";
1088
1089
  import { FsError } from "../safe-bash-contracts/errors.js";
1089
1090
  import { readBytes, writeBytes } from "../safe-bash-contracts/io.js";
@@ -1194,6 +1195,8 @@ async function executeDiff3(context, configuration, invocation) {
1194
1195
  }
1195
1196
  if (!options.information)
1196
1197
  for (const file of options.files) {
1198
+ await yieldTurn(signal);
1199
+ signal.throwIfAborted();
1197
1200
  signal.throwIfAborted();
1198
1201
  let source, borrowed = 0, acquiredInput;
1199
1202
  if (file === "-")
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Poe Platform
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,30 @@
1
+ import { type ByteSink, type ByteSource, type CommandContext, type CommandDefinition, type FileSystem, type VirtualShellPlugin } from "../safe-bash-contracts/index.js";
2
+ /** Explicit invocation capabilities for an injected document operation engine. */
3
+ export interface DocxCommandRequest {
4
+ readonly args: readonly Uint8Array[];
5
+ readonly cwd: string;
6
+ readonly filesystem: FileSystem;
7
+ readonly stdin: ByteSource;
8
+ readonly stdinIsDefault?: boolean;
9
+ readonly stdout: ByteSink;
10
+ readonly stderr: ByteSink;
11
+ readonly signal: AbortSignal;
12
+ readonly registerCleanup?: CommandContext["registerCleanup"];
13
+ }
14
+ export interface DocxCommandEngine {
15
+ execute(request: DocxCommandRequest): Promise<{
16
+ readonly exitCode: number;
17
+ }>;
18
+ }
19
+ export interface DocxLimits {
20
+ readonly maxArgumentBytes: number;
21
+ }
22
+ export interface DocxCommandOptions {
23
+ readonly engine: DocxCommandEngine;
24
+ readonly replace?: boolean;
25
+ readonly limits?: Partial<DocxLimits>;
26
+ }
27
+ export type DocxCommandsOptions = DocxCommandOptions;
28
+ export declare function createDocxCommand(options: DocxCommandOptions): CommandDefinition;
29
+ export declare function createDocxCommands(options: DocxCommandsOptions): readonly CommandDefinition[];
30
+ export declare function docxCommands(options: DocxCommandOptions): VirtualShellPlugin;