@poe-platform/safe-bash 0.1.762 → 0.1.764

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 (35) hide show
  1. package/dist/image-ast/index.browser.js +454 -208
  2. package/dist/image-ast/index.js +454 -208
  3. package/dist/pdf-ast/ast.d.ts +23 -0
  4. package/dist/pdf-ast/index.js +543 -244
  5. package/dist/safe-bash/chunks/{chunk-CRQDMBQA.js → chunk-FSH7QRIC.js} +10 -1
  6. package/dist/safe-bash/command-chunks/{chunk-D4GXXV65.js → chunk-B7YLGJRF.js} +2 -2
  7. package/dist/safe-bash/command-chunks/{chunk-P3Q2QSCA.js → chunk-G3IIEU2N.js} +457 -208
  8. package/dist/safe-bash/command-chunks/{chunk-F7MJRXQ2.js → chunk-RDPJGIQF.js} +1 -1
  9. package/dist/safe-bash/commands/python/index.browser.js +1 -1
  10. package/dist/safe-bash/commands/python/llm-module.js +3 -1
  11. package/dist/safe-bash/commands/python/shell-module.js +7 -0
  12. package/dist/safe-bash/core.browser.js +33 -13
  13. package/dist/safe-bash/shell/runtime.js +44 -12
  14. package/dist/safe-bash-checksum-engine/index.d.ts +1 -1
  15. package/dist/safe-bash-checksum-engine/index.js +5 -1
  16. package/dist/safe-bash-command-ffmpeg/index.js +7476 -7338
  17. package/dist/safe-bash-command-gh/index.js +174 -105
  18. package/dist/safe-bash-command-imagemagick/index.js +2 -2
  19. package/dist/safe-bash-command-pandoc/command.js +3 -3
  20. package/dist/safe-bash-command-pandoc/index.js +3 -3
  21. package/dist/safe-bash-command-pdfimages/index.js +454 -208
  22. package/dist/safe-bash-command-pdfinfo/index.js +541 -244
  23. package/dist/safe-bash-command-pdftk/index.js +454 -208
  24. package/dist/safe-bash-command-pdftoppm/index.js +541 -244
  25. package/dist/safe-bash-command-pdftotext/index.js +454 -208
  26. package/dist/safe-bash-command-qpdf/index.js +454 -208
  27. package/dist/safe-bash-command-sips/index.js +2 -2
  28. package/dist/safe-bash-command-soffice/index.js +1 -1
  29. package/dist/safe-bash-command-ssconvert/index.js +514 -208
  30. package/dist/safe-bash-command-wkhtmltopdf/index.js +455 -208
  31. package/dist/safe-playwright-cloudflare/browser-snapshot-labels.d.ts +14 -0
  32. package/dist/safe-playwright-cloudflare/browser-snapshot-labels.js +62 -0
  33. package/dist/safe-playwright-cloudflare/browser-snapshot-scheduler.js +8 -1
  34. package/package.json +2 -2
  35. package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +27 -0
@@ -2049,6 +2049,7 @@ import asyncio
2049
2049
  import copy
2050
2050
  import inspect
2051
2051
  import math
2052
+ import os
2052
2053
  from dataclasses import dataclass, field, replace
2053
2054
  from typing import Any, AsyncIterator, Callable, Mapping, Optional, Protocol, Sequence, Union
2054
2055
 
@@ -2091,7 +2092,8 @@ class Attachment:
2091
2092
  def payload(self):
2092
2093
  if not isinstance(self.path, str) or not self.path or "\0" in self.path:
2093
2094
  raise ValueError("Attachment requires an agent filesystem path")
2094
- result = {"path": self.path}
2095
+ path = self.path if os.path.isabs(self.path) else os.path.join(os.getcwd(), self.path)
2096
+ result = {"path": path}
2095
2097
  if self.mime_type is not None:
2096
2098
  result["mimeType"] = self.mime_type
2097
2099
  return result
@@ -2479,6 +2481,7 @@ from __future__ import annotations
2479
2481
  import asyncio
2480
2482
  import math
2481
2483
  import inspect
2484
+ import os
2482
2485
  import subprocess
2483
2486
  from dataclasses import dataclass
2484
2487
 
@@ -2534,6 +2537,12 @@ def _payload(args, *, shell=False, input=None, cwd=None, env=None, timeout=None,
2534
2537
  elif not isinstance(input, (bytes, bytearray, memoryview)):
2535
2538
  raise TypeError('Binary input must be bytes')
2536
2539
  result['input'] = list(input)
2540
+ # The host retains the original shell context; snapshot the current guest state.
2541
+ if cwd is None:
2542
+ cwd = os.getcwd()
2543
+ elif cwd and not os.path.isabs(cwd):
2544
+ cwd = os.path.join(os.getcwd(), cwd)
2545
+ env = dict(os.environ if env is None else env)
2537
2546
  result.update(cwd=cwd, env=env, timeout=timeout, max_output_bytes=max_output_bytes)
2538
2547
  return result
2539
2548
 
@@ -48,11 +48,11 @@ import {
48
48
  trimImage,
49
49
  unflattenImage,
50
50
  unpremultiplyRgbaImage
51
- } from "./chunk-F7MJRXQ2.js";
51
+ } from "./chunk-RDPJGIQF.js";
52
52
  import {
53
53
  PdfDocument,
54
54
  encodePng
55
- } from "./chunk-P3Q2QSCA.js";
55
+ } from "./chunk-G3IIEU2N.js";
56
56
  import {
57
57
  createLuaFilterCapability
58
58
  } from "./chunk-Y2KHC6TZ.js";