@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.
- package/dist/image-ast/index.browser.js +454 -208
- package/dist/image-ast/index.js +454 -208
- package/dist/pdf-ast/ast.d.ts +23 -0
- package/dist/pdf-ast/index.js +543 -244
- package/dist/safe-bash/chunks/{chunk-CRQDMBQA.js → chunk-FSH7QRIC.js} +10 -1
- package/dist/safe-bash/command-chunks/{chunk-D4GXXV65.js → chunk-B7YLGJRF.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-P3Q2QSCA.js → chunk-G3IIEU2N.js} +457 -208
- package/dist/safe-bash/command-chunks/{chunk-F7MJRXQ2.js → chunk-RDPJGIQF.js} +1 -1
- package/dist/safe-bash/commands/python/index.browser.js +1 -1
- package/dist/safe-bash/commands/python/llm-module.js +3 -1
- package/dist/safe-bash/commands/python/shell-module.js +7 -0
- package/dist/safe-bash/core.browser.js +33 -13
- package/dist/safe-bash/shell/runtime.js +44 -12
- package/dist/safe-bash-checksum-engine/index.d.ts +1 -1
- package/dist/safe-bash-checksum-engine/index.js +5 -1
- package/dist/safe-bash-command-ffmpeg/index.js +7476 -7338
- package/dist/safe-bash-command-gh/index.js +174 -105
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- package/dist/safe-bash-command-pdfimages/index.js +454 -208
- package/dist/safe-bash-command-pdfinfo/index.js +541 -244
- package/dist/safe-bash-command-pdftk/index.js +454 -208
- package/dist/safe-bash-command-pdftoppm/index.js +541 -244
- package/dist/safe-bash-command-pdftotext/index.js +454 -208
- package/dist/safe-bash-command-qpdf/index.js +454 -208
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +514 -208
- package/dist/safe-bash-command-wkhtmltopdf/index.js +455 -208
- package/dist/safe-playwright-cloudflare/browser-snapshot-labels.d.ts +14 -0
- package/dist/safe-playwright-cloudflare/browser-snapshot-labels.js +62 -0
- package/dist/safe-playwright-cloudflare/browser-snapshot-scheduler.js +8 -1
- package/package.json +2 -2
- 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
|
-
|
|
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-
|
|
51
|
+
} from "./chunk-RDPJGIQF.js";
|
|
52
52
|
import {
|
|
53
53
|
PdfDocument,
|
|
54
54
|
encodePng
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-G3IIEU2N.js";
|
|
56
56
|
import {
|
|
57
57
|
createLuaFilterCapability
|
|
58
58
|
} from "./chunk-Y2KHC6TZ.js";
|