@poe-platform/safe-bash 0.1.809 → 0.1.810

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 (109) hide show
  1. package/dist/audio-ast/index.d.ts +1 -1
  2. package/dist/audio-ast/index.js +6 -0
  3. package/dist/audio-ast/wav-source.d.ts +7 -1
  4. package/dist/image-ast/index.js +1 -1
  5. package/dist/pdf-ast/cos/mutable-object-store.d.ts +3 -0
  6. package/dist/pdf-ast/cos/qpdf-json-document.d.ts +42 -0
  7. package/dist/pdf-ast/cos/qpdf-json-values.d.ts +7 -0
  8. package/dist/pdf-ast/index.d.ts +1 -0
  9. package/dist/pdf-ast/index.js +508 -37
  10. package/dist/pdf-ast/retained-document.d.ts +3 -1
  11. package/dist/safe-bash/chunks/{chunk-RQCK77SC.js → chunk-65TFMAZU.js} +2 -2
  12. package/dist/safe-bash/chunks/{chunk-SOFBGDXG.js → chunk-HHSOUC3Z.js} +32 -0
  13. package/dist/safe-bash/chunks/{chunk-WAZEELYB.js → chunk-ZA5FQ34E.js} +10 -5
  14. package/dist/safe-bash/command-chunks/biff-ORSHM4YX-QYPGRDAZ.js +4937 -0
  15. package/dist/safe-bash/command-chunks/{chunk-62ZAHKFS.js → chunk-2VCKUNDZ.js} +130 -14
  16. package/dist/safe-bash/command-chunks/{chunk-GLVD3JJG.js → chunk-BYZUOF6X.js} +2858 -2816
  17. package/dist/safe-bash/command-chunks/{chunk-6OKH4X67.js → chunk-CAXJ4RLF.js} +264 -1
  18. package/dist/safe-bash/command-chunks/{chunk-YJJBGN7U.js → chunk-CHR2OD2U.js} +9 -9
  19. package/dist/safe-bash/command-chunks/{chunk-D7XBUF76.js → chunk-D2ASPM7R.js} +109 -23
  20. package/dist/safe-bash/command-chunks/chunk-D5AYP2UM.js +816 -0
  21. package/dist/safe-bash/command-chunks/{chunk-WFDG3N5R.js → chunk-ECDEPKKW.js} +1 -1
  22. package/dist/safe-bash/command-chunks/{chunk-OQCJGUI6.js → chunk-HARUYHH7.js} +10 -10
  23. package/dist/safe-bash/command-chunks/{chunk-NVBUC644.js → chunk-HKGNBH7Z.js} +2 -2
  24. package/dist/safe-bash/command-chunks/chunk-MGBHGZEX.js +12 -0
  25. package/dist/safe-bash/command-chunks/{chunk-4557HE3J.js → chunk-PMWW7KSB.js} +161 -42
  26. package/dist/safe-bash/command-chunks/{chunk-JW3KIZU6.js → chunk-RUXY7GN5.js} +1 -1
  27. package/dist/safe-bash/command-chunks/{chunk-KELMIFVV.js → chunk-TI52LKLL.js} +1 -1
  28. package/dist/safe-bash/command-chunks/{chunk-JJQ72P3V.js → chunk-VCML4T5D.js} +1 -1
  29. package/dist/safe-bash/command-chunks/{chunk-5HGEXQVD.js → chunk-WC2OCF4H.js} +1 -1
  30. package/dist/safe-bash/command-chunks/chunk-WH3TIOTS.js +326 -0
  31. package/dist/safe-bash/command-chunks/{chunk-45FI2IPY.js → chunk-WQ6ABTJU.js} +3 -6
  32. package/dist/safe-bash/command-chunks/{chunk-NB7JO7FE.js → chunk-YTFWPJ3F.js} +1 -1
  33. package/dist/safe-bash/command-chunks/{chunk-GKYCV6BU.js → chunk-ZEPDT6I5.js} +482 -168
  34. package/dist/safe-bash/command-chunks/{command-engine-P5DFM4OU.js → command-engine-BEWABZ75.js} +10 -3
  35. package/dist/safe-bash/command-chunks/{engine-RU4OFLPO-CPLFYD67.js → engine-MEPOXIXT-WZMRHACG.js} +1 -1
  36. package/dist/safe-bash/command-chunks/pdf-LOZAXXS6-ERI57IAV.js +557 -0
  37. package/dist/safe-bash/commands/audio/index.browser.js +2 -14
  38. package/dist/safe-bash/commands/diff-patch/index.js +0 -2
  39. package/dist/safe-bash/commands/ffprobe/index.browser.js +2 -5
  40. package/dist/safe-bash/commands/pandoc/index.browser.js +3 -1
  41. package/dist/safe-bash/commands/text.js +10 -1
  42. package/dist/safe-bash/core.d.ts +2 -2
  43. package/dist/safe-bash/core.js +2 -2
  44. package/dist/safe-bash/full-core.browser.js +18 -22
  45. package/dist/safe-bash/lazy-optional.d.ts +9 -0
  46. package/dist/safe-bash/lazy-optional.js +24 -0
  47. package/dist/safe-bash/plugins/index.browser.js +5 -3
  48. package/dist/safe-bash/registry-entry.browser.js +1 -1
  49. package/dist/safe-bash-command-apply-patch/apply.js +2 -2
  50. package/dist/safe-bash-command-apply-patch/index.js +2 -2
  51. package/dist/safe-bash-command-apply-patch/parser.d.ts +20 -1
  52. package/dist/safe-bash-command-apply-patch/parser.js +1 -1
  53. package/dist/safe-bash-command-ffprobe/index.js +2 -1
  54. package/dist/safe-bash-command-ffprobe/media.js +2 -1
  55. package/dist/safe-bash-command-ffprobe/options.d.ts +15 -0
  56. package/dist/safe-bash-command-ffprobe/options.js +7 -0
  57. package/dist/safe-bash-command-media/index.js +2 -2
  58. package/dist/safe-bash-command-media/plugin.js +1 -1
  59. package/dist/safe-bash-command-media/remote.js +2 -2
  60. package/dist/safe-bash-command-pandoc/command.js +6 -6
  61. package/dist/safe-bash-command-pandoc/index.js +31 -31
  62. package/dist/safe-bash-command-patch/index.js +2 -2
  63. package/dist/safe-bash-command-patch/patch-publication.d.ts +2 -2
  64. package/dist/safe-bash-command-patch/patch-publication.js +1 -1
  65. package/dist/safe-bash-command-patch/patch.js +2 -2
  66. package/dist/safe-bash-command-pptx/engine.js +1 -1
  67. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  68. package/dist/safe-bash-command-xmllint/index.js +137 -30
  69. package/dist/safe-bash-compression-engine/bounded-codec.js +2 -2
  70. package/dist/safe-bash-compression-engine/codec-loader.js +1 -1
  71. package/dist/safe-bash-compression-engine/files.js +5 -5
  72. package/dist/safe-bash-compression-engine/index.js +4 -4
  73. package/dist/safe-bash-compression-engine/operand.js +5 -5
  74. package/dist/safe-bash-compression-engine/stream.js +4 -4
  75. package/dist/safe-bash-compression-engine/zstd-decode.js +3 -3
  76. package/dist/safe-bash-media-engine/imagemagick.d.ts +2 -0
  77. package/dist/safe-bash-media-engine/index.js +162 -72
  78. package/dist/safe-bash-network-engine/body.d.ts +1 -0
  79. package/dist/safe-bash-network-engine/body.js +1 -1
  80. package/dist/safe-bash-network-engine/transfer.js +11 -3
  81. package/dist/safe-bash-presentation-engine/command-placeholder.js +4 -3
  82. package/dist/safe-bash-presentation-engine/index.d.ts +1 -1
  83. package/dist/safe-bash-presentation-engine/index.js +9 -4
  84. package/dist/safe-bash-presentation-engine/presentation-model.js +3 -2
  85. package/dist/safe-bash-presentation-engine/retained-text.js +3 -3
  86. package/dist/safe-bash-presentation-engine/retained-xml-parts.d.ts +26 -0
  87. package/dist/safe-bash-presentation-engine/xml-parts.d.ts +1 -0
  88. package/dist/safe-bash-presentation-engine/xml-parts.js +7 -1
  89. package/dist/safe-bash-xml-engine/document.js +1 -1
  90. package/dist/safe-bash-xml-engine/index.js +1 -1
  91. package/dist/spreadsheet-engine/rendering/print/tab-layout.d.ts +11 -0
  92. package/dist/spreadsheet-engine/rendering/print/tab-layout.js +15 -0
  93. package/dist/spreadsheet-engine/rendering/print/text-lines.d.ts +2 -2
  94. package/dist/spreadsheet-engine/rendering/print/text-lines.js +3 -3
  95. package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +4 -0
  96. package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +137 -56
  97. package/dist/spreadsheet-format-xls/biff-encryption.d.ts +1 -1
  98. package/dist/spreadsheet-format-xls/biff-encryption.js +8 -3
  99. package/dist/spreadsheet-format-xls/biff-property-bytes.d.ts +1 -1
  100. package/dist/spreadsheet-format-xls/biff-property-bytes.js +2 -2
  101. package/dist/spreadsheet-format-xls/biff.js +11 -3
  102. package/package.json +3 -2
  103. package/dist/safe-bash/chunks/chunk-I2A5ZCPD.js +0 -17
  104. package/dist/safe-bash/chunks/chunk-PQTT2EZP.js +0 -8
  105. package/dist/safe-bash/command-chunks/biff-DS263V2K-2GP4GZT7.js +0 -4868
  106. package/dist/safe-bash/command-chunks/chunk-6ZFYWT3U.js +0 -581
  107. package/dist/safe-bash/command-chunks/chunk-S244SWDH.js +0 -153
  108. package/dist/safe-bash/command-chunks/pdf-T7AWYZGQ-KNAYJ7YF.js +0 -552
  109. /package/dist/safe-bash/command-chunks/{chunk-EMMSXKEJ.js → chunk-4Q4R3VZU.js} +0 -0
