@poe-platform/safe-bash 0.1.797 → 0.1.799

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 (195) hide show
  1. package/README.md +2 -1
  2. package/dist/pdf/index.d.ts +1 -1
  3. package/dist/pdf/model.d.ts +7 -2
  4. package/dist/safe-bash/chunks/{chunk-D2XB7XIC.js → chunk-AZAJJVFX.js} +7 -11
  5. package/dist/safe-bash/chunks/{chunk-C2NYCU7O.js → chunk-JSVX4VIA.js} +5 -1
  6. package/dist/safe-bash/chunks/{chunk-TCWZNUVP.js → chunk-SPYL72GN.js} +1 -25
  7. package/dist/safe-bash/chunks/{chunk-TGOF7VO5.js → chunk-TRVGCN3U.js} +1 -1
  8. package/dist/safe-bash/chunks/{chunk-ZXKVOJNL.js → chunk-WUNK5NXJ.js} +6 -5
  9. package/dist/safe-bash/command-chunks/{chunk-JG5W2ENK.js → chunk-43GSSUAY.js} +3 -3
  10. package/dist/safe-bash/command-chunks/{chunk-OAJUAAWH.js → chunk-464RVBGB.js} +3 -3
  11. package/dist/safe-bash/command-chunks/{chunk-25BLI6S6.js → chunk-4Y3WVMK4.js} +1 -14
  12. package/dist/safe-bash/command-chunks/{chunk-SSBFTMVI.js → chunk-4ZALPDBV.js} +2 -2
  13. package/dist/safe-bash/command-chunks/{chunk-YMQKVEIF.js → chunk-52PCQXD2.js} +2 -13
  14. package/dist/safe-bash/command-chunks/{chunk-ZCKDQGKY.js → chunk-5HDSFHGW.js} +1 -1
  15. package/dist/safe-bash/command-chunks/{chunk-JHVZYB4R.js → chunk-5MPOQ6V3.js} +1 -1
  16. package/dist/safe-bash/command-chunks/{chunk-AUAF5YBT.js → chunk-5WPI42ZW.js} +0 -7
  17. package/dist/safe-bash/command-chunks/{chunk-PPOIPMY4.js → chunk-5ZSM4UFN.js} +1 -1
  18. package/dist/safe-bash/command-chunks/{chunk-RECJB2BO.js → chunk-7BS66BXN.js} +1 -1
  19. package/dist/safe-bash/command-chunks/{chunk-GRWOVSFK.js → chunk-7D7JRRML.js} +1 -1
  20. package/dist/safe-bash/command-chunks/{chunk-E6IYUYVA.js → chunk-7L24L4UO.js} +2 -2
  21. package/dist/safe-bash/command-chunks/{chunk-HBXQWTJR.js → chunk-A5ZAV6DO.js} +1 -1
  22. package/dist/safe-bash/command-chunks/{chunk-LW34AKDM.js → chunk-AB4MXHVS.js} +4 -14
  23. package/dist/safe-bash/command-chunks/{chunk-EELNLEEP.js → chunk-AXK3H4PX.js} +1 -1
  24. package/dist/safe-bash/command-chunks/{chunk-Y55OCH37.js → chunk-AYUTO323.js} +3 -10
  25. package/dist/safe-bash/command-chunks/{chunk-DY36FDDC.js → chunk-B5BKA5WH.js} +4 -4
  26. package/dist/safe-bash/command-chunks/{chunk-YB6KVU6H.js → chunk-BDBVVZY6.js} +4 -14
  27. package/dist/safe-bash/command-chunks/{chunk-QAN7KKDZ.js → chunk-BZDDAPSV.js} +1 -1
  28. package/dist/safe-bash/command-chunks/{chunk-HZCPWYWA.js → chunk-BZPAWTUL.js} +1 -1
  29. package/dist/safe-bash/command-chunks/{chunk-RT2J5ATD.js → chunk-CPPGTBZF.js} +1 -1
  30. package/dist/safe-bash/command-chunks/{chunk-A7RIYQIF.js → chunk-DDLQ5YDB.js} +172 -167
  31. package/dist/safe-bash/command-chunks/{chunk-JEPY4UY4.js → chunk-EIVW3X3N.js} +3 -3
  32. package/dist/safe-bash/command-chunks/{chunk-C2DUYVYZ.js → chunk-ESMCX3YV.js} +138 -36
  33. package/dist/safe-bash/command-chunks/chunk-EZ7D6DXC.js +6 -0
  34. package/dist/safe-bash/command-chunks/{chunk-QGVOS3EY.js → chunk-HFII3QYO.js} +1 -1
  35. package/dist/safe-bash/command-chunks/{chunk-5EWTQJSC.js → chunk-HHP343KT.js} +1 -1
  36. package/dist/safe-bash/command-chunks/{chunk-5UA3BEGA.js → chunk-I3K5RYU4.js} +1 -1
  37. package/dist/safe-bash/command-chunks/{chunk-4MS5WZJC.js → chunk-IKS2YXZQ.js} +3 -3
  38. package/dist/safe-bash/command-chunks/{chunk-CZVBYCB5.js → chunk-IL53SJL4.js} +2 -12
  39. package/dist/safe-bash/command-chunks/{chunk-HLMUPSM6.js → chunk-JCNNOMBV.js} +2 -2
  40. package/dist/safe-bash/command-chunks/{chunk-2LLZBNLL.js → chunk-JWE54GHQ.js} +1 -1
  41. package/dist/safe-bash/command-chunks/{chunk-QLDIP3OP.js → chunk-JZSNU2MY.js} +2 -2
  42. package/dist/safe-bash/command-chunks/{chunk-2HOESGFJ.js → chunk-KMCZ6P4O.js} +2 -2
  43. package/dist/safe-bash/command-chunks/{chunk-U3ONEICA.js → chunk-KVFCSLKK.js} +1 -11
  44. package/dist/safe-bash/command-chunks/{chunk-THS4YAKG.js → chunk-LLCXZKZ6.js} +2 -2
  45. package/dist/safe-bash/command-chunks/{chunk-3TANKHBX.js → chunk-MRW5HD2D.js} +1 -6
  46. package/dist/safe-bash/command-chunks/{chunk-3WKA57FA.js → chunk-N5FGCXQJ.js} +1 -9
  47. package/dist/safe-bash/command-chunks/{chunk-ULZ7HIZP.js → chunk-NETECMOF.js} +1 -1
  48. package/dist/safe-bash/command-chunks/{chunk-2Q7UQ7R4.js → chunk-OPUJSTHS.js} +12 -12
  49. package/dist/safe-bash/command-chunks/{chunk-HVI6ALJF.js → chunk-PFAADCB5.js} +2 -4
  50. package/dist/safe-bash/command-chunks/{chunk-JXU2N6GN.js → chunk-Q7Q5GM5S.js} +2 -2
  51. package/dist/safe-bash/command-chunks/{chunk-Z5TFSVNU.js → chunk-QAKKSRNV.js} +1 -1
  52. package/dist/safe-bash/command-chunks/{chunk-KAHH4XOU.js → chunk-QNXI2UP6.js} +1 -1
  53. package/dist/safe-bash/command-chunks/{chunk-ECAK3JHR.js → chunk-QRRYN2KO.js} +21 -12
  54. package/dist/safe-bash/command-chunks/{chunk-WYOL5JNT.js → chunk-SX2X3IH4.js} +4 -4
  55. package/dist/safe-bash/command-chunks/{chunk-WBJKOTSP.js → chunk-UI32HWGS.js} +1 -1
  56. package/dist/safe-bash/command-chunks/{chunk-AC6X7Q4I.js → chunk-VVI4Z73I.js} +1 -8
  57. package/dist/safe-bash/command-chunks/{chunk-JCVXAX2G.js → chunk-XWZBMJ5B.js} +1 -1
  58. package/dist/safe-bash/command-chunks/{chunk-UUR2S7AD.js → chunk-Y6TUZWPS.js} +28 -1
  59. package/dist/safe-bash/command-chunks/{chunk-23XLM73P.js → chunk-YEOPI5SK.js} +1 -1
  60. package/dist/safe-bash/command-chunks/{chunk-PRCT7FKJ.js → chunk-YZ5SVZFD.js} +3 -3
  61. package/dist/safe-bash/command-chunks/{chunk-OGUMMTTD.js → chunk-ZJBR5Q5I.js} +4 -4
  62. package/dist/safe-bash/command-chunks/{chunk-VZ64JXHC.js → chunk-ZS3QPNUL.js} +1 -1
  63. package/dist/safe-bash/command-chunks/{chunk-VKQCNX32.js → chunk-ZT4KSS2V.js} +1 -1
  64. package/dist/safe-bash/command-chunks/{chunk-6N5V4VBN.js → chunk-ZXKW7SJ2.js} +2 -2
  65. package/dist/safe-bash/command-chunks/{pptx-KY2OJWZW-76LBHCHD.js → pptx-GBPNWNEP-7EQEVXV5.js} +8 -2
  66. package/dist/safe-bash/commands/diff-patch/shared.d.ts +0 -2
  67. package/dist/safe-bash/commands/diff-patch/shared.js +2 -11
  68. package/dist/safe-bash/commands/llm/index.browser.js +9 -1
  69. package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -2
  70. package/dist/safe-bash/commands/text.js +1 -25
  71. package/dist/safe-bash/core.browser.js +1 -1
  72. package/dist/safe-bash/core.d.ts +5 -1
  73. package/dist/safe-bash/core.js +5 -1
  74. package/dist/safe-bash/full-core.browser.js +134 -5
  75. package/dist/safe-bash/lazy-optional.d.ts +13 -0
  76. package/dist/safe-bash/lazy-optional.js +118 -0
  77. package/dist/safe-bash/opt-in/commands/dd/index.js +4 -13
  78. package/dist/safe-bash/opt-in/commands/yq/native-work.js +2 -1
  79. package/dist/safe-bash/opt-in/optional/commands/shuf/input.js +3 -21
  80. package/dist/safe-bash/opt-in/optional/commands/shuf/shuf.js +4 -27
  81. package/dist/safe-bash/plugins/index.browser.js +3 -3
  82. package/dist/safe-bash/registry-entry.browser.js +2 -2
  83. package/dist/safe-bash/shell/env-warning.js +3 -2
  84. package/dist/safe-bash/shell/runtime.js +2 -2
  85. package/dist/safe-bash/shell-entry.browser.js +2 -2
  86. package/dist/safe-bash-command-csvkit/index.js +528 -498
  87. package/dist/safe-bash-command-dd/index.js +4 -13
  88. package/dist/safe-bash-command-du/budget.d.ts +0 -2
  89. package/dist/safe-bash-command-du/budget.js +1 -1
  90. package/dist/safe-bash-command-du/du.js +2 -2
  91. package/dist/safe-bash-command-du/index.js +2 -2
  92. package/dist/safe-bash-command-file/index.js +1 -1
  93. package/dist/safe-bash-command-file/shared.d.ts +0 -2
  94. package/dist/safe-bash-command-file/shared.js +1 -1
  95. package/dist/safe-bash-command-fmt/index.js +3 -15
  96. package/dist/safe-bash-command-git/git_rust.wasm +0 -0
  97. package/dist/safe-bash-command-git/wasm.generated.js +1 -1
  98. package/dist/safe-bash-command-html-to-markdown/budget.d.ts +0 -3
  99. package/dist/safe-bash-command-html-to-markdown/budget.js +1 -1
  100. package/dist/safe-bash-command-html-to-markdown/entities.js +3 -3
  101. package/dist/safe-bash-command-html-to-markdown/index.js +6 -6
  102. package/dist/safe-bash-command-html-to-markdown/input.js +5 -5
  103. package/dist/safe-bash-command-html-to-markdown/parser.js +4 -4
  104. package/dist/safe-bash-command-html-to-markdown/render.js +5 -5
  105. package/dist/safe-bash-command-html-to-markdown/text.js +2 -2
  106. package/dist/safe-bash-command-iconv/command.js +5 -5
  107. package/dist/safe-bash-command-iconv/index.js +5 -5
  108. package/dist/safe-bash-command-iconv/internal.d.ts +0 -2
  109. package/dist/safe-bash-command-iconv/internal.js +1 -1
  110. package/dist/safe-bash-command-iconv/lifecycle.js +2 -2
  111. package/dist/safe-bash-command-iconv/options.js +2 -2
  112. package/dist/safe-bash-command-iconv/reader.js +2 -2
  113. package/dist/safe-bash-command-llm/base64-stream.d.ts +2 -0
  114. package/dist/safe-bash-command-llm/chat-json.d.ts +10 -0
  115. package/dist/safe-bash-command-llm/index.d.ts +2 -1
  116. package/dist/safe-bash-command-llm/index.js +11 -2
  117. package/dist/safe-bash-command-llm/json-string.d.ts +2 -0
  118. package/dist/safe-bash-command-llm/json-value.d.ts +2 -0
  119. package/dist/safe-bash-command-llm/openai.d.ts +1 -0
  120. package/dist/safe-bash-command-llm/openai.js +4 -2
  121. package/dist/safe-bash-command-llm/provider-serialization.d.ts +6 -0
  122. package/dist/safe-bash-command-llm/providers/index.d.ts +2 -1
  123. package/dist/safe-bash-command-llm/providers/index.js +12 -3
  124. package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -1
  125. package/dist/safe-bash-command-llm/providers/openai.js +4 -2
  126. package/dist/safe-bash-command-numfmt/index.js +4 -18
  127. package/dist/safe-bash-command-pandoc/citeproc-filters.js +1 -1
  128. package/dist/safe-bash-command-pandoc/command.js +3 -3
  129. package/dist/safe-bash-command-pandoc/index.js +3 -3
  130. package/dist/safe-bash-command-pr/command.js +5 -5
  131. package/dist/safe-bash-command-pr/format.js +2 -2
  132. package/dist/safe-bash-command-pr/index.js +5 -5
  133. package/dist/safe-bash-command-pr/internal.d.ts +0 -2
  134. package/dist/safe-bash-command-pr/internal.js +1 -1
  135. package/dist/safe-bash-command-pr/io.js +2 -2
  136. package/dist/safe-bash-command-pr/options.js +2 -2
  137. package/dist/safe-bash-command-shuf/input.js +3 -21
  138. package/dist/safe-bash-command-shuf/shuf.js +4 -27
  139. package/dist/safe-bash-command-split/index.js +3 -3
  140. package/dist/safe-bash-command-split/io.d.ts +0 -2
  141. package/dist/safe-bash-command-split/io.js +1 -1
  142. package/dist/safe-bash-command-split/outputs.js +2 -2
  143. package/dist/safe-bash-command-split/split.js +3 -3
  144. package/dist/safe-bash-command-ssconvert/index.js +1 -1
  145. package/dist/safe-bash-command-tree/arguments.js +3 -3
  146. package/dist/safe-bash-command-tree/charset.js +1 -1
  147. package/dist/safe-bash-command-tree/index.js +4 -4
  148. package/dist/safe-bash-command-tree/io.d.ts +0 -1
  149. package/dist/safe-bash-command-tree/io.js +1 -1
  150. package/dist/safe-bash-command-tree/pattern.js +2 -2
  151. package/dist/safe-bash-command-tree/tree.js +4 -4
  152. package/dist/safe-bash-command-tsort/command.js +4 -4
  153. package/dist/safe-bash-command-tsort/graph.js +2 -2
  154. package/dist/safe-bash-command-tsort/index.js +4 -4
  155. package/dist/safe-bash-command-tsort/internal.d.ts +0 -2
  156. package/dist/safe-bash-command-tsort/internal.js +1 -1
  157. package/dist/safe-bash-command-tsort/io.js +2 -2
  158. package/dist/safe-bash-command-yq/native-work.js +2 -1
  159. package/dist/safe-bash-io-engine/commands/archive/internal.d.ts +0 -1
  160. package/dist/safe-bash-io-engine/commands/archive/internal.js +3 -7
  161. package/dist/safe-bash-io-engine/shell/pattern.js +1 -1
  162. package/dist/safe-bash-io-engine/shell/string-operations.d.ts +0 -2
  163. package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
  164. package/dist/safe-bash-line-ending-engine/internal.d.ts +0 -2
  165. package/dist/safe-bash-line-ending-engine/internal.js +1 -9
  166. package/dist/safe-bash-query-engine/capture.js +5 -5
  167. package/dist/safe-bash-query-engine/dates.js +2 -2
  168. package/dist/safe-bash-query-engine/delpaths.js +5 -5
  169. package/dist/safe-bash-query-engine/formats.js +3 -3
  170. package/dist/safe-bash-query-engine/index.js +15 -15
  171. package/dist/safe-bash-query-engine/indices.js +5 -5
  172. package/dist/safe-bash-query-engine/input.js +2 -2
  173. package/dist/safe-bash-query-engine/interpreter.js +13 -13
  174. package/dist/safe-bash-query-engine/limits.js +1 -1
  175. package/dist/safe-bash-query-engine/parser.js +2 -2
  176. package/dist/safe-bash-query-engine/query-core.js +15 -15
  177. package/dist/safe-bash-query-engine/recurse.js +2 -2
  178. package/dist/safe-bash-query-engine/regex.js +5 -5
  179. package/dist/safe-bash-query-engine/split.js +2 -2
  180. package/dist/safe-bash-query-engine/splits.js +6 -6
  181. package/dist/safe-bash-query-engine/values.js +4 -4
  182. package/dist/safe-bash-regex-engine/ere/limits.d.ts +0 -1
  183. package/dist/safe-bash-regex-engine/ere/limits.js +1 -1
  184. package/dist/safe-bash-regex-engine/ere/matcher.js +5 -5
  185. package/dist/safe-bash-regex-engine/ere/syntax.js +2 -2
  186. package/dist/safe-bash-regex-engine/execution/bounded-provider.js +2 -4
  187. package/dist/safe-bash-text-stream-engine/stream-format/shared.d.ts +0 -2
  188. package/dist/safe-bash-text-stream-engine/stream-format/shared.js +1 -9
  189. package/dist/safe-bash-xml-engine/document.js +2 -2
  190. package/dist/safe-bash-xml-engine/index.js +3 -3
  191. package/dist/safe-bash-xml-engine/io.js +1 -1
  192. package/dist/safe-bash-xml-engine/limits.d.ts +0 -2
  193. package/dist/safe-bash-xml-engine/limits.js +1 -1
  194. package/dist/safe-bash-xml-engine/query.js +2 -2
  195. package/package.json +5 -4
