@poe-platform/safe-bash 0.1.825 → 0.1.827
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.js +39 -18
- package/dist/pdf-ast/image.js +1 -1
- package/dist/pdf-ast/index.js +1 -1
- package/dist/pdf-ast/vendor/pdfjs-fonts.mjs +9 -3
- package/dist/safe-bash/chunks/{chunk-AGHV53VF.js → chunk-M6XFU6LQ.js} +3 -1
- package/dist/safe-bash/chunks/{chunk-363QOIDR.js → chunk-T6FHWSHM.js} +3 -1
- package/dist/safe-bash/command-chunks/{chunk-ZPBL7TYJ.js → chunk-2JRHCVMQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-FMGNXOMV.js → chunk-2L3NMRLG.js} +7 -3
- package/dist/safe-bash/command-chunks/{chunk-DAQO64WC.js → chunk-2YKOJPIW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-EPYJSPOY.js → chunk-3QCW4VQF.js} +12 -8
- package/dist/safe-bash/command-chunks/{chunk-YRBFNT5B.js → chunk-3YL2TMLA.js} +10 -1
- package/dist/safe-bash/command-chunks/{chunk-5H7ZHP7F.js → chunk-43NDRBKY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-BBOYR6LV.js → chunk-46GA576V.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WPT2FCHH.js → chunk-4SLPM2WM.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7ZQVMPSB.js → chunk-5CAXR62E.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3DTHX5UU.js → chunk-66653AEZ.js} +40 -14
- package/dist/safe-bash/command-chunks/{chunk-ETFJ4L7F.js → chunk-6OLE6CLV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZIDESNHW.js → chunk-7M3M6FKC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2KMNVJB7.js → chunk-A7PKUIJT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AVSINNZ6.js → chunk-DEQ47SBQ.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-EV7A5FNN.js → chunk-FFFRLPXU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4MVQE6CT.js → chunk-FYTBEGSY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LFTGMUAV.js → chunk-HQIZR6EU.js} +192 -489
- package/dist/safe-bash/command-chunks/chunk-HS2L7I4N.js +219 -0
- package/dist/safe-bash/command-chunks/{chunk-WKS2PAZL.js → chunk-HUGKO4ZE.js} +10 -1
- package/dist/safe-bash/command-chunks/chunk-IGXH5W5Z.js +111 -0
- package/dist/safe-bash/command-chunks/{chunk-CMJBRGU2.js → chunk-IHQZKUBS.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-JADJ4BMN.js +1519 -0
- package/dist/safe-bash/command-chunks/{chunk-5AQAWIYK.js → chunk-JEZC5V3B.js} +4 -0
- package/dist/safe-bash/command-chunks/{chunk-YB5TNDY6.js → chunk-K5VJ4NNL.js} +39 -5
- package/dist/safe-bash/command-chunks/{chunk-7RQGRFHJ.js → chunk-KHWDEAE4.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-L54KVUSY.js +604 -0
- package/dist/safe-bash/command-chunks/{chunk-3NJETNC2.js → chunk-MBXNG6C3.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HCPEYQKT.js → chunk-N4SH6QY5.js} +285 -302
- package/dist/safe-bash/command-chunks/{chunk-3DID6MQY.js → chunk-OWTQYLID.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4EA7WI3L.js → chunk-QOOQD6BD.js} +42 -33
- package/dist/safe-bash/command-chunks/{chunk-RQTFK7AV.js → chunk-QZYEI4N6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-R3SLT3ZX.js → chunk-R6GON4H3.js} +11 -1
- package/dist/safe-bash/command-chunks/{chunk-2GILUQJY.js → chunk-R7ZGDHME.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-HNEWGADJ.js → chunk-RUXOFW5G.js} +7 -6
- package/dist/safe-bash/command-chunks/{chunk-LKAFLJ5L.js → chunk-RWQKX44L.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-PKH57OIC.js → chunk-SG2KOOD4.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-T4TGJYFV.js +60 -0
- package/dist/safe-bash/command-chunks/chunk-TGSNVLFZ.js +105 -0
- package/dist/safe-bash/command-chunks/{chunk-NXCJNPL3.js → chunk-UCE77LYV.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-EWECMOQ5.js → chunk-UIHPHIKI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XSZNL3GV.js → chunk-UJPWPRVB.js} +191 -146
- package/dist/safe-bash/command-chunks/{chunk-E5CDHXFA.js → chunk-VOR6YDZC.js} +26 -1
- package/dist/safe-bash/command-chunks/chunk-VSNVYOK2.js +30 -0
- package/dist/safe-bash/command-chunks/{chunk-4XYGJB24.js → chunk-VTH4AORO.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-W5LH7D23.js → chunk-WKKJJBJQ.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-OLXMWQJ5.js → chunk-WRO3PB2M.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RUAGHZNF.js → chunk-X5ODTF3E.js} +7 -5
- package/dist/safe-bash/command-chunks/{chunk-LH4VBNF6.js → chunk-XGTSP2CP.js} +84 -16
- package/dist/safe-bash/command-chunks/{chunk-K576GZED.js → chunk-XTHKXCF2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-J3VS55K4.js → chunk-YHRESVJ7.js} +9 -3
- package/dist/safe-bash/command-chunks/{chunk-UWIDPTOB.js → chunk-YSCKOUQP.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UYNJF5QN.js → chunk-ZALAWNOE.js} +76 -122
- package/dist/safe-bash/command-chunks/{chunk-OT75C5YS.js → chunk-ZYXKW2K7.js} +1 -1
- package/dist/safe-bash/command-chunks/{pdf-renderer-346WYKSZ.js → pdf-renderer-5QWOVFA4.js} +1 -1
- package/dist/safe-bash/command-chunks/{prompt-tool-debug-3POFNRYP.js → prompt-tool-debug-G7ATE7D5.js} +6 -4
- package/dist/safe-bash/commands/llm/index.browser.js +5 -1
- package/dist/safe-bash/commands/llm/index.js +1 -1
- package/dist/safe-bash/commands/python/executor.browser.js +3 -1
- package/dist/safe-bash/commands/python/executor.js +1 -1
- package/dist/safe-bash/commands/python/index.browser.js +5 -1
- package/dist/safe-bash/commands/python/index.js +1 -1
- package/dist/safe-bash/core.browser.js +2 -2
- package/dist/safe-bash/full-core.browser.js +10 -2
- package/dist/safe-bash-command-awk/awk-runtime.js +2 -2
- package/dist/safe-bash-command-awk/awk-syntax.js +1 -1
- package/dist/safe-bash-command-awk/awk.js +3 -3
- package/dist/safe-bash-command-awk/index.js +3 -3
- package/dist/safe-bash-command-gpg/index.js +11 -3
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-llm/collections.js +6 -4
- package/dist/safe-bash-command-llm/command.js +4 -4
- package/dist/safe-bash-command-llm/import-json-document.d.ts +9 -2
- package/dist/safe-bash-command-llm/index.d.ts +2 -1
- package/dist/safe-bash-command-llm/index.js +10 -4
- package/dist/safe-bash-command-llm/loader-provider.d.ts +5 -0
- package/dist/safe-bash-command-mcp/index.js +10 -13
- package/dist/safe-bash-command-pdftoppm/index.js +2 -2
- package/dist/safe-bash-command-playwright-cli/index.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/ability-execution.d.ts +1 -0
- package/dist/safe-bash-command-playwright-cli/playwright/ability-execution.js +1 -1
- package/dist/safe-bash-command-playwright-cli/playwright/controller.d.ts +2 -0
- package/dist/safe-bash-command-playwright-cli/playwright/controller.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/index.js +2 -2
- package/dist/safe-bash-command-python/build-backend.d.ts +2 -0
- package/dist/safe-bash-command-python/cache.d.ts +1 -1
- package/dist/safe-bash-command-python/executor.d.ts +5 -2
- package/dist/safe-bash-command-python/executor.js +11 -6
- package/dist/safe-bash-command-python/host-capabilities.js +1 -1
- package/dist/safe-bash-command-python/index.js +11 -6
- package/dist/safe-bash-command-python/jspi.js +5 -3
- package/dist/safe-bash-command-python/manifest-file.d.ts +44 -0
- package/dist/safe-bash-command-python/manifest.d.ts +45 -0
- package/dist/safe-bash-command-python/provisioning.d.ts +20 -1
- package/dist/safe-bash-command-python/provisioning.js +3 -2
- package/dist/safe-bash-command-python/reply.js +7 -11
- package/dist/safe-bash-command-python/source-archive.js +2 -2
- package/dist/safe-bash-command-python/source-zip.js +2 -2
- package/dist/safe-bash-command-python/worker.js +34 -21
- package/dist/safe-bash-command-sqlite3/engine.d.ts +4 -0
- package/dist/safe-bash-command-sqlite3/index.js +174 -18
- package/dist/safe-bash-command-svgo/index.js +1 -1
- package/dist/safe-bash-command-tar/create.js +3 -3
- package/dist/safe-bash-command-tar/extract.js +3 -3
- package/dist/safe-bash-command-tar/index.js +5 -5
- package/dist/safe-bash-command-tar/modes.js +5 -5
- package/dist/safe-bash-command-tar/options.d.ts +1 -1
- package/dist/safe-bash-command-tar/options.js +1 -1
- package/dist/safe-bash-command-tar/stream.js +1 -1
- package/dist/safe-bash-command-wkhtmltopdf/index.js +1 -1
- package/dist/safe-bash-command-xan/argv.js +1 -1
- package/dist/safe-bash-command-xan/commands.js +3 -3
- package/dist/safe-bash-command-xan/index.js +3 -3
- package/dist/safe-bash-command-xan/io.js +2 -2
- package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
- package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
- package/dist/safe-bash-compression-engine/files.js +6 -6
- package/dist/safe-bash-compression-engine/index.js +5 -5
- package/dist/safe-bash-compression-engine/operand.js +6 -6
- package/dist/safe-bash-compression-engine/options.js +1 -1
- package/dist/safe-bash-compression-engine/stream.js +5 -5
- package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
- package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
- package/dist/safe-bash-contracts/filesystem-output.js +1 -1
- package/dist/safe-bash-csv-engine/index.js +6 -6
- package/dist/safe-bash-csv-engine/python-codec-aliases.js +1 -1
- package/dist/safe-bash-csv-engine/python-codepages.js +3 -3
- package/dist/safe-bash-csv-engine/python-file-codepages.js +2 -2
- package/dist/safe-bash-csv-engine/python-utf16.js +4 -4
- package/dist/safe-bash-csv-engine/text-decoder.js +6 -6
- package/dist/safe-bash-graphviz-engine/index.js +1 -1
- package/dist/safe-bash-pager-engine/index.js +2 -2
- package/dist/safe-bash-query-engine/capture.js +3 -3
- package/dist/safe-bash-query-engine/delpaths.js +3 -3
- package/dist/safe-bash-query-engine/formats.js +2 -2
- package/dist/safe-bash-query-engine/index.js +10 -10
- package/dist/safe-bash-query-engine/indices.js +3 -3
- package/dist/safe-bash-query-engine/input.d.ts +3 -3
- package/dist/safe-bash-query-engine/input.js +1 -1
- package/dist/safe-bash-query-engine/interpreter.js +9 -9
- package/dist/safe-bash-query-engine/query-core.js +10 -10
- package/dist/safe-bash-query-engine/regex.js +4 -4
- package/dist/safe-bash-query-engine/splits.js +5 -5
- package/dist/safe-bash-query-engine/values.js +2 -2
- package/package.json +2 -2
- package/dist/safe-bash/command-chunks/chunk-OOYVZAWL.js +0 -90
- package/dist/safe-bash/command-chunks/chunk-RZOHZGEZ.js +0 -772
- package/dist/safe-bash/command-chunks/chunk-WIUEM7HP.js +0 -58
- package/dist/safe-bash/command-chunks/chunk-WY6THI6J.js +0 -673
- package/dist/safe-bash/command-chunks/chunk-ZERCTWUI.js +0 -467
|
@@ -110,6 +110,10 @@ function createOptionsParser(profiles2) {
|
|
|
110
110
|
result.zstd.row = name === "row-match-finder" ? 1 : 2;
|
|
111
111
|
continue;
|
|
112
112
|
}
|
|
113
|
+
if (name === "rm") {
|
|
114
|
+
result.keep = false;
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
113
117
|
if (name === "exclude-compressed") {
|
|
114
118
|
result.excludeCompressed = true;
|
|
115
119
|
continue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decodeString
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2L3NMRLG.js";
|
|
4
4
|
import {
|
|
5
5
|
AwkPipes
|
|
6
6
|
} from "./chunk-IM45EHCD.js";
|
|
@@ -442,7 +442,7 @@ var AwkRuntime = class {
|
|
|
442
442
|
}
|
|
443
443
|
return this.split(value, separator, paragraph);
|
|
444
444
|
}
|
|
445
|
-
async split(value, separator, paragraph = false) {
|
|
445
|
+
async split(value, separator, paragraph = false, sepsOut) {
|
|
446
446
|
this.budget.step(value.length);
|
|
447
447
|
const parts = [];
|
|
448
448
|
const append = (start, end) => {
|
|
@@ -451,14 +451,19 @@ var AwkRuntime = class {
|
|
|
451
451
|
};
|
|
452
452
|
if (separator === " ") {
|
|
453
453
|
let start = -1;
|
|
454
|
+
let sepStart = -1;
|
|
454
455
|
for (let index = 0; index < value.length; index++) {
|
|
455
456
|
if (index % 256 === 0) await this.budget.checkpointSync();
|
|
456
457
|
if (" \n".includes(value[index])) {
|
|
457
458
|
if (start >= 0) {
|
|
458
459
|
append(start, index);
|
|
459
460
|
start = -1;
|
|
461
|
+
sepStart = index;
|
|
460
462
|
}
|
|
461
|
-
} else if (start < 0)
|
|
463
|
+
} else if (start < 0) {
|
|
464
|
+
if (sepsOut && sepStart >= 0 && parts.length > 0) sepsOut.push(string(value.slice(sepStart, index)));
|
|
465
|
+
start = index;
|
|
466
|
+
}
|
|
462
467
|
}
|
|
463
468
|
if (start >= 0) append(start, value.length);
|
|
464
469
|
} else if (separator === "") {
|
|
@@ -468,7 +473,7 @@ var AwkRuntime = class {
|
|
|
468
473
|
append(index, index + 1);
|
|
469
474
|
}
|
|
470
475
|
} else if (typeof separator === "string" && separator.length === 1) {
|
|
471
|
-
if (!paragraph && value.length < 256) {
|
|
476
|
+
if (!paragraph && value.length < 256 && !sepsOut) {
|
|
472
477
|
if (value !== "") {
|
|
473
478
|
let start2 = 0;
|
|
474
479
|
let idx;
|
|
@@ -488,6 +493,7 @@ var AwkRuntime = class {
|
|
|
488
493
|
}
|
|
489
494
|
if (value[index] === separator || paragraph && value[index] === "\n") {
|
|
490
495
|
append(start, index);
|
|
496
|
+
if (sepsOut) sepsOut.push(string(value[index]));
|
|
491
497
|
start = index + 1;
|
|
492
498
|
}
|
|
493
499
|
}
|
|
@@ -515,6 +521,7 @@ var AwkRuntime = class {
|
|
|
515
521
|
continue;
|
|
516
522
|
}
|
|
517
523
|
await segment(consumed, match.start);
|
|
524
|
+
if (sepsOut) sepsOut.push(string(value.slice(match.start, match.end)));
|
|
518
525
|
consumed = match.end;
|
|
519
526
|
search = match.end;
|
|
520
527
|
}
|
|
@@ -1370,7 +1377,8 @@ var AwkRuntime = class {
|
|
|
1370
1377
|
const value = this.asText(await this.scalarExpression(args[0]));
|
|
1371
1378
|
const target = this.array(args[1].name);
|
|
1372
1379
|
const separator = args[2]?.kind === "regex" ? args[2].pattern : args[2] ? this.asText(await this.scalarExpression(args[2])) : this.varText("FS");
|
|
1373
|
-
const
|
|
1380
|
+
const seps = args[3] ? [] : void 0;
|
|
1381
|
+
const parts = await this.split(value, separator, false, seps);
|
|
1374
1382
|
if (this.entries - target.entries.size + parts.length > (this.budget.options.maxArrayEntries ?? Infinity)) throw new ProgramError("array entry limit exceeded");
|
|
1375
1383
|
let size = 0;
|
|
1376
1384
|
for (let index = 0; index < parts.length; index++) {
|
|
@@ -1386,11 +1394,28 @@ var AwkRuntime = class {
|
|
|
1386
1394
|
target.entries.clear();
|
|
1387
1395
|
for (const [key, part] of entries) target.entries.set(key, part);
|
|
1388
1396
|
allocation.bytes = size;
|
|
1397
|
+
if (args[3] && seps) {
|
|
1398
|
+
const sepsTarget = this.array(args[3].name);
|
|
1399
|
+
sepsTarget.entries.clear();
|
|
1400
|
+
for (let i = 0; i < seps.length; i++) {
|
|
1401
|
+
sepsTarget.entries.set(String(i + 1), ownScalar(seps[i]));
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1389
1404
|
return numeric(parts.length);
|
|
1390
1405
|
}
|
|
1391
1406
|
if (name === "match") {
|
|
1392
1407
|
const value = this.asText(await this.scalarExpression(args[0]));
|
|
1393
1408
|
const matched = await (await this.regex(args[1])).find(value, this.budget);
|
|
1409
|
+
if (args[2]) {
|
|
1410
|
+
const target = this.array(args[2].name);
|
|
1411
|
+
target.entries.clear();
|
|
1412
|
+
if (matched) {
|
|
1413
|
+
for (let g = 0; g < matched.groups.length; g++) {
|
|
1414
|
+
const grp = matched.groups[g];
|
|
1415
|
+
if (grp !== void 0) target.entries.set(String(g), ownScalar(string(grp)));
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1394
1419
|
this.set("RSTART", numeric(matched ? matched.start + 1 : 0));
|
|
1395
1420
|
this.set("RLENGTH", numeric(matched ? matched.end - matched.start : -1));
|
|
1396
1421
|
return this.get("RSTART");
|
|
@@ -1398,6 +1423,15 @@ var AwkRuntime = class {
|
|
|
1398
1423
|
const values = [];
|
|
1399
1424
|
for (const argument of args) values.push(await this.scalarExpression(argument));
|
|
1400
1425
|
const first = values[0] ?? unset;
|
|
1426
|
+
if (name === "strtonum") {
|
|
1427
|
+
const raw = this.asText(first).trim();
|
|
1428
|
+
const sign = raw.startsWith("-") ? -1 : 1;
|
|
1429
|
+
const body = raw.startsWith("-") || raw.startsWith("+") ? raw.slice(1) : raw;
|
|
1430
|
+
if (/^0[xX][0-9a-fA-F]+/.test(body)) return numeric(sign * parseInt(body.slice(2), 16));
|
|
1431
|
+
if (/^0[0-7]+/.test(body)) return numeric(sign * parseInt(body, 8));
|
|
1432
|
+
const num = parseFloat(raw);
|
|
1433
|
+
return numeric(Number.isFinite(num) ? num : 0);
|
|
1434
|
+
}
|
|
1401
1435
|
if (name === "systime") return numeric(Math.floor(Date.now() / 1e3));
|
|
1402
1436
|
if (name === "strftime" || name === "mktime") {
|
|
1403
1437
|
const utc = number(values[name === "strftime" ? 2 : 1] ?? unset) !== 0;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
zstdDecode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FYTBEGSY.js";
|
|
4
4
|
import {
|
|
5
5
|
gunzipMembers
|
|
6
6
|
} from "./chunk-52DDLGBS.js";
|
|
7
7
|
import {
|
|
8
8
|
boundedCodec
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IHQZKUBS.js";
|
|
10
10
|
import {
|
|
11
11
|
CodecReader,
|
|
12
12
|
codec
|