@@ -1,17 +1,5 @@
1
- import {
2
- audioCommands,
3
- createAudioCommand,
4
- createAudioCommands,
5
- createFfprobeCommand,
6
- createFfprobeCommands,
7
- createSoxCommand,
8
- createSoxCommands,
9
- createSoxiCommand,
10
- createSoxiCommands,
11
- ffprobeCommands,
12
- soxCommands,
13
- soxiCommands
14
- } from "../../chunks/chunk-I2A5ZCPD.js";
1
+ // packages/safe-bash/src/commands/audio/index.ts
2
+ import { audioCommands, createAudioCommand, createAudioCommands, createFfprobeCommand, createFfprobeCommands, createSoxCommand, createSoxCommands, createSoxiCommand, createSoxiCommands, ffprobeCommands, soxCommands, soxiCommands } from "../../../safe-bash-command-audio/index.js";
15
3
  export {
16
4
  audioCommands,
17
5
  createAudioCommand,
@@ -1,6 +1,4 @@
1
1
  import { syncCommandEvaluators } from "../internal.js";
2
- import { evalSyncPatch } from "../../../safe-bash-command-patch/index.js";
3
- syncCommandEvaluators.evalSyncPatch = evalSyncPatch;
4
2
  import { registerDefaultExecutors } from "../internal.js";
5
3
  import { diffCommand } from "../../../safe-bash-command-diff/index.js";
6
4
  import { patchCommand } from "../../../safe-bash-command-patch/index.js";
@@ -1,8 +1,5 @@
1
- import {
2
- createFfprobeCommand,
3
- createFfprobeCommands,
4
- ffprobeCommands
5
- } from "../../chunks/chunk-PQTT2EZP.js";
1
+ // packages/safe-bash/src/commands/ffprobe/index.ts
2
+ import { createFfprobeCommand, createFfprobeCommands, ffprobeCommands } from "../../../safe-bash-command-ffprobe/index.js";
6
3
  export {
7
4
  createFfprobeCommand,
8
5
  createFfprobeCommands,
@@ -2,7 +2,9 @@ import {
2
2
  createPandocCommand,
3
3
  createPandocCommands,
4
4
  pandocCommands
5
- } from "../../chunks/chunk-SOFBGDXG.js";
5
+ } from "../../chunks/chunk-HHSOUC3Z.js";
6
+ import "../../chunks/chunk-4KYUJ3GC.js";
7
+ import "../../chunks/chunk-6E4SGHLU.js";
6
8
  import "../../chunks/chunk-JQ3O3I4G.js";
7
9
 
8
10
  // packages/safe-bash/src/commands/pandoc/index.ts
@@ -805,7 +805,16 @@ async function executeUniqGeneral(context, preReadSource) {
805
805
  if (outUsed > 0)
806
806
  yield outBuf.subarray(0, outUsed);
807
807
  })();