@@ -57,7 +57,7 @@ import {
57
57
  parseShell,
58
58
  searchCommands,
59
59
  unrtfCommands
60
- } from "./chunks/chunk-ZXKVOJNL.js";
60
+ } from "./chunks/chunk-WUNK5NXJ.js";
61
61
  import {
62
62
  createYqCommand,
63
63
  createYqCommands,
@@ -75,7 +75,7 @@ import {
75
75
  ghCommands,
76
76
  ghMetadata,
77
77
  lazyCommandPlugin
78
- } from "./chunks/chunk-TGOF7VO5.js";
78
+ } from "./chunks/chunk-TRVGCN3U.js";
79
79
  import {
80
80
  applyPatchCommands,
81
81
  baseAgentCommands,
@@ -120,7 +120,7 @@ import {
120
120
  textProgramCommands,
121
121
  xxdCommands,
122
122
  yesCommands
123
- } from "./chunks/chunk-TCWZNUVP.js";
123
+ } from "./chunks/chunk-SPYL72GN.js";
124
124
  import {
125
125
  createHdCommand,
126
126
  createHexdumpCommand,
@@ -174,6 +174,7 @@ import {
174
174
  createLocaleCommands,
175
175
  createMetadataCommands,
176
176
  createMoreCommand,
177
+ createNcalCommand,
177
178
  createNprocCommand,
178
179
  createNprocCommands,
179
180
  createNumfmtCommand,
@@ -246,7 +247,7 @@ import {
246
247
  unameCommands,
247
248
  whichCommands,
248
249
  whoamiCommands
249
- } from "./chunks/chunk-D2XB7XIC.js";
250
+ } from "./chunks/chunk-AZAJJVFX.js";
250
251
  import "./chunks/chunk-U5NUZPCC.js";
251
252
  import {
252
253
  createGetoptCommand,
@@ -404,6 +405,7 @@ import {
404
405
  createLlmService,
405
406
  createLlmTemplateStore,
406
407
  createOpenAiProvider,
408
+ encodeLlmBase64,
407
409
  evaluateLlmTemplate,
408
410
  findExtractedRange,
409
411
  getLlmModelAliases,
@@ -412,10 +414,13 @@ import {
412
414
  parseLlmSchemaDsl,
413
415
  resolveLlmSchemaInput,
414
416
  selectLlmModelByQuery,
417
+ serializeLlmJsonString,
418
+ serializeLlmJsonValue,
419
+ serializeOpenAiChatRequest,
415
420
  templateYaml,
416
421
  validateLlmTemplateParameters,
417
422
  validateModelOptions
418
- } from "./chunks/chunk-C2NYCU7O.js";
423
+ } from "./chunks/chunk-JSVX4VIA.js";
419
424
  import {
420
425
  init_platform
421
426
  } from "./chunks/chunk-YG5WAHK7.js";
@@ -1206,6 +1211,112 @@ function optionalCommands(options = {}) {
1206
1211
  options.replace ?? false
1207
1212
  );
1208
1213
  }
1214
+ var createConvertCommand = (...args) => {
1215
+ const metadata = imagemagickMetadata.find((item) => item.name === "convert");
1216
+ if (!metadata) throw new TypeError("Unknown convert command");
1217
+ return createLazyCommands([metadata], async () => {
1218
+ const module = await loadimagemagick();
1219
+ return () => [module.createConvertCommand(...args)];
1220
+ })[0];
1221
+ };
1222
+ var createMogrifyCommand = (...args) => {
1223
+ const metadata = imagemagickMetadata.find((item) => item.name === "mogrify");
1224
+ if (!metadata) throw new TypeError("Unknown mogrify command");
1225
+ return createLazyCommands([metadata], async () => {
1226
+ const module = await loadimagemagick();
1227
+ return () => [module.createMogrifyCommand(...args)];
1228
+ })[0];
1229
+ };
1230
+ var createCompositeCommand = (...args) => {
1231
+ const metadata = imagemagickMetadata.find((item) => item.name === "composite");
1232
+ if (!metadata) throw new TypeError("Unknown composite command");
1233
+ return createLazyCommands([metadata], async () => {
1234
+ const module = await loadimagemagick();
1235
+ return () => [module.createCompositeCommand(...args)];
1236
+ })[0];
1237
+ };
1238
+ var createMontageCommand = (...args) => {
1239
+ const metadata = imagemagickMetadata.find((item) => item.name === "montage");
1240
+ if (!metadata) throw new TypeError("Unknown montage command");
1241
+ return createLazyCommands([metadata], async () => {
1242
+ const module = await loadimagemagick();
1243
+ return () => [module.createMontageCommand(...args)];
1244
+ })[0];
1245
+ };
1246
+ var createIdentifyCommand = (...args) => {
1247
+ const metadata = imagemagickMetadata.find((item) => item.name === "identify");
1248
+ if (!metadata) throw new TypeError("Unknown identify command");
1249
+ return createLazyCommands([metadata], async () => {
1250
+ const module = await loadimagemagick();
1251
+ return () => [module.createIdentifyCommand(...args)];
1252
+ })[0];
1253
+ };
1254
+ var createCompareCommand = (...args) => {
1255
+ const metadata = imagemagickMetadata.find((item) => item.name === "compare");
1256
+ if (!metadata) throw new TypeError("Unknown compare command");
1257
+ return createLazyCommands([metadata], async () => {
1258
+ const module = await loadimagemagick();
1259
+ return () => [module.createCompareCommand(...args)];
1260
+ })[0];
1261
+ };
1262
+ var createPdfuniteCommand = (...args) => {
1263
+ const metadata = pdfinfoMetadata.find((item) => item.name === "pdfunite");
1264
+ if (!metadata) throw new TypeError("Unknown pdfunite command");
1265
+ return createLazyCommands([metadata], async () => {
1266
+ const module = await loadpdfinfo();
1267
+ return () => [module.createPdfuniteCommand(...args)];
1268
+ })[0];
1269
+ };
1270
+ var createPdfseparateCommand = (...args) => {
1271
+ const metadata = pdfinfoMetadata.find((item) => item.name === "pdfseparate");
1272
+ if (!metadata) throw new TypeError("Unknown pdfseparate command");
1273
+ return createLazyCommands([metadata], async () => {
1274
+ const module = await loadpdfinfo();
1275
+ return () => [module.createPdfseparateCommand(...args)];
1276
+ })[0];
1277
+ };
1278
+ var createPdffontsCommand = (...args) => {
1279
+ const metadata = pdfinfoMetadata.find((item) => item.name === "pdffonts");
1280
+ if (!metadata) throw new TypeError("Unknown pdffonts command");
1281
+ return createLazyCommands([metadata], async () => {
1282
+ const module = await loadpdfinfo();
1283
+ return () => [module.createPdffontsCommand(...args)];
1284
+ })[0];
1285
+ };
1286
+ var createPdfdetachCommand = (...args) => {
1287
+ const metadata = pdfinfoMetadata.find((item) => item.name === "pdfdetach");
1288
+ if (!metadata) throw new TypeError("Unknown pdfdetach command");
1289
+ return createLazyCommands([metadata], async () => {
1290
+ const module = await loadpdfinfo();
1291
+ return () => [module.createPdfdetachCommand(...args)];
1292
+ })[0];
1293
+ };
1294
+ var createPdftocairoCommand = (...args) => {
1295
+ const metadata = pdftoppmMetadata.find((item) => item.name === "pdftocairo");
1296
+ if (!metadata) throw new TypeError("Unknown pdftocairo command");
1297
+ return createLazyCommands([metadata], async () => {
1298
+ const module = await loadpdfinfo();
1299
+ return () => [module.createPdftocairoCommand(...args)];
1300
+ })[0];
1301
+ };
1302
+ var createLibreofficeCommand = (...args) => {
1303
+ const metadata = sofficeMetadata.find((item) => item.name === "libreoffice");
1304
+ if (!metadata) throw new TypeError("Unknown libreoffice command");
1305
+ return createLazyCommands([metadata], async () => {
1306
+ const module = await loadsoffice();
1307
+ return () => [module.createLibreofficeCommand(...args)];
1308
+ })[0];
1309
+ };
1310
+ var createFormatInspectionCommand = (...args) => ({
1311
+ name: "pandoc",
1312
+ description: "List available document formats and dialect extensions",
1313
+ async execute(context) {
1314
+ context.signal.throwIfAborted();
1315
+ const module = await loadpandoc();
1316
+ context.signal.throwIfAborted();
1317
+ return module.createFormatInspectionCommand(...args).execute(context);
1318
+ }
1319
+ });
1209
1320
 
1210
1321
  // packages/safe-bash/src/commands/exiftool/index.ts
1211
1322
  init_platform();
@@ -1554,6 +1665,9 @@ export {
1554
1665
  createColumnCommand,
1555
1666
  createColumnCommands,
1556
1667
  createCommandArguments,
1668
+ createCompareCommand,
1669
+ createCompositeCommand,
1670
+ createConvertCommand,
1557
1671
  createCsplitCommand,
1558
1672
  createCsplitCommands,
1559
1673
  createCsvcutCommand,
@@ -1598,6 +1712,7 @@ export {
1598
1712
  createFmtCommands,
1599
1713
  createFoldCommand,
1600
1714
  createFoldCommands,
1715
+ createFormatInspectionCommand,
1601
1716
  createGetconfCommand,
1602
1717
  createGetconfCommands,
1603
1718
  createGetoptCommand,
@@ -1622,6 +1737,7 @@ export {
1622
1737
  createIconvCommands,
1623
1738
  createIdCommand,
1624
1739
  createIdCommands,
1740
+ createIdentifyCommand,
1625
1741
  createImagemagickCommand,
1626
1742
  createImagemagickCommands,
1627
1743
  createItemHandlers,
@@ -1629,6 +1745,7 @@ export {
1629
1745
  createLazyCommands,
1630
1746
  createLessCommand,
1631
1747
  createLessCommands,
1748
+ createLibreofficeCommand,
1632
1749
  createDos2unixCommands2 as createLineEndingCommands,
1633
1750
  createLlmCommand,
1634
1751
  createLlmCommands,
@@ -1644,8 +1761,11 @@ export {
1644
1761
  createMetadataCommands,
1645
1762
  createMmdcCommand,
1646
1763
  createMmdcCommands,
1764
+ createMogrifyCommand,
1765
+ createMontageCommand,
1647
1766
  createMoreCommand,
1648
1767
  createMountFileSystem,
1768
+ createNcalCommand,
1649
1769
  createNetworkCommands,
1650
1770
  createSafeJsNodeCommand as createNodeCommand,
1651
1771
  createSafeJsNodeCommands as createNodeCommands,
@@ -1672,16 +1792,21 @@ export {
1672
1792
  createPandocCommands,
1673
1793
  createPathchkCommand,
1674
1794
  createPathchkCommands,
1795
+ createPdfdetachCommand,
1796
+ createPdffontsCommand,
1675
1797
  createPdfimagesCommand,
1676
1798
  createPdfimagesCommands,
1677
1799
  createPdfinfoCommand,
1678
1800
  createPdfinfoCommands,
1801
+ createPdfseparateCommand,
1679
1802
  createPdftkCommand,
1680
1803
  createPdftkCommands,
1804
+ createPdftocairoCommand,
1681
1805
  createPdftoppmCommand,
1682
1806
  createPdftoppmCommands,
1683
1807
  createPdftotextCommand,
1684
1808
  createPdftotextCommands,
1809
+ createPdfuniteCommand,
1685
1810
  createPrCommand,
1686
1811
  createPrCommands,
1687
1812
  createPythonCommands,
@@ -1779,6 +1904,7 @@ export {
1779
1904
  dos2unixCommands,
1780
1905
  duCommands,
1781
1906
  createEgrepCommand as egrepCommand,
1907
+ encodeLlmBase64,
1782
1908
  envsubstCommands,
1783
1909
  evalSyncApplyPatch,
1784
1910
  evalSyncCsplit,
@@ -1908,6 +2034,9 @@ export {
1908
2034
  selectLlmModelByQuery,
1909
2035
  selectOpBackendContext,
1910
2036
  selectOpGlobalFlags,
2037
+ serializeLlmJsonString,
2038
+ serializeLlmJsonValue,
2039
+ serializeOpenAiChatRequest,
1911
2040
  sha512sumCommands,
1912
2041
  shufCommands,
1913
2042
  signalName,
@@ -496,4 +496,17 @@ export declare const optionalCommandCatalog: readonly Readonly<{
496
496
  }>[];
497
497
  export declare function createOptionalCommands(options?: OptionalCommandsOptions): readonly CommandDefinition[];
498
498
  export declare function optionalCommands(options?: OptionalCommandsOptions): VirtualShellPlugin;
499
+ export declare const createConvertCommand: imagemagickModule["createConvertCommand"];
500
+ export declare const createMogrifyCommand: imagemagickModule["createMogrifyCommand"];
501
+ export declare const createCompositeCommand: imagemagickModule["createCompositeCommand"];
502
+ export declare const createMontageCommand: imagemagickModule["createMontageCommand"];
503
+ export declare const createIdentifyCommand: imagemagickModule["createIdentifyCommand"];
504
+ export declare const createCompareCommand: imagemagickModule["createCompareCommand"];
505
+ export declare const createPdfuniteCommand: pdfinfoModule["createPdfuniteCommand"];
506
+ export declare const createPdfseparateCommand: pdfinfoModule["createPdfseparateCommand"];
507
+ export declare const createPdffontsCommand: pdfinfoModule["createPdffontsCommand"];
508
+ export declare const createPdfdetachCommand: pdfinfoModule["createPdfdetachCommand"];
509
+ export declare const createPdftocairoCommand: pdfinfoModule["createPdftocairoCommand"];
510
+ export declare const createLibreofficeCommand: sofficeModule["createLibreofficeCommand"];
511
+ export declare const createFormatInspectionCommand: pandocModule["createFormatInspectionCommand"];
499
512
  //# sourceMappingURL=lazy-optional.d.ts.map
@@ -606,4 +606,122 @@ export function createOptionalCommands(options = {}) {
606
606
  export function optionalCommands(options = {}) {
607
607
  return lazyCommandPlugin("optional-commands", createOptionalCommands(options), options.replace ?? false);
608
608
  }
609
+ export const createConvertCommand = (...args) => {
610
+ const metadata = imagemagickMetadata.find(item => item.name === "convert");
611
+ if (!metadata)
612
+ throw new TypeError("Unknown convert command");
613
+ return createLazyCommands([metadata], async () => {
614
+ const module = await loadimagemagick();
615
+ return () => [module.createConvertCommand(...args)];
616
+ })[0];
617
+ };
618
+ export const createMogrifyCommand = (...args) => {
619
+ const metadata = imagemagickMetadata.find(item => item.name === "mogrify");
620
+ if (!metadata)
621
+ throw new TypeError("Unknown mogrify command");
622
+ return createLazyCommands([metadata], async () => {
623
+ const module = await loadimagemagick();
624
+ return () => [module.createMogrifyCommand(...args)];
625
+ })[0];
626
+ };
627
+ export const createCompositeCommand = (...args) => {
628
+ const metadata = imagemagickMetadata.find(item => item.name === "composite");
629
+ if (!metadata)
630
+ throw new TypeError("Unknown composite command");
631
+ return createLazyCommands([metadata], async () => {
632
+ const module = await loadimagemagick();
633
+ return () => [module.createCompositeCommand(...args)];
634
+ })[0];
635
+ };
636
+ export const createMontageCommand = (...args) => {
637
+ const metadata = imagemagickMetadata.find(item => item.name === "montage");
638
+ if (!metadata)
639
+ throw new TypeError("Unknown montage command");
640
+ return createLazyCommands([metadata], async () => {
641
+ const module = await loadimagemagick();
642
+ return () => [module.createMontageCommand(...args)];
643
+ })[0];
644
+ };
645
+ export const createIdentifyCommand = (...args) => {
646
+ const metadata = imagemagickMetadata.find(item => item.name === "identify");
647
+ if (!metadata)
648
+ throw new TypeError("Unknown identify command");
649
+ return createLazyCommands([metadata], async () => {
650
+ const module = await loadimagemagick();
651
+ return () => [module.createIdentifyCommand(...args)];
652
+ })[0];
653
+ };
654
+ export const createCompareCommand = (...args) => {
655
+ const metadata = imagemagickMetadata.find(item => item.name === "compare");
656
+ if (!metadata)
657
+ throw new TypeError("Unknown compare command");
658
+ return createLazyCommands([metadata], async () => {
659
+ const module = await loadimagemagick();
660
+ return () => [module.createCompareCommand(...args)];
661
+ })[0];
662
+ };
663
+ export const createPdfuniteCommand = (...args) => {
664
+ const metadata = pdfinfoMetadata.find(item => item.name === "pdfunite");
665
+ if (!metadata)
666
+ throw new TypeError("Unknown pdfunite command");
667
+ return createLazyCommands([metadata], async () => {
668
+ const module = await loadpdfinfo();
669
+ return () => [module.createPdfuniteCommand(...args)];
670
+ })[0];
671
+ };
672
+ export const createPdfseparateCommand = (...args) => {
673
+ const metadata = pdfinfoMetadata.find(item => item.name === "pdfseparate");
674
+ if (!metadata)
675
+ throw new TypeError("Unknown pdfseparate command");
676
+ return createLazyCommands([metadata], async () => {
677
+ const module = await loadpdfinfo();
678
+ return () => [module.createPdfseparateCommand(...args)];
679
+ })[0];
680
+ };
681
+ export const createPdffontsCommand = (...args) => {
682
+ const metadata = pdfinfoMetadata.find(item => item.name === "pdffonts");
683
+ if (!metadata)
684
+ throw new TypeError("Unknown pdffonts command");
685
+ return createLazyCommands([metadata], async () => {
686
+ const module = await loadpdfinfo();
687
+ return () => [module.createPdffontsCommand(...args)];
688
+ })[0];
689
+ };
690
+ export const createPdfdetachCommand = (...args) => {
691
+ const metadata = pdfinfoMetadata.find(item => item.name === "pdfdetach");
692
+ if (!metadata)
693
+ throw new TypeError("Unknown pdfdetach command");
694
+ return createLazyCommands([metadata], async () => {
695
+ const module = await loadpdfinfo();
696
+ return () => [module.createPdfdetachCommand(...args)];
697
+ })[0];
698
+ };
699
+ export const createPdftocairoCommand = (...args) => {
700
+ const metadata = pdftoppmMetadata.find(item => item.name === "pdftocairo");
701
+ if (!metadata)
702
+ throw new TypeError("Unknown pdftocairo command");
703
+ return createLazyCommands([metadata], async () => {
704
+ const module = await loadpdfinfo();
705
+ return () => [module.createPdftocairoCommand(...args)];
706
+ })[0];
707
+ };
708
+ export const createLibreofficeCommand = (...args) => {
709
+ const metadata = sofficeMetadata.find(item => item.name === "libreoffice");
710
+ if (!metadata)
711
+ throw new TypeError("Unknown libreoffice command");
712
+ return createLazyCommands([metadata], async () => {
713
+ const module = await loadsoffice();
714
+ return () => [module.createLibreofficeCommand(...args)];
715
+ })[0];
716
+ };
717
+ export const createFormatInspectionCommand = (...args) => ({
718
+ name: "pandoc",
719
+ description: "List available document formats and dialect extensions",
720
+ async execute(context) {
721
+ context.signal.throwIfAborted();
722
+ const module = await loadpandoc();
723
+ context.signal.throwIfAborted();
724
+ return module.createFormatInspectionCommand(...args).execute(context);
725
+ }
726
+ });
609
727
  //# sourceMappingURL=lazy-optional.js.map
@@ -4,7 +4,7 @@ import { assertCountedFileOutput, writeFileOutputCounted } from "./filesystem-ou
4
4
  import { FsError } from "@poe-platform/safe-fs/core";
5
5
  import { writeBytes } from "@poe-platform/safe-bash/contracts/io";
6
6
  import { createOutputOperation } from "@poe-platform/safe-bash/contracts/output";
7
- import { hasYieldCheckpoint, monotonicNow, yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
7
+ import { yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
8
8
  import { DdConverter } from "./conversions.js";
9
9
  import { errorMessage, openDdFile, writeDdOutput } from "./io.js";
10
10
  import { DdError, parseDd, quote } from "./options.js";
@@ -246,15 +246,6 @@ export function createDdCommand(options = {}) {
246
246
  let previousShort = 0;
247
247
  let partialRecord = 0;
248
248
  let warned = false;
249
- let lastYieldTime = monotonicNow();
250
- let yieldChecks = 0;
251
- const maybeYield = async () => {
252
- context.signal.throwIfAborted();
253
- if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(context.signal) || monotonicNow() - lastYieldTime >= 16) {
254
- await yieldTurn(context.signal);
255
- lastYieldTime = monotonicNow();
256
- }
257
- };
258
249
  const read = async (size) => {
259
250
  context.signal.throwIfAborted();
260
251
  if (++readOperations > limits.maxReadOperations)
@@ -298,7 +289,7 @@ export function createDdCommand(options = {}) {
298
289
  skipRecords--;
299
290
  else
300
291
  skipRemainder = 0n;
301
- await maybeYield();
292
+ await yieldTurn(context.signal);
302
293
  }
303
294
  if (skipped < skipOffset && plan.status !== "none")
304
295
  await diagnostic(`${quote(plan.input ?? "standard input")}: cannot skip to specified offset`);
@@ -360,7 +351,7 @@ export function createDdCommand(options = {}) {
360
351
  report.stats.outputPartial++;
361
352
  }
362
353
  }
363
- await maybeYield();
354
+ await yieldTurn(context.signal);
364
355
  };
365
356
  const outputBuffer = new Uint8Array(copying && plan.twoBuffers ? obs : 0);
366
357
  let used = 0;
@@ -450,7 +441,7 @@ export function createDdCommand(options = {}) {
450
441
  await converter.push(chunk);
451
442
  else
452
443
  await emit(chunk);
453
- await maybeYield();
444
+ await yieldTurn(context.signal);
454
445
  }
455
446
  await converter?.finish();
456
447
  if (used) {
@@ -1,5 +1,5 @@
1
1
  import { createOutputOperation } from "@poe-platform/safe-bash/contracts";
2
- import { yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
2
+ import { inheritYieldCheckpoint, yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
3
3
  export const mikeLimits = Object.freeze({
4
4
  maxInputBytes: Infinity, maxDocumentBytes: Infinity,
5
5
  maxScalarBytes: Infinity, maxNodes: Infinity, maxParserNodes: Infinity,
@@ -49,6 +49,7 @@ export class NativeWork {
49
49
  constructor(context, limits) {
50
50
  this.context = context;
51
51
  this.limits = limits;
52
+ inheritYieldCheckpoint(context.signal, this.signal);
52
53
  context.registerCleanup?.(() => this.close());
53
54
  const abort = () => { this.#aborted = true; this.controller.abort(context.signal.reason); };
54
55
  this.signal.addEventListener("abort", () => { this.#aborted = true; }, { once: true });
@@ -1,5 +1,5 @@
1
1
  import { FsError, readBytes } from "@poe-platform/safe-bash/contracts";
2
- import { hasYieldCheckpoint, monotonicNow, runYieldCheckpoint, yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
2
+ import { yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
3
3
  import { Diagnostic } from "./args.js";
4
4
  export function virtualPath(cwd, name) {
5
5
  if (name === "")
@@ -173,8 +173,6 @@ export async function* records(source, delimiter, limit, signal) {
173
173
  let pending = new Uint8Array(Math.min(256, limit));
174
174
  let used = 0;
175
175
  let scanned = 0;
176
- let lastYield = monotonicNow();
177
- let yieldChecks = 0;
178
176
  for await (const rawChunk of source) {
179
177
  const chunk = Uint8Array.prototype.slice.call(rawChunk);
180
178
  let start = 0;
@@ -205,14 +203,7 @@ export async function* records(source, delimiter, limit, signal) {
205
203
  }
206
204
  }
207
205
  if (++scanned % 8192 === 0) {
208
- if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(signal) || monotonicNow() - lastYield >= 25) {
209
- await yieldTurn(signal);
210
- lastYield = monotonicNow();
211
- }
212
- else {
213
- runYieldCheckpoint(signal);
214
- signal.throwIfAborted();
215
- }
206
+ await yieldTurn(signal);
216
207
  }
217
208
  }
218
209
  }
@@ -230,8 +221,6 @@ export async function readAllRecords(source, delimiter, maxBytes, maxRecords, si
230
221
  let used = 0;
231
222
  let scanned = 0;
232
223
  let totalBytes = 0;
233
- let lastYield = monotonicNow();
234
- let yieldChecks = 0;
235
224
  for await (const rawChunk of source) {
236
225
  const chunk = Uint8Array.prototype.slice.call(rawChunk);
237
226
  let start = 0;
@@ -271,14 +260,7 @@ export async function readAllRecords(source, delimiter, maxBytes, maxRecords, si
271
260
  }
272
261
  }
273
262
  if (++scanned % 8192 === 0) {
274
- const now = monotonicNow();
275
- if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(signal) || now - lastYield >= 16) {
276
- await yieldTurn(signal);
277
- lastYield = monotonicNow();
278
- }
279
- else {
280
- runYieldCheckpoint(signal);
281
- }
263
+ await yieldTurn(signal);
282
264
  }
283
265
  }
284
266
  }
@@ -1,6 +1,6 @@
1
1
  import { builtInDirectContextExecutors, commandRuntimeIdentity, createBufferedOutput, getCommandArguments, isFsError, writeBytes, } from "@poe-platform/safe-bash/contracts";
2
2
  import { openFileOutput } from "./filesystem-output.js";
3
- import { hasYieldCheckpoint, inheritYieldCheckpoint, monotonicNow, runYieldCheckpoint, yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
3
+ import { inheritYieldCheckpoint, yieldTurn } from "@poe-platform/safe-bash/contracts/yield";
4
4
  import { countMax, Diagnostic, fileQuote, parse, quote, unicodeLocale } from "./args.js";
5
5
  import { FileInput, ownedBytes, readAllRecords, records, virtualPath } from "./input.js";
6
6
  import { settings } from "./options.js";
@@ -25,8 +25,6 @@ export function createShufCommand(options = {}) {
25
25
  runtimeIdentity: commandRuntimeIdentity,
26
26
  description: "Write a random permutation of input records",
27
27
  async execute(context) {
28
- let lastYield = monotonicNow();
29
- let yieldChecks = 0;
30
28
  let random;
31
29
  let output;
32
30
  let source;
@@ -152,14 +150,7 @@ export function createShufCommand(options = {}) {
152
150
  }
153
151
  seen++;
154
152
  if (seen % 1024n === 0n) {
155
- if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(context.signal) || monotonicNow() - lastYield >= 25) {
156
- await yieldTurn(context.signal);
157
- lastYield = monotonicNow();
158
- }
159
- else {
160
- runYieldCheckpoint(context.signal);
161
- context.signal.throwIfAborted();
162
- }
153
+ await yieldTurn(context.signal);
163
154
  }
164
155
  }
165
156
  }
@@ -185,14 +176,7 @@ export function createShufCommand(options = {}) {
185
176
  swaps.set(chosen, swaps.get(index) ?? index);
186
177
  swaps.delete(index);
187
178
  if (index % 1024n === 1023n) {
188
- if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(context.signal) || monotonicNow() - lastYield >= 25) {
189
- await yieldTurn(context.signal);
190
- lastYield = monotonicNow();
191
- }
192
- else {
193
- runYieldCheckpoint(context.signal);
194
- context.signal.throwIfAborted();
195
- }
179
+ await yieldTurn(context.signal);
196
180
  }
197
181
  }
198
182
  }
@@ -227,14 +211,7 @@ export function createShufCommand(options = {}) {
227
211
  if (parsed.repeat && parsed.random !== undefined)
228
212
  await sink.flush();
229
213
  if (index % 256n === 255n) {
230
- if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(context.signal) || monotonicNow() - lastYield >= 25) {
231
- await yieldTurn(context.signal);
232
- lastYield = monotonicNow();
233
- }
234
- else {
235
- runYieldCheckpoint(context.signal);
236
- context.signal.throwIfAborted();
237
- }
214
+ await yieldTurn(context.signal);
238
215
  }
239
216
  }
240
217
  await sink.flush();
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  agentCommands,
3
3
  createAgentCommands
4
- } from "../chunks/chunk-TGOF7VO5.js";
4
+ } from "../chunks/chunk-TRVGCN3U.js";
5
5
  import {
6
6
  baseAgentCommands
7
- } from "../chunks/chunk-TCWZNUVP.js";
7
+ } from "../chunks/chunk-SPYL72GN.js";
8
8
  import "../chunks/chunk-M4CFCXHN.js";
9
9
  import "../chunks/chunk-T3JTVIEP.js";
10
10
  import "../chunks/chunk-MHZ24KEI.js";
11
- import "../chunks/chunk-D2XB7XIC.js";
11
+ import "../chunks/chunk-AZAJJVFX.js";
12
12
  import "../chunks/chunk-U5NUZPCC.js";
13
13
  import "../chunks/chunk-3L3T6LYV.js";
14
14
  import "../chunks/chunk-H6JW3E4F.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  baseAgentCommands
3
- } from "./chunks/chunk-TCWZNUVP.js";
3
+ } from "./chunks/chunk-SPYL72GN.js";
4
4
  import "./chunks/chunk-M4CFCXHN.js";
5
5
  import "./chunks/chunk-T3JTVIEP.js";
6
6
  import "./chunks/chunk-MHZ24KEI.js";
7
- import "./chunks/chunk-D2XB7XIC.js";
7
+ import "./chunks/chunk-AZAJJVFX.js";
8
8
  import "./chunks/chunk-U5NUZPCC.js";
9
9
  import "./chunks/chunk-3L3T6LYV.js";
10
10
  import "./chunks/chunk-H6JW3E4F.js";
@@ -1,10 +1,11 @@
1
1
  const warned = new WeakSet();
2
2
  export function warnIfHostProcessEnv(env) {
3
- if (!env || typeof process === "undefined" || !process.env)
3
+ const hostProcess = globalThis.process;
4
+ if (!env || !hostProcess?.env)
4
5
  return;
5
6
  if (warned.has(env))
6
7
  return;
7
- if (env !== process.env)
8
+ if (env !== hostProcess.env)
8
9
  return;
9
10
  warned.add(env);
10
11
  console.warn("[safe-bash] warning: the shell `env` is the host `process.env`. Scripts executed in this shell can read every value in it, including secrets; on Cloudflare Workers with nodejs_compat, process.env contains the Worker's secret bindings. Pass only the variables your scripts need. See docs/issues/safe-bash-cloudflare-security-audit.md (finding 1).");
@@ -25835,7 +25835,7 @@ export class Runtime {
25835
25835
  if (part.length)
25836
25836
  return String(binding?.values.size ?? (part.name === "FUNCNAME" && state.variables.FUNCNAME === undefined ? state.functionNames?.length ?? 0 : state.variables[part.name] === undefined ? 0 : 1));
25837
25837
  const values = await this.arrayMembers(part.name, state, io, selector.kind === "keys" || part.keys === true, part.substring);
25838
- const space = (selector.kind === "keys" || part.keys === true) ? Boolean(hereDocument || (selector.separator === "@" ? !part.quoted && !split || state.variables.IFS === "" : !part.quoted && split && state.variables.IFS === "")) : (!split && selector.separator === "@" && (!part.substring || !part.quoted || state.variables.IFS === ""));
25838
+ const space = (selector.kind === "keys" || part.keys === true) ? Boolean(hereDocument || (selector.separator === "@" ? !part.quoted && !split || state.variables.IFS === "" : !part.quoted && split && state.variables.IFS === "")) : (!split && selector.separator === "@");
25839
25839
  return this.arrayJoin(store.owner, values, space ? " " : this.ifsSeparator(state, io));
25840
25840
  }
25841
25841
  if (part.substring && (part.name === "@" || part.name === "*")) {
@@ -26558,7 +26558,7 @@ export class Runtime {
26558
26558
  }
26559
26559
  const ifsVal = monitor?.values.get("IFS", rawVars.IFS ?? " ") ?? rawVars.IFS ?? " ";
26560
26560
  if (validElemOp && typeof ifsVal === "string" && (ifsVal.length === 0 || ifsVal.charCodeAt(0) < 128)) {
26561
- const sep = selector.separator === "@" && (ifsVal.length === 0 || !isKeys && part.operator === undefined && !part.substring) ? " " : ifsVal.length > 0 ? ifsVal[0] : "";
26561
+ const sep = selector.separator === "@" && (ifsVal.length === 0 || !isKeys && part.operator === undefined) ? " " : ifsVal.length > 0 ? ifsVal[0] : "";
26562
26562
  const parameterLine = part.line ?? overrideDiagnosticLine;
26563
26563
  const evalSliceInt = (w) => {
26564
26564
  if (w.parts.length === 0)
@@ -4,9 +4,9 @@ import {
4
4
  ShellSyntaxError,
5
5
  cloudflareWorkerLimits,
6
6
  parseShell
7
- } from "./chunks/chunk-ZXKVOJNL.js";
7
+ } from "./chunks/chunk-WUNK5NXJ.js";
8
8
  import "./chunks/chunk-AKC46AF6.js";
9
- import "./chunks/chunk-D2XB7XIC.js";
9
+ import "./chunks/chunk-AZAJJVFX.js";
10
10
  import "./chunks/chunk-U5NUZPCC.js";
11
11
  import "./chunks/chunk-3L3T6LYV.js";
12
12
  import "./chunks/chunk-H6JW3E4F.js";