808
- await emitRecords(context, records, parsed.operands[1]);
808
+ try {
809
+ await emitRecords(context, records, parsed.operands[1]);
810
+ }
811
+ catch (error) {
812
+ context.signal.throwIfAborted();
813
+ const consumer = parsed.operands[1] === undefined ? context.stdout.ownedOutput?.consumerClosed : undefined;
814
+ if (consumer?.aborted && consumer.reason === error && error instanceof FsError && error.code === "EPIPE")
815
+ return { exitCode: 141 };
816
+ throw error;
817
+ }
809
818
  return { exitCode: 0 };
810
819
  }
811
820
  export function textCommands() {
@@ -203,9 +203,9 @@ export { createRsvgConvertCommand, createRsvgConvertCommands, rsvgConvertCommand
203
203
  export { createNeatoCommand, createNeatoCommands, neatoCommands, type NeatoCommandsOptions, type NeatoLimits } from "./commands/neato/index.js";
204
204
  export { createSvgoCommand, createSvgoCommands, svgoCommands, type SvgoCommandsOptions, type SvgoLimits } from "./commands/svgo/index.js";
205
205
  export { createGraphvizCommands, graphvizCommands, type GraphvizCommandsOptions } from "./commands/graphviz/index.js";
206
- export { createFfprobeCommands, ffprobeCommands, type FfprobeCommandsOptions, type FfprobeLimits } from "./commands/ffprobe/index.js";
206
+ export { createFfprobeCommands, ffprobeCommands, type FfprobeCommandsOptions, type FfprobeLimits } from "./lazy-optional.js";
207
207
  export { createSoxCommand, createSoxCommands, soxCommands, type SoxCommandsOptions, type SoxLimits } from "./commands/sox/index.js";
208
208
  export { createSoxiCommand, createSoxiCommands, soxiCommands, type SoxiCommandsOptions, type SoxiLimits } from "./commands/soxi/index.js";
209
- export { createAudioCommand, createAudioCommands, audioCommands, type AudioCommandsOptions } from "./commands/audio/index.js";
209
+ export { createAudioCommand, createAudioCommands, audioCommands, type AudioCommandsOptions } from "./lazy-optional.js";
210
210
  export { createSortCommand, createSortCommands, sortCommands, defaultSortLimits, type SortCommandsOptions, type SortLimits } from "./commands/sort/index.js";
211
211
  //# sourceMappingURL=core.d.ts.map
@@ -184,9 +184,9 @@ export { createRsvgConvertCommand, createRsvgConvertCommands, rsvgConvertCommand
184
184
  export { createNeatoCommand, createNeatoCommands, neatoCommands } from "./commands/neato/index.js";
185
185
  export { createSvgoCommand, createSvgoCommands, svgoCommands } from "./commands/svgo/index.js";
186
186
  export { createGraphvizCommands, graphvizCommands } from "./commands/graphviz/index.js";
187
- export { createFfprobeCommands, ffprobeCommands } from "./commands/ffprobe/index.js";
187
+ export { createFfprobeCommands, ffprobeCommands } from "./lazy-optional.js";
188
188
  export { createSoxCommand, createSoxCommands, soxCommands } from "./commands/sox/index.js";
189
189
  export { createSoxiCommand, createSoxiCommands, soxiCommands } from "./commands/soxi/index.js";
190
- export { createAudioCommand, createAudioCommands, audioCommands } from "./commands/audio/index.js";
190
+ export { createAudioCommand, createAudioCommands, audioCommands } from "./lazy-optional.js";
191
191
  export { createSortCommand, createSortCommands, sortCommands, defaultSortLimits } from "./commands/sort/index.js";
192
192
  //# sourceMappingURL=core.js.map
@@ -33,7 +33,7 @@ import {
33
33
  htmlqCommands,
34
34
  mmdcCommands,
35
35
  unrtfCommands
36
- } from "./chunks/chunk-RQCK77SC.js";
36
+ } from "./chunks/chunk-65TFMAZU.js";
37
37
  import {
38
38
  createMikeYqCommand,
39
39
  createMikeYqCommands,
@@ -225,7 +225,7 @@ import {
225
225
  xanCommands,
226
226
  xxdCommands,
227
227
  yesCommands
228
- } from "./chunks/chunk-WAZEELYB.js";
228
+ } from "./chunks/chunk-ZA5FQ34E.js";
229
229
  import {
230
230
  createDos2unixCommand,
231
231
  createDos2unixCommands,
@@ -374,25 +374,6 @@ import {
374
374
  createGraphvizCommands,
375
375
  graphvizCommands
376
376
  } from "./chunks/chunk-AZMPNCQT.js";
377
- import {
378
- audioCommands,
379
- createAudioCommand,
380
- createAudioCommands
381
- } from "./chunks/chunk-I2A5ZCPD.js";
382
- import {
383
- createFfprobeCommands,
384
- ffprobeCommands
385
- } from "./chunks/chunk-PQTT2EZP.js";
386
- import {
387
- createSoxCommand,
388
- createSoxCommands,
389
- soxCommands
390
- } from "./chunks/chunk-4KYUJ3GC.js";
391
- import {
392
- createSoxiCommand,
393
- createSoxiCommands,
394
- soxiCommands
395
- } from "./chunks/chunk-6E4SGHLU.js";
396
377
  import {
397
378
  createHtmlToMarkdownCommand,
398
379
  createHtmlToMarkdownCommands,
@@ -489,6 +470,9 @@ import {
489
470
  createCallerCommands
490
471
  } from "./chunks/chunk-WO7UWBQW.js";
491
472
  import {
473
+ audioCommands,
474
+ createAudioCommand,
475
+ createAudioCommands,
492
476
  createCompareCommand,
493
477
  createCompositeCommand,
494
478
  createConvertCommand,
@@ -497,6 +481,7 @@ import {
497
481
  createFfmpegCommand,
498
482
  createFfmpegCommands,
499
483
  createFfprobeCommand,
484
+ createFfprobeCommands,
500
485
  createFormatInspectionCommand,
501
486
  createGhCommand,
502
487
  createGhCommands,
@@ -545,6 +530,7 @@ import {
545
530
  createWkhtmltopdfCommands,
546
531
  csvkitCommands,
547
532
  ffmpegCommands,
533
+ ffprobeCommands,
548
534
  ghCommands,
549
535
  gitCommands,
550
536
  imagemagickCommands,
@@ -565,7 +551,17 @@ import {
565
551
  sofficeCommands,
566
552
  ssconvertCommands,
567
553
  wkhtmltopdfCommands
568
- } from "./chunks/chunk-SOFBGDXG.js";
554
+ } from "./chunks/chunk-HHSOUC3Z.js";
555
+ import {
556
+ createSoxCommand,
557
+ createSoxCommands,
558
+ soxCommands
559
+ } from "./chunks/chunk-4KYUJ3GC.js";
560
+ import {
561
+ createSoxiCommand,
562
+ createSoxiCommands,
563
+ soxiCommands
564
+ } from "./chunks/chunk-6E4SGHLU.js";
569
565
  import {
570
566
  createSearchCommands,
571
567
  evalSyncRg,
@@ -8,6 +8,15 @@ export declare const createFfmpegCommands: ffmpegModule["createFfmpegCommands"];
8
8
  export declare const ffmpegCommands: ffmpegModule["ffmpegCommands"];
9
9
  export type { FfmpegCommandsOptions } from "./commands/ffmpeg/index.js";
10
10
  export type { FfmpegCommandPair } from "./commands/ffmpeg/index.js";
11
+ type ffprobeModule = typeof import("./commands/ffprobe/index.js");
12
+ export declare const createFfprobeCommands: ffprobeModule["createFfprobeCommands"];
13
+ export declare const ffprobeCommands: ffprobeModule["ffprobeCommands"];
14
+ export type { FfprobeCommandsOptions, FfprobeLimits } from "./commands/ffprobe/index.js";
15
+ type audioModule = typeof import("./commands/audio/index.js");
16
+ export declare const createAudioCommands: audioModule["createAudioCommands"];
17
+ export declare const createAudioCommand: audioModule["createAudioCommand"];
18
+ export declare const audioCommands: audioModule["audioCommands"];
19
+ export type { AudioCommandsOptions } from "./commands/audio/index.js";
11
20
  type gitModule = typeof import("./commands/git/index.js");
12
21
  export declare const gitCommands: gitModule["gitCommands"];
13
22
  export declare const createGitCommands: gitModule["createGitCommands"];
@@ -1,5 +1,8 @@
1
1
  import { createGhCommands, ghMetadata } from "./lazy-gh.js";
2
2
  import { validatePandocOptions } from "../safe-bash-command-pandoc/options.js";
3
+ import { resolveFfprobeLimits } from "../safe-bash-command-ffprobe/options.js";
4
+ import { createSoxCommand } from "./commands/sox/index.js";
5
+ import { createSoxiCommand } from "./commands/soxi/index.js";
3
6
  import { createLazyCommandLoader, createLazyCommands, lazyCommandPlugin } from "./plugins/lazy-command.js";
4
7
  import { CommandRegistry } from "./contracts/command.js";
5
8
  const loadffmpeg = /* @__PURE__ */ createLazyCommandLoader(() => import("./commands/ffmpeg/index.js"));
@@ -42,6 +45,27 @@ export const createFfmpegCommands = (...args) => {
42
45
  }));
43
46
  };
44
47
  export const ffmpegCommands = (options = {}) => lazyCommandPlugin("ffmpeg-commands", createFfmpegCommands(options), options.replace ?? false);
48
+ const loadffprobe = /* @__PURE__ */ createLazyCommandLoader(() => import("./commands/ffprobe/index.js"));
49
+ export const createFfprobeCommands = (options = {}) => {
50
+ resolveFfprobeLimits(options.limits);
51
+ return createLazyCommands([ffmpegMetadata[1]], async () => {
52
+ const module = await loadffprobe();
53
+ return () => module.createFfprobeCommands(options);
54
+ }, options);
55
+ };
56
+ export const ffprobeCommands = (options = {}) => lazyCommandPlugin("ffprobe-commands", createFfprobeCommands(options), options.replace ?? false);
57
+ export const createAudioCommands = (options = {}) => [
58
+ ...createFfprobeCommands(options.ffprobe),
59
+ createSoxCommand(options.sox),
60
+ createSoxiCommand(options.sox)
61
+ ];
62
+ export const createAudioCommand = (options = {}, name = "sox") => {
63
+ const command = createAudioCommands(options).find(entry => entry.name === name);
64
+ if (!command)
65
+ throw new TypeError(`Audio command not configured: ${name}`);
66
+ return command;
67
+ };
68
+ export const audioCommands = (options = {}) => lazyCommandPlugin("audio-commands", createAudioCommands(options), options.replace ?? false);
45
69
  const loadgit = /* @__PURE__ */ createLazyCommandLoader(() => import("./commands/git/index.js"));
46
70
  const gitMetadata = [
47
71
  {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  agentCommands,
3
3
  createAgentCommands
4
- } from "../chunks/chunk-RQCK77SC.js";
4
+ } from "../chunks/chunk-65TFMAZU.js";
5
5
  import "../chunks/chunk-XDDXXCBG.js";
6
6
  import {
7
7
  baseAgentCommands
8
- } from "../chunks/chunk-WAZEELYB.js";
8
+ } from "../chunks/chunk-ZA5FQ34E.js";
9
9
  import "../chunks/chunk-Z6R76REA.js";
10
10
  import "../chunks/chunk-5ICB3H25.js";
11
11
  import "../chunks/chunk-GXEFNZGD.js";
@@ -28,7 +28,9 @@ import "../chunks/chunk-R6ASA7FI.js";
28
28
  import "../chunks/chunk-JQILKYVZ.js";
29
29
  import "../chunks/chunk-N2L4CKND.js";
30
30
  import "../chunks/chunk-F76MF5GT.js";
31
- import "../chunks/chunk-SOFBGDXG.js";
31
+ import "../chunks/chunk-HHSOUC3Z.js";
32
+ import "../chunks/chunk-4KYUJ3GC.js";
33
+ import "../chunks/chunk-6E4SGHLU.js";
32
34
  import "../chunks/chunk-LFKUWFZT.js";
33
35
  import "../chunks/chunk-5JCZEXEM.js";
34
36
  import "../chunks/chunk-N4CQ5E3G.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  baseAgentCommands
3
- } from "./chunks/chunk-WAZEELYB.js";
3
+ } from "./chunks/chunk-ZA5FQ34E.js";
4
4
  import "./chunks/chunk-Z6R76REA.js";
5
5
  import "./chunks/chunk-5ICB3H25.js";
6
6
  import "./chunks/chunk-GXEFNZGD.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  execute
3
- } from "../safe-bash/command-chunks/chunk-62ZAHKFS.js";
3
+ } from "../safe-bash/command-chunks/chunk-2VCKUNDZ.js";
4
4
  import "../safe-bash/command-chunks/chunk-Z5QOVRVH.js";
5
5
  import "../safe-bash/command-chunks/chunk-66QPYWEF.js";
6
- import "../safe-bash/command-chunks/chunk-OQCJGUI6.js";
6
+ import "../safe-bash/command-chunks/chunk-HARUYHH7.js";
7
7
  import "../safe-bash/command-chunks/chunk-DPR5CYQV.js";
8
8
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
9
9
  export {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  execute
3
- } from "../safe-bash/command-chunks/chunk-62ZAHKFS.js";
3
+ } from "../safe-bash/command-chunks/chunk-2VCKUNDZ.js";
4
4
  import "../safe-bash/command-chunks/chunk-Z5QOVRVH.js";
5
5
  import {
6
6
  settings
7
7
  } from "../safe-bash/command-chunks/chunk-66QPYWEF.js";
8
- import "../safe-bash/command-chunks/chunk-OQCJGUI6.js";
8
+ import "../safe-bash/command-chunks/chunk-HARUYHH7.js";
9
9
  import "../safe-bash/command-chunks/chunk-DPR5CYQV.js";
10
10
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
11
11
 
@@ -17,6 +17,25 @@ export interface PatchFile<T = string> {
17
17
  readonly added: T[];
18
18
  readonly hunks: Hunk<T>[];
19
19
  }
20
+ export interface StoredItems<T> extends AsyncIterable<T> {
21
+ readonly length: number;
22
+ push(value: T): Promise<void>;
23
+ }
24
+ export type PatchItems<T> = T[] | StoredItems<T>;
25
+ export interface ParsedHunk<T> {
26
+ readonly anchors: PatchItems<T>;
27
+ readonly lines: PatchItems<ChangeLine<T>>;
28
+ eof: boolean;
29
+ }
30
+ export interface ParsedFile<T> extends Omit<PatchFile<T>, "added" | "hunks"> {
31
+ readonly added: PatchItems<T>;
32
+ readonly hunks: PatchItems<ParsedHunk<T>>;
33
+ }
34
+ export interface PatchCollections<T> {
35
+ texts(): PatchItems<T>;
36
+ lines(): PatchItems<ChangeLine<T>>;
37
+ hunks(): PatchItems<ParsedHunk<T>>;
38
+ }
20
39
  export declare function targetPath(value: string, work: Work): Promise<string>;
21
40
  export declare function parse(text: string, work: Work): Promise<PatchFile[]>;
22
41
  export interface PatchRecord<T> {
@@ -28,4 +47,4 @@ export interface PatchRecord<T> {
28
47
  export declare function parseRecords<T>(lines: {
29
48
  readonly length: number;
30
49
  get(index: number): Promise<PatchRecord<T>>;
31
- }, work: Work): Promise<PatchFile<T>[]>;
50
+ }, work: Work, collections?: PatchCollections<T>): Promise<ParsedFile<T>[]>;
@@ -2,7 +2,7 @@ import {
2
2
  parse,
3
3
  parseRecords,
4
4
  targetPath
5
- } from "../safe-bash/command-chunks/chunk-OQCJGUI6.js";
5
+ } from "../safe-bash/command-chunks/chunk-HARUYHH7.js";
6
6
  import "../safe-bash/command-chunks/chunk-DPR5CYQV.js";
7
7
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
8
8
  export {
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  createFfprobeCommand
3
- } from "../safe-bash/command-chunks/chunk-GKYCV6BU.js";
3
+ } from "../safe-bash/command-chunks/chunk-ZEPDT6I5.js";
4
+ import "../safe-bash/command-chunks/chunk-MGBHGZEX.js";
4
5
  import "../safe-bash/command-chunks/chunk-DCD32BEY.js";
5
6
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
6
7
 
@@ -10,7 +10,8 @@ import {
10
10
  loadManifestResources,
11
11
  resolvePath,
12
12
  rethrowRuntimeError
13
- } from "../safe-bash/command-chunks/chunk-GKYCV6BU.js";
13
+ } from "../safe-bash/command-chunks/chunk-ZEPDT6I5.js";
14
+ import "../safe-bash/command-chunks/chunk-MGBHGZEX.js";
14
15
  import "../safe-bash/command-chunks/chunk-DCD32BEY.js";
15
16
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
16
17
  export {
@@ -0,0 +1,15 @@
1
+ import type { MediaResourceLimits } from "../mp4-ast/index.js";
2
+ /** Normalize registration limits without evaluating the media engines. */
3
+ export declare function resolveFfprobeLimits(options: MediaResourceLimits | undefined): {
4
+ maxInputBytes: number | undefined;
5
+ maxOutputBytes: number | undefined;
6
+ maxMemoryBytes?: number | undefined;
7
+ maxFrames?: number | undefined;
8
+ maxPixelsPerFrame?: number | undefined;
9
+ maxDurationSeconds?: number | undefined;
10
+ maxStreams?: number | undefined;
11
+ maxSamplesPerTrack?: number | undefined;
12
+ maxConcatInputs?: number | undefined;
13
+ maxBoxDepth?: number | undefined;
14
+ maxCpuMs?: number | undefined;
15
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ resolveFfprobeLimits
3
+ } from "../safe-bash/command-chunks/chunk-MGBHGZEX.js";
4
+ import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
5
+ export {
6
+ resolveFfprobeLimits
7
+ };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createRemoteMediaCommands
3
- } from "../safe-bash/command-chunks/chunk-JJQ72P3V.js";
3
+ } from "../safe-bash/command-chunks/chunk-VCML4T5D.js";
4
4
  import "../safe-bash/command-chunks/chunk-NLTTN4CJ.js";
5
5
  import "../safe-bash/command-chunks/chunk-7WIC7SFR.js";
6
6
  import {
7
7
  createMediaCommand,
8
8
  createMediaCommands,
9
9
  mediaCommands
10
- } from "../safe-bash/command-chunks/chunk-45FI2IPY.js";
10
+ } from "../safe-bash/command-chunks/chunk-WQ6ABTJU.js";
11
11
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
12
12
 
13
13
  // packages/safe-bash-command-media/src/index.ts
@@ -2,7 +2,7 @@ import {
2
2
  createMediaCommand,
3
3
  createMediaCommands,
4
4
  mediaCommands
5
- } from "../safe-bash/command-chunks/chunk-45FI2IPY.js";
5
+ } from "../safe-bash/command-chunks/chunk-WQ6ABTJU.js";
6
6
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
7
7
  export {
8
8
  createMediaCommand,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createRemoteMediaCommands,
3
3
  mediaFrontendContract
4
- } from "../safe-bash/command-chunks/chunk-JJQ72P3V.js";
4
+ } from "../safe-bash/command-chunks/chunk-VCML4T5D.js";
5
5
  import "../safe-bash/command-chunks/chunk-NLTTN4CJ.js";
6
6
  import "../safe-bash/command-chunks/chunk-7WIC7SFR.js";
7
- import "../safe-bash/command-chunks/chunk-45FI2IPY.js";
7
+ import "../safe-bash/command-chunks/chunk-WQ6ABTJU.js";
8
8
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
9
9
  export {
10
10
  createRemoteMediaCommands,
@@ -1,8 +1,8 @@
1
1
  import {
2
- Mh,
3
2
  eR,
4
- tR
5
- } from "../safe-bash/command-chunks/chunk-GLVD3JJG.js";
3
+ iR,
4
+ jh
5
+ } from "../safe-bash/command-chunks/chunk-BYZUOF6X.js";
6
6
  import "../safe-bash/command-chunks/chunk-7QRIAJEQ.js";
7
7
  import "../safe-bash/command-chunks/chunk-IOEUZ4EA.js";
8
8
  import "../safe-bash/command-chunks/chunk-E6SK3OU2.js";
@@ -14,9 +14,9 @@ import "../safe-bash/command-chunks/chunk-5NKZJEUI.js";
14
14
  import "../safe-bash/command-chunks/chunk-QIFS4QHZ.js";
15
15
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
16
16
  export {
17
- Mh as createPandocCommand,
18
- tR as createPandocCommands,
19
- eR as pandocCommands
17
+ jh as createPandocCommand,
18
+ eR as createPandocCommands,
19
+ iR as pandocCommands
20
20
  };
21
21
  /*!
22
22
  MIT License
@@ -1,30 +1,30 @@
1
1
  import {
2
- $a,
3
2
  $h,
4
3
  Al,
5
4
  El,
6
- Gv,
5
+ Fh,
7
6
  Ie,
7
+ La,
8
8
  Lh,
9
- Mh,
10
- Nh,
11
9
  Qo,
10
+ SP,
12
11
  TP,
12
+ Xv,
13
13
  Zi,
14
- cE,
15
- dh,
14
+ dE,
16
15
  dn,
17
16
  eR,
18
- eh,
19
- er,
20
- kP,
17
+ fh,
18
+ iR,
19
+ ih,
20
+ jh,
21
21
  lf,
22
+ mE,
22
23
  nr,
23
- pE,
24
- tR,
25
24
  tl,
25
+ tr,
26
26
  vP
27
- } from "../safe-bash/command-chunks/chunk-GLVD3JJG.js";
27
+ } from "../safe-bash/command-chunks/chunk-BYZUOF6X.js";
28
28
  import "../safe-bash/command-chunks/chunk-7QRIAJEQ.js";
29
29
  import "../safe-bash/command-chunks/chunk-IOEUZ4EA.js";
30
30
  import "../safe-bash/command-chunks/chunk-E6SK3OU2.js";
@@ -63,7 +63,7 @@ function K(u = {}) {
63
63
  if (typeof m != "object" || m === null || !("code" in m) || m.code !== "ENOTSUP" && m.code !== "EOPNOTSUPP") throw m;
64
64
  }
65
65
  yield await s.readFile(t2, r, n);
66
- } } : {}, readFile: (t2, r, n) => e2.fs.readFile(O(e2.cwd ?? "/", t2), { signal: r, ...n === void 0 || n === 1 / 0 ? {} : { maxBytes: n } }), writeFile: (t2, r, n) => e2.fs.writeFile(O(e2.cwd ?? "/", t2), r, { signal: n }) } : e2, { options: S, operands: P, destination: d, limits: R } = await $h(e2.args, s, e2.signal, i), A = (P ?? [{ chunks: e2.stdin }]).map((t2) => ({ ...t2, ...t2.base === void 0 && e2.cwd !== void 0 ? { base: e2.cwd } : {} })), F = { ...i, limits: R, signal: e2.signal, ...e2.fs === void 0 ? {} : { resourceFiles: e2.fs, resources: { resolve: async (t2, r, n) => e2.fs.readFile(`${r ?? e2.cwd ?? "/"}/${t2}`, { ...n === void 0 ? {} : { signal: n } }) } }, ...e2.cwd === void 0 ? {} : { resourceCwd: e2.cwd } }, p, v = d !== void 0 && s.createOutput ? { async write(t2, r) {
66
+ } } : {}, readFile: (t2, r, n) => e2.fs.readFile(O(e2.cwd ?? "/", t2), { signal: r, ...n === void 0 || n === 1 / 0 ? {} : { maxBytes: n } }), writeFile: (t2, r, n) => e2.fs.writeFile(O(e2.cwd ?? "/", t2), r, { signal: n }) } : e2, { options: S, operands: P, destination: d, limits: R } = await Fh(e2.args, s, e2.signal, i), A = (P ?? [{ chunks: e2.stdin }]).map((t2) => ({ ...t2, ...t2.base === void 0 && e2.cwd !== void 0 ? { base: e2.cwd } : {} })), F = { ...i, limits: R, signal: e2.signal, ...e2.fs === void 0 ? {} : { resourceFiles: e2.fs, resources: { resolve: async (t2, r, n) => e2.fs.readFile(`${r ?? e2.cwd ?? "/"}/${t2}`, { ...n === void 0 ? {} : { signal: n } }) } }, ...e2.cwd === void 0 ? {} : { resourceCwd: e2.cwd } }, p, v = d !== void 0 && s.createOutput ? { async write(t2, r) {
67
67
  p ??= s.createOutput(d, r ?? e2.signal), (r ?? e2.signal).throwIfAborted(), await p.write(t2, r);
68
68
  }, async close(t2) {
69
69
  p ??= s.createOutput(d, t2 ?? e2.signal), (t2 ?? e2.signal).throwIfAborted(), await p.close(t2);
@@ -77,7 +77,7 @@ function K(u = {}) {
77
77
  }
78
78
  }, async close() {
79
79
  }, async abort() {
80
- } }, c = d === void 0 || s.createOutput ? await Nh(A, S, { ...F, output: v }) : await El(A, S, { ...F, output: { publish: async (t2, r) => s.writeFile(d, t2, r) } });
80
+ } }, c = d === void 0 || s.createOutput ? await Lh(A, S, { ...F, output: v }) : await El(A, S, { ...F, output: { publish: async (t2, r) => s.writeFile(d, t2, r) } });
81
81
  for (let t2 of c.diagnostics) await e2.stderr.write(a.encode(`${t2.code}: ${t2.location ? `${t2.location}: ` : ""}${t2.message}
82
82
  `)), e2.signal.throwIfAborted();
83
83
  if (c.kind === "output") return { exitCode: 0 };
@@ -98,7 +98,7 @@ function Z(u = {}) {
98
98
  i.signal.throwIfAborted();
99
99
  let e2;
100
100
  try {
101
- e2 = er(i.args, u);
101
+ e2 = tr(i.args, u);
102
102
  } catch (a) {
103
103
  if (!(a instanceof t)) throw a;
104
104
  return await i.stderr.write(new TextEncoder().encode(`${a.code}: ${a.message}
@@ -114,32 +114,32 @@ export {
114
114
  t as PandocError,
115
115
  export_assertNever as assertNever,
116
116
  El as convert,
117
- TP as convertSync,
118
- Nh as convertToOutput,
117
+ SP as convertSync,
118
+ Lh as convertToOutput,
119
119
  Qo as coreFormats,
120
120
  yr as createCiteprocFilterCapability,
121
- pE as createExecutionContext,
121
+ mE as createExecutionContext,
122
122
  Al as createFileOutput,
123
123
  Z as createFormatInspectionCommand,
124
124
  Ie as createFormatRegistry,
125
- dh as createJsonFilterCapability,
125
+ fh as createJsonFilterCapability,
126
126
  _r as createLuaFilterCapability,
127
- Mh as createPandocCommand,
128
- tR as createPandocCommands,
127
+ jh as createPandocCommand,
128
+ eR as createPandocCommands,
129
129
  K as createStandalonePandocCommand,
130
- $a as defaultLimits,
131
- Lh as evalSyncPandoc,
132
- Gv as formatCapabilities,
130
+ La as defaultLimits,
131
+ $h as evalSyncPandoc,
132
+ Xv as formatCapabilities,
133
133
  tl as inspectCommand,
134
- er as inspectFormats,
135
- cE as normalizeDocument,
136
- eh as normalizeDocumentCooperatively,
137
- eR as pandocCommands,
134
+ tr as inspectFormats,
135
+ dE as normalizeDocument,
136
+ ih as normalizeDocumentCooperatively,
137
+ iR as pandocCommands,
138
138
  nr as parseConversionArgs,
139
139
  lf as pdfReader,
140
- kP as readDocument,
141
- $h as resolveConversionArgs,
142
- vP as writeDocument
140
+ vP as readDocument,
141
+ Fh as resolveConversionArgs,
142
+ TP as writeDocument
143
143
  };
144
144
  /*!
145
145
  MIT License
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  patchCommand
3
- } from "../safe-bash/command-chunks/chunk-6ZFYWT3U.js";
4
- import "../safe-bash/command-chunks/chunk-S244SWDH.js";
3
+ } from "../safe-bash/command-chunks/chunk-D5AYP2UM.js";
4
+ import "../safe-bash/command-chunks/chunk-WH3TIOTS.js";
5
5
  import {
6
6
  evalSyncPatch
7
7
  } from "../safe-bash/command-chunks/chunk-KSY3QHLY.js";
@@ -1,4 +1,4 @@
1
- import { type CommandContext, type FileStat } from "../safe-bash-contracts/index.js";
1
+ import { type ByteSource, type CommandContext, type FileStat } from "../safe-bash-contracts/index.js";
2
2
  /** Retains admission receipts; trusted host staging requires external tree isolation. */
3
3
  export declare class PatchPublication {
4
4
  private readonly context;
@@ -10,7 +10,7 @@ export declare class PatchPublication {
10
10
  capture(path: string, prune?: readonly string[]): Promise<void>;
11
11
  private validate;
12
12
  mkdir(path: string): Promise<void>;
13
- write(path: string, text: string, destination: FileStat | undefined, mode?: number, mtimeMs?: number): Promise<void>;
13
+ write(path: string, source: ByteSource | string, destination: FileStat | undefined, mode?: number, mtimeMs?: number): Promise<void>;
14
14
  remove(path: string, expected: FileStat): Promise<void>;
15
15
  prune(path: string): Promise<void>;
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PatchPublication
3
- } from "../safe-bash/command-chunks/chunk-S244SWDH.js";
3
+ } from "../safe-bash/command-chunks/chunk-WH3TIOTS.js";
4
4
  import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
5
5
  export {
6
6
  PatchPublication
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  patchCommand
3
- } from "../safe-bash/command-chunks/chunk-6ZFYWT3U.js";
4
- import "../safe-bash/command-chunks/chunk-S244SWDH.js";
3
+ } from "../safe-bash/command-chunks/chunk-D5AYP2UM.js";
4
+ import "../safe-bash/command-chunks/chunk-WH3TIOTS.js";
5
5
  import "../safe-bash/command-chunks/chunk-JKLOBSMP.js";
6
6
  import "../safe-bash/command-chunks/chunk-2VLAXKTS.js";
7
7
  import "../safe-bash/command-chunks/chunk-MOZD7RUY.js";
@@ -27,7 +27,7 @@ function createPptxCommandEngine(settings = {}) {
27
27
  };
28
28
  return Object.freeze({
29
29
  async execute(request) {
30
- const mod = await (cachedPptxEngineMod ??= import("../safe-bash/command-chunks/command-engine-P5DFM4OU.js"));
30
+ const mod = await (cachedPptxEngineMod ??= import("../safe-bash/command-chunks/command-engine-BEWABZ75.js"));
31
31
  return mod.createPptxCommandEngine(ownedSettings).execute(request);
32
32
  }
33
33
  });