@poe-platform/safe-bash 0.1.826 → 0.1.828
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-VWLQDZFF.js → chunk-C7RBTLYX.js} +12 -5
- package/dist/safe-bash/chunks/{chunk-TZRVK3NU.js → chunk-HWYINF6Y.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-AGHV53VF.js → chunk-M6XFU6LQ.js} +3 -1
- package/dist/safe-bash/chunks/{chunk-ZJAXMB5M.js → chunk-SGHFQIZB.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-363QOIDR.js → chunk-T6FHWSHM.js} +3 -1
- package/dist/safe-bash/chunks/{chunk-RAFD5ZAH.js → chunk-Y67A2DE4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VKTM2SOL.js → chunk-2EEIB5O3.js} +192 -489
- 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-UWIDPTOB.js → chunk-3ZCABR5P.js} +1 -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-2KMNVJB7.js → chunk-A7PKUIJT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-O3FTKLWR.js → chunk-BXOBM4HJ.js} +26 -17
- package/dist/safe-bash/command-chunks/{chunk-P66Q5F6K.js → chunk-DEQ47SBQ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-ZPBL7TYJ.js → chunk-EF3RAQ7M.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RQTFK7AV.js → chunk-EOO3NLD5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-EV7A5FNN.js → chunk-FFFRLPXU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-MQCLG2CT.js → chunk-FMXBLKWO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4MVQE6CT.js → chunk-FYTBEGSY.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-HS2L7I4N.js +219 -0
- package/dist/safe-bash/command-chunks/{chunk-NXZJJM4J.js → chunk-IGXH5W5Z.js} +1 -1
- 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-KSCVKF7I.js +604 -0
- package/dist/safe-bash/command-chunks/{chunk-3NJETNC2.js → chunk-MBXNG6C3.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WKS2PAZL.js → chunk-N63IGO5F.js} +10 -1
- 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-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-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-HCPEYQKT.js → chunk-SIAN5LI3.js} +286 -307
- package/dist/safe-bash/command-chunks/chunk-T4TGJYFV.js +60 -0
- package/dist/safe-bash/command-chunks/{chunk-T7RT2BNL.js → chunk-U5TQVW64.js} +191 -146
- package/dist/safe-bash/command-chunks/{chunk-NXCJNPL3.js → chunk-UCE77LYV.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-OT75C5YS.js → chunk-UGDQSGUZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-EWECMOQ5.js → chunk-UIHPHIKI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4XYGJB24.js → chunk-VJXPNNBD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-E5CDHXFA.js → chunk-VOR6YDZC.js} +26 -1
- package/dist/safe-bash/command-chunks/{chunk-ZIDESNHW.js → chunk-VQINIBCZ.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-VSNVYOK2.js +30 -0
- package/dist/safe-bash/command-chunks/{chunk-Q2ACHUTY.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-J3VS55K4.js → chunk-YHRESVJ7.js} +9 -3
- package/dist/safe-bash/command-chunks/{chunk-K576GZED.js → chunk-YK6ZVCA2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-W5LH7D23.js → chunk-YR2A2L4J.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-UYNJF5QN.js → chunk-ZALAWNOE.js} +76 -122
- 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/bc/index.browser.js +1 -1
- 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 +14 -6
- package/dist/safe-bash/plugins/index.browser.js +3 -3
- package/dist/safe-bash/registry-entry.browser.js +2 -2
- package/dist/safe-bash/search.browser.js +1 -1
- package/dist/safe-bash/shell/runtime.js +18 -7
- package/dist/safe-bash/shell/sync-extra-evaluators.js +2 -0
- package/dist/safe-bash/shell-entry.browser.js +2 -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-ffmpeg/index.js +15 -12
- package/dist/safe-bash-command-ffprobe/index.js +2 -2
- package/dist/safe-bash-command-ffprobe/media.js +2 -2
- package/dist/safe-bash-command-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-gpg/index.js +11 -3
- package/dist/safe-bash-command-imagemagick/index.js +45 -12
- 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 +4 -4
- package/dist/safe-bash-csv-engine/python-codec-aliases.js +1 -1
- package/dist/safe-bash-csv-engine/python-codepages.js +2 -2
- package/dist/safe-bash-csv-engine/python-utf16.js +3 -3
- package/dist/safe-bash-csv-engine/text-decoder.js +4 -4
- 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/dist/safe-playwright-cloudflare/browser-code-executor.js +2 -2
- package/dist/safe-playwright-cloudflare/browser-guest-source.d.ts +2 -0
- package/dist/safe-playwright-cloudflare/browser-guest-source.js +36 -0
- package/dist/safe-playwright-cloudflare/browser-run-code-contract.d.ts +1 -1
- package/dist/safe-playwright-cloudflare/browser-run-code-guest.generated.d.ts +1 -2
- package/dist/safe-playwright-cloudflare/browser-run-code-guest.generated.js +2 -2
- package/dist/safe-playwright-cloudflare/browser-run-code.js +4 -1
- package/package.json +4 -3
- package/dist/safe-bash/command-chunks/chunk-BKQWFABY.js +0 -960
- package/dist/safe-bash/command-chunks/chunk-DV7TCGJR.js +0 -691
- package/dist/safe-bash/command-chunks/chunk-ZERCTWUI.js +0 -467
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isPythonWhitespace
|
|
3
|
-
} from "./chunk-E5CDHXFA.js";
|
|
4
|
-
|
|
5
1
|
// packages/safe-bash-command-llm/src/import-json-document.ts
|
|
6
2
|
import { jsonValues } from "../../safe-bash-query-engine/input.js";
|
|
7
3
|
import { Budget, resolveJqLimits } from "../../safe-bash-query-engine/limits.js";
|
|
@@ -27,122 +23,122 @@ var JsonStorage = class extends PagedStorage {
|
|
|
27
23
|
}
|
|
28
24
|
};
|
|
29
25
|
var JsonDocumentStore = class {
|
|
30
|
-
storage;
|
|
31
|
-
payload;
|
|
32
|
-
keys;
|
|
33
|
-
steps = 0;
|
|
26
|
+
#storage;
|
|
27
|
+
#payload;
|
|
28
|
+
#keys;
|
|
29
|
+
#steps = 0;
|
|
34
30
|
constructor(options) {
|
|
35
31
|
if (!Number.isSafeInteger(options.maxFileBytes) || options.maxFileBytes < 1 || !Number.isSafeInteger(options.maxOpenFiles) || options.maxOpenFiles < 1) throw new RangeError("Invalid JSON staging limits");
|
|
36
|
-
this
|
|
32
|
+
this.#signal = options.signal;
|
|
37
33
|
const cache = new PagedStorageCache(4);
|
|
38
|
-
this
|
|
39
|
-
this
|
|
40
|
-
this
|
|
34
|
+
this.#storage = new JsonStorage(options.fs, options.directory, options.signal, options.maxFileBytes, cache);
|
|
35
|
+
this.#payload = new PagedStorage({ fs: options.fs, cwd: options.directory, env: {}, signal: options.signal }, 4, cache);
|
|
36
|
+
this.#keys = new IntegerTable(this.#storage, 64);
|
|
41
37
|
}
|
|
42
|
-
signal;
|
|
43
|
-
async step() {
|
|
44
|
-
this
|
|
45
|
-
if (++this
|
|
38
|
+
#signal;
|
|
39
|
+
async #step() {
|
|
40
|
+
this.#signal.throwIfAborted();
|
|
41
|
+
if (++this.#steps % 256 === 0) await yieldTurn(this.#signal);
|
|
46
42
|
}
|
|
47
|
-
async number(position) {
|
|
48
|
-
const bytes = await this
|
|
43
|
+
async #number(position) {
|
|
44
|
+
const bytes = await this.#storage.read(position, 8);
|
|
49
45
|
return new DataView(bytes.buffer, bytes.byteOffset, 8).getFloat64(0, true);
|
|
50
46
|
}
|
|
51
|
-
async put(position, value) {
|
|
47
|
+
async #put(position, value) {
|
|
52
48
|
const bytes = new Uint8Array(8);
|
|
53
49
|
new DataView(bytes.buffer).setFloat64(0, value, true);
|
|
54
|
-
await this
|
|
50
|
+
await this.#storage.write(position, bytes);
|
|
55
51
|
}
|
|
56
|
-
async record(values) {
|
|
52
|
+
async #record(values) {
|
|
57
53
|
const bytes = new Uint8Array(recordBytes), view = new DataView(bytes.buffer);
|
|
58
54
|
for (let index = 0; index < values.length; index++) view.setFloat64(index * 8, values[index], true);
|
|
59
|
-
return this
|
|
55
|
+
return this.#storage.append(bytes);
|
|
60
56
|
}
|
|
61
|
-
async appendPoints(points, storage = this
|
|
57
|
+
async appendPoints(points, storage = this.#payload) {
|
|
62
58
|
for (let offset = 0; offset < points.length; offset += pageBytes / 4) {
|
|
63
|
-
await this
|
|
59
|
+
await this.#step();
|
|
64
60
|
const count = Math.min(pageBytes / 4, points.length - offset);
|
|
65
61
|
const bytes = new Uint8Array(count * 4), view = new DataView(bytes.buffer);
|
|
66
62
|
for (let index = 0; index < count; index++) view.setUint32(index * 4, points[offset + index], true);
|
|
67
63
|
await storage.append(bytes);
|
|
68
64
|
}
|
|
69
65
|
}
|
|
70
|
-
async equalKey(entry, points) {
|
|
71
|
-
const start = await this
|
|
66
|
+
async #equalKey(entry, points) {
|
|
67
|
+
const start = await this.#number(entry + 16), end = await this.#number(entry + 24);
|
|
72
68
|
if (end - start !== points.length * 4) return false;
|
|
73
69
|
for (let offset = 0; offset < points.length; offset += pageBytes / 4) {
|
|
74
|
-
await this
|
|
70
|
+
await this.#step();
|
|
75
71
|
const count = Math.min(pageBytes / 4, points.length - offset);
|
|
76
|
-
const bytes = await this
|
|
72
|
+
const bytes = await this.#storage.read(start + offset * 4, count * 4);
|
|
77
73
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
78
74
|
for (let index = 0; index < count; index++) if (view.getUint32(index * 4, true) !== points[offset + index]) return false;
|
|
79
75
|
}
|
|
80
76
|
return true;
|
|
81
77
|
}
|
|
82
78
|
async insert(type, parent, key, keyPoints, token = "") {
|
|
83
|
-
await this
|
|
84
|
-
const id = await this
|
|
79
|
+
await this.#step();
|
|
80
|
+
const id = await this.#record([nodeTypes.indexOf(type), parent, 0, 0, 0, 0, 0]);
|
|
85
81
|
if (token) {
|
|
86
82
|
const bytes = new TextEncoder().encode(token);
|
|
87
|
-
const start = await this
|
|
88
|
-
await this
|
|
89
|
-
await this
|
|
83
|
+
const start = await this.#storage.append(bytes);
|
|
84
|
+
await this.#put(id + 16, start);
|
|
85
|
+
await this.#put(id + 24, start + bytes.length);
|
|
90
86
|
}
|
|
91
87
|
if (parent) {
|
|
92
88
|
let hash = 0;
|
|
93
89
|
if (keyPoints) for (const point of keyPoints) hash = Math.imul(hash ^ point, 16777619) >>> 0;
|
|
94
90
|
hash = (hash ^ parent ^ Math.floor(parent / 4294967296)) >>> 0;
|
|
95
|
-
const collision = keyPoints ? Number(await this
|
|
91
|
+
const collision = keyPoints ? Number(await this.#keys.get(BigInt(hash)) ?? 0n) : 0;
|
|
96
92
|
let existing = 0;
|
|
97
|
-
for (let entry = collision; entry; entry = await this
|
|
98
|
-
await this
|
|
99
|
-
if (await this
|
|
93
|
+
for (let entry = collision; entry; entry = await this.#number(entry + 8)) {
|
|
94
|
+
await this.#step();
|
|
95
|
+
if (await this.#number(entry) === parent && await this.#equalKey(entry, keyPoints)) {
|
|
100
96
|
existing = entry;
|
|
101
97
|
break;
|
|
102
98
|
}
|
|
103
99
|
}
|
|
104
|
-
if (existing) await this
|
|
100
|
+
if (existing) await this.#put(existing + 32, id);
|
|
105
101
|
else {
|
|
106
|
-
const start = this
|
|
107
|
-
if (keyPoints) await this.appendPoints(keyPoints, this
|
|
108
|
-
const end = this
|
|
109
|
-
const entry = await this
|
|
110
|
-
const tail = await this
|
|
111
|
-
if (tail) await this
|
|
112
|
-
else await this
|
|
113
|
-
await this
|
|
114
|
-
await this
|
|
115
|
-
if (keyPoints) await this
|
|
102
|
+
const start = this.#storage.allocate(0);
|
|
103
|
+
if (keyPoints) await this.appendPoints(keyPoints, this.#storage);
|
|
104
|
+
const end = this.#storage.allocate(0);
|
|
105
|
+
const entry = await this.#record([parent, collision, start, end, id, 0, keyPoints ? -1 : key]);
|
|
106
|
+
const tail = await this.#number(parent + 40);
|
|
107
|
+
if (tail) await this.#put(tail + 40, entry);
|
|
108
|
+
else await this.#put(parent + 32, entry);
|
|
109
|
+
await this.#put(parent + 40, entry);
|
|
110
|
+
await this.#put(parent + 48, await this.#number(parent + 48) + 1);
|
|
111
|
+
if (keyPoints) await this.#keys.set(BigInt(hash), BigInt(entry));
|
|
116
112
|
}
|
|
117
113
|
}
|
|
118
|
-
if (type === "string") await this
|
|
114
|
+
if (type === "string") await this.#put(id + 16, this.#payload.allocate(0));
|
|
119
115
|
return id;
|
|
120
116
|
}
|
|
121
117
|
async endString(id) {
|
|
122
|
-
await this
|
|
118
|
+
await this.#put(id + 24, this.#payload.allocate(0));
|
|
123
119
|
}
|
|
124
120
|
async parent(id) {
|
|
125
|
-
return this
|
|
121
|
+
return this.#number(id + 8);
|
|
126
122
|
}
|
|
127
123
|
async node(id) {
|
|
128
|
-
await this
|
|
129
|
-
const type = nodeTypes[await this
|
|
130
|
-
const start = await this
|
|
124
|
+
await this.#step();
|
|
125
|
+
const type = nodeTypes[await this.#number(id)];
|
|
126
|
+
const start = await this.#number(id + 16), end = await this.#number(id + 24);
|
|
131
127
|
let token = "";
|
|
132
128
|
if (type === "number" || type === "boolean") {
|
|
133
129
|
const decoder = new TextDecoder();
|
|
134
130
|
for (let offset = start; offset < end; offset += pageBytes) {
|
|
135
|
-
await this
|
|
136
|
-
token += decoder.decode(await this
|
|
131
|
+
await this.#step();
|
|
132
|
+
token += decoder.decode(await this.#storage.read(offset, Math.min(pageBytes, end - offset)), { stream: true });
|
|
137
133
|
}
|
|
138
134
|
token += decoder.decode();
|
|
139
135
|
}
|
|
140
136
|
return { id, type, start, end, token };
|
|
141
137
|
}
|
|
142
|
-
async *points(node, storage = this
|
|
138
|
+
async *points(node, storage = this.#payload) {
|
|
143
139
|
if (node.type !== "string") throw new TypeError("JSON node is not a string");
|
|
144
140
|
for (let offset = node.start; offset < node.end; offset += pageBytes) {
|
|
145
|
-
await this
|
|
141
|
+
await this.#step();
|
|
146
142
|
const bytes = await storage.read(offset, Math.min(pageBytes, node.end - offset));
|
|
147
143
|
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length), points = [];
|
|
148
144
|
for (let index = 0; index < bytes.length; index += 4) points.push(view.getUint32(index, true));
|
|
@@ -150,21 +146,21 @@ var JsonDocumentStore = class {
|
|
|
150
146
|
}
|
|
151
147
|
}
|
|
152
148
|
async child(parent, after = -1) {
|
|
153
|
-
await this
|
|
154
|
-
const entry = after < 0 ? await this
|
|
149
|
+
await this.#step();
|
|
150
|
+
const entry = after < 0 ? await this.#number(parent + 32) : await this.#number(after + 40);
|
|
155
151
|
if (!entry) return void 0;
|
|
156
|
-
const node = await this.node(await this
|
|
152
|
+
const node = await this.node(await this.#number(entry + 32)), key = await this.#number(entry + 48);
|
|
157
153
|
if (key >= 0) return { node, position: entry, key };
|
|
158
154
|
const keyPoints = [];
|
|
159
155
|
let text = "";
|
|
160
|
-
for await (const points of this.points({ id: entry, type: "string", start: await this
|
|
156
|
+
for await (const points of this.points({ id: entry, type: "string", start: await this.#number(entry + 16), end: await this.#number(entry + 24), token: "" }, this.#storage)) {
|
|
161
157
|
keyPoints.push(...points);
|
|
162
158
|
text += String.fromCodePoint(...points);
|
|
163
159
|
}
|
|
164
160
|
return { node, position: entry, key: text, keyPoints };
|
|
165
161
|
}
|
|
166
162
|
async close() {
|
|
167
|
-
const results = await Promise.allSettled([this
|
|
163
|
+
const results = await Promise.allSettled([this.#storage.close(), this.#payload.close()]);
|
|
168
164
|
for (const result of results) if (result.status === "rejected") throw result.reason;
|
|
169
165
|
}
|
|
170
166
|
};
|
|
@@ -175,15 +171,17 @@ var EmptyJsonDocumentError = class extends Error {
|
|
|
175
171
|
super("JSON document is empty");
|
|
176
172
|
}
|
|
177
173
|
};
|
|
178
|
-
async function
|
|
179
|
-
const { signal } = options, store = new JsonDocumentStore(options);
|
|
174
|
+
async function openJsonDocument(options, input) {
|
|
175
|
+
const { signal } = options, store = new JsonDocumentStore(options), profile = options.profile ?? "python39";
|
|
180
176
|
try {
|
|
181
177
|
let root = 0, parent = 0, stringNode = 0;
|
|
182
178
|
const budget = new Budget(resolveJqLimits({ maxInputBytes: Infinity, maxValueBytes: Infinity, maxCollectionSize: Infinity, maxSteps: Infinity }), signal);
|
|
183
|
-
for await (const event of jsonValues(input, budget, { stream: true, stringChunks: { maxControlBytes: 65536, containers: true, codePoints:
|
|
179
|
+
for await (const event of jsonValues(input, budget, { stream: true, stringChunks: { maxControlBytes: options.maxControlBytes ?? 65536, containers: true, codePoints: profile === "python39" }, profile })) {
|
|
184
180
|
signal.throwIfAborted();
|
|
185
181
|
if (!Array.isArray(event) || !Array.isArray(event[0])) throw new Error("Invalid JSON parser event");
|
|
186
|
-
const path = event[0], value = event[1], kind = event[2]
|
|
182
|
+
const path = event[0], value = event[1], kind = event[2];
|
|
183
|
+
const points = (text) => Array.from(text, (char) => char.codePointAt(0));
|
|
184
|
+
const metadata = profile === "python39" ? event[3] : { key: typeof path.at(-1) === "string" ? points(path.at(-1)) : null, points: typeof value === "string" ? points(value) : null };
|
|
187
185
|
const insert = async (type, token = "") => {
|
|
188
186
|
const node = await store.insert(type, parent, Number(path.at(-1)), metadata.key, token);
|
|
189
187
|
if (!parent) root = node;
|
|
@@ -200,7 +198,7 @@ async function withEmbeddingJsonDocument(options, input, operation) {
|
|
|
200
198
|
await store.endString(stringNode);
|
|
201
199
|
stringNode = 0;
|
|
202
200
|
}
|
|
203
|
-
} else if (kind === null) {
|
|
201
|
+
} else if (kind === null || kind === void 0 && event.length > 1) {
|
|
204
202
|
if (value instanceof Decimal) await insert("number", value.text);
|
|
205
203
|
else if (typeof value === "number") await insert("number", String(value));
|
|
206
204
|
else if (value === null) await insert("null");
|
|
@@ -208,69 +206,25 @@ async function withEmbeddingJsonDocument(options, input, operation) {
|
|
|
208
206
|
}
|
|
209
207
|
}
|
|
210
208
|
if (!root) throw new EmptyJsonDocumentError();
|
|
211
|
-
return
|
|
209
|
+
return { close: store.close.bind(store), root: await store.node(root), child: store.child.bind(store), points: store.points.bind(store), async *text(node) {
|
|
212
210
|
for await (const points of store.points(node)) yield String.fromCodePoint(...points);
|
|
213
|
-
} }
|
|
214
|
-
}
|
|
211
|
+
} };
|
|
212
|
+
} catch (error) {
|
|
215
213
|
await store.close();
|
|
214
|
+
throw error;
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
import { yieldTurn as yieldTurn2 } from "../../safe-bash-contracts/yield.js";
|
|
221
|
-
async function* decodeLlmText(source, signal) {
|
|
222
|
-
const decoder = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
|
|
223
|
-
let steps = 0;
|
|
224
|
-
for await (const bytes of source) {
|
|
225
|
-
if (++steps % 256 === 0) await yieldTurn2(signal);
|
|
226
|
-
signal.throwIfAborted();
|
|
227
|
-
for (let offset = 0; offset < bytes.length; offset += 2048) {
|
|
228
|
-
if (++steps % 256 === 0) await yieldTurn2(signal);
|
|
229
|
-
signal.throwIfAborted();
|
|
230
|
-
yield decoder.decode(bytes.subarray(offset, offset + 2048), { stream: true });
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
yield decoder.decode();
|
|
234
|
-
}
|
|
235
|
-
async function* indentLlmText(source, signal) {
|
|
236
|
-
const replay = decodeLlmText(source, signal)[Symbol.asyncIterator]();
|
|
237
|
-
let pending = "", offset = 0;
|
|
238
|
-
async function* line(length2, nonblank2) {
|
|
239
|
-
if (nonblank2) yield " ";
|
|
240
|
-
while (length2) {
|
|
241
|
-
if (offset === pending.length) {
|
|
242
|
-
const next = await replay.next();
|
|
243
|
-
if (next.done) throw new Error("Stored content changed");
|
|
244
|
-
pending = next.value;
|
|
245
|
-
offset = 0;
|
|
246
|
-
if (!pending.length) continue;
|
|
247
|
-
}
|
|
248
|
-
const count = Math.min(length2, pending.length - offset);
|
|
249
|
-
yield pending.slice(offset, offset + count);
|
|
250
|
-
offset += count;
|
|
251
|
-
length2 -= count;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
let length = 0, nonblank = false;
|
|
217
|
+
async function withEmbeddingJsonDocument(options, input, operation) {
|
|
218
|
+
const document = await openJsonDocument(options, input);
|
|
255
219
|
try {
|
|
256
|
-
|
|
257
|
-
length += char.length;
|
|
258
|
-
if (!isPythonWhitespace(char)) nonblank = true;
|
|
259
|
-
if (["\n", "\r", "\v", "\f", "", "", "", "\x85", "\u2028", "\u2029"].includes(char)) {
|
|
260
|
-
yield* line(length, nonblank);
|
|
261
|
-
length = 0;
|
|
262
|
-
nonblank = false;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (length) yield* line(length, nonblank);
|
|
220
|
+
return await operation(document);
|
|
266
221
|
} finally {
|
|
267
|
-
await
|
|
222
|
+
await document.close();
|
|
268
223
|
}
|
|
269
224
|
}
|
|
270
225
|
|
|
271
226
|
export {
|
|
272
227
|
EmptyJsonDocumentError,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
indentLlmText
|
|
228
|
+
openJsonDocument,
|
|
229
|
+
withEmbeddingJsonDocument
|
|
276
230
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
indentLlmText
|
|
3
|
+
} from "./chunk-T4TGJYFV.js";
|
|
1
4
|
import {
|
|
2
5
|
EmptyJsonDocumentError,
|
|
3
|
-
indentLlmText,
|
|
4
6
|
withEmbeddingJsonDocument
|
|
5
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZALAWNOE.js";
|
|
6
8
|
import {
|
|
7
9
|
pythonRepr
|
|
8
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UIHPHIKI.js";
|
|
9
11
|
import {
|
|
10
12
|
createLlmSpool,
|
|
11
13
|
floatText
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VOR6YDZC.js";
|
|
13
15
|
import "./chunk-3PO534WJ.js";
|
|
14
16
|
import {
|
|
15
17
|
attachmentDigestHex,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createBcCommands,
|
|
5
5
|
settings
|
|
6
6
|
} from "../../chunks/chunk-Q6XBTX6G.js";
|
|
7
|
-
import "../../chunks/chunk-
|
|
7
|
+
import "../../chunks/chunk-C7RBTLYX.js";
|
|
8
8
|
import "../../chunks/chunk-N4CQ5E3G.js";
|
|
9
9
|
import "../../chunks/chunk-EDJBO2HZ.js";
|
|
10
10
|
import "../../chunks/chunk-IMOFLK26.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LlmCancelToolCall,
|
|
3
3
|
LlmLoaderLookupError,
|
|
4
|
+
LlmPluginExit,
|
|
4
5
|
createElevenLabsProvider,
|
|
5
6
|
createLlmCommand,
|
|
6
7
|
createLlmCommands,
|
|
@@ -27,6 +28,7 @@ import {
|
|
|
27
28
|
llmTemplateUsesInput,
|
|
28
29
|
loadLlmPluginFragments,
|
|
29
30
|
openAiChatOptions,
|
|
31
|
+
openLlmJsonDocument,
|
|
30
32
|
parseLlmSchemaDsl,
|
|
31
33
|
resolveLlmSchemaInput,
|
|
32
34
|
resolveLlmUrlAttachment,
|
|
@@ -40,10 +42,11 @@ import {
|
|
|
40
42
|
templateYaml,
|
|
41
43
|
validateLlmTemplateParameters,
|
|
42
44
|
validateModelOptions
|
|
43
|
-
} from "../../chunks/chunk-
|
|
45
|
+
} from "../../chunks/chunk-T6FHWSHM.js";
|
|
44
46
|
export {
|
|
45
47
|
LlmCancelToolCall,
|
|
46
48
|
LlmLoaderLookupError,
|
|
49
|
+
LlmPluginExit,
|
|
47
50
|
createElevenLabsProvider,
|
|
48
51
|
createLlmCommand,
|
|
49
52
|
createLlmCommands,
|
|
@@ -70,6 +73,7 @@ export {
|
|
|
70
73
|
llmTemplateUsesInput,
|
|
71
74
|
loadLlmPluginFragments,
|
|
72
75
|
openAiChatOptions,
|
|
76
|
+
openLlmJsonDocument,
|
|
73
77
|
parseLlmSchemaDsl,
|
|
74
78
|
resolveLlmSchemaInput,
|
|
75
79
|
resolveLlmUrlAttachment,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { "LlmCancelToolCall", "LlmLoaderLookupError", "createElevenLabsProvider", "createLlmCommand", "createLlmCommands", "createLlmConfiguration", "createLlmFragmentLoaders", "createLlmFragmentSource", "createLlmInputBudget", "createLlmService", "createLlmSpool", "createLlmTemplateStore", "createLlmToolRegistry", "createLlmUrlFragmentSource", "createLlmUrlSource", "createOpenAiProvider", "encodeLlmBase64", "evaluateLlmTemplate", "executeLlmToolCalls", "findExtractedRange", "getLlmAttachmentUrlId", "getLlmFragmentPrefix", "getLlmModelAliases", "llmCommands", "llmReferenceVersion", "llmTemplateUsesInput", "loadLlmPluginFragments", "openAiChatOptions", "parseLlmSchemaDsl", "resolveLlmSchemaInput", "resolveLlmUrlAttachment", "selectLlmModelByQuery", "selectLlmTools", "serializeLlmJsonString", "serializeLlmJsonValue", "serializeLlmTokenUsage", "serializeOpenAiChatRequest", "streamLlmToolChain", "templateYaml", "validateLlmTemplateParameters", "validateModelOptions" } from "../../../safe-bash-command-llm/index.js";
|
|
1
|
+
export { "LlmCancelToolCall", "LlmLoaderLookupError", "LlmPluginExit", "createElevenLabsProvider", "createLlmCommand", "createLlmCommands", "createLlmConfiguration", "createLlmFragmentLoaders", "createLlmFragmentSource", "createLlmInputBudget", "createLlmService", "createLlmSpool", "createLlmTemplateStore", "createLlmToolRegistry", "createLlmUrlFragmentSource", "createLlmUrlSource", "createOpenAiProvider", "encodeLlmBase64", "evaluateLlmTemplate", "executeLlmToolCalls", "findExtractedRange", "getLlmAttachmentUrlId", "getLlmFragmentPrefix", "getLlmModelAliases", "llmCommands", "llmReferenceVersion", "llmTemplateUsesInput", "loadLlmPluginFragments", "openAiChatOptions", "openLlmJsonDocument", "parseLlmSchemaDsl", "resolveLlmSchemaInput", "resolveLlmUrlAttachment", "selectLlmModelByQuery", "selectLlmTools", "serializeLlmJsonString", "serializeLlmJsonValue", "serializeLlmTokenUsage", "serializeOpenAiChatRequest", "streamLlmToolChain", "templateYaml", "validateLlmTemplateParameters", "validateModelOptions" } from "../../../safe-bash-command-llm/index.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/safe-bash/src/commands/python/executor.ts
|
|
2
|
-
import { PythonFailure, PythonPackageConflictError, createPythonBuildBackend, createPythonBuildDependencies, createPythonBuildEnvironment, createPythonExecutorCommands, createPythonExecutorPool, createPythonHostBridge, createPythonJspiAssets, createPythonJspiExecutor, createPythonJspiNativeCall, createPythonJspiStatResult, createPythonJspiTrampoline, createPythonLlmCapability, createPythonLlmFragmentLoader, createPythonLlmLoaderDiscovery, createPythonLlmLoaderProvider, createPythonLlmPackageManager, createPythonLlmTemplateLoader, createPythonLlmToolLoader, createPythonPackageCache, createPythonPackageEnvironment, createPythonPackageManifestStore, createPythonShellCapability, createPythonSourcePackageEnvironment, createPythonSourceSnapshot, inspectPythonCapabilities, installPythonLlmDependencies, installPythonLlmPackages, publishPythonBuildWheel, pythonDocumentPackages, pythonExecutorCommands, pythonHostFailureCode, pythonLlmDependencies, pythonLlmPackages } from "../../../safe-bash-command-python/executor.js";
|
|
2
|
+
import { PythonFailure, PythonPackageConflictError, createPythonBuildBackend, createPythonBuildDependencies, createPythonBuildEnvironment, createPythonExecutorCommands, createPythonExecutorPool, createPythonHostBridge, createPythonJspiAssets, createPythonJspiExecutor, createPythonJspiNativeCall, createPythonJspiStatResult, createPythonJspiTrampoline, createPythonLlmCapability, createPythonLlmFragmentLoader, createPythonLlmLoaderDiscovery, createPythonLlmLoaderProvider, createPythonLlmPackageManager, createPythonLlmTemplateLoader, createPythonLlmToolLoader, createPythonPackageCache, createPythonPackageEnvironment, createPythonPackageFileManifestStore, createPythonPackageManifestStore, createPythonPackageStreamingManifestStore, createPythonShellCapability, createPythonSourcePackageEnvironment, createPythonSourceSnapshot, inspectPythonCapabilities, installPythonLlmDependencies, installPythonLlmPackages, publishPythonBuildWheel, pythonDocumentPackages, pythonExecutorCommands, pythonHostFailureCode, pythonLlmDependencies, pythonLlmPackages } from "../../../safe-bash-command-python/executor.js";
|
|
3
3
|
export {
|
|
4
4
|
PythonFailure,
|
|
5
5
|
PythonPackageConflictError,
|
|
@@ -23,7 +23,9 @@ export {
|
|
|
23
23
|
createPythonLlmToolLoader,
|
|
24
24
|
createPythonPackageCache,
|
|
25
25
|
createPythonPackageEnvironment,
|
|
26
|
+
createPythonPackageFileManifestStore,
|
|
26
27
|
createPythonPackageManifestStore,
|
|
28
|
+
createPythonPackageStreamingManifestStore,
|
|
27
29
|
createPythonShellCapability,
|
|
28
30
|
createPythonSourcePackageEnvironment,
|
|
29
31
|
createPythonSourceSnapshot,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { "PythonFailure", "PythonPackageConflictError", "createPythonBuildBackend", "createPythonBuildDependencies", "createPythonBuildEnvironment", "createPythonExecutorCommands", "createPythonExecutorPool", "createPythonHostBridge", "createPythonJspiAssets", "createPythonJspiExecutor", "createPythonJspiNativeCall", "createPythonJspiStatResult", "createPythonJspiTrampoline", "createPythonLlmCapability", "createPythonLlmFragmentLoader", "createPythonLlmLoaderDiscovery", "createPythonLlmLoaderProvider", "createPythonLlmPackageManager", "createPythonLlmTemplateLoader", "createPythonLlmToolLoader", "createPythonPackageCache", "createPythonPackageEnvironment", "createPythonPackageManifestStore", "createPythonShellCapability", "createPythonSourcePackageEnvironment", "createPythonSourceSnapshot", "inspectPythonCapabilities", "installPythonLlmDependencies", "installPythonLlmPackages", "publishPythonBuildWheel", "pythonDocumentPackages", "pythonExecutorCommands", "pythonHostFailureCode", "pythonLlmDependencies", "pythonLlmPackages" } from "../../../safe-bash-command-python/executor.js";
|
|
1
|
+
export { "PythonFailure", "PythonPackageConflictError", "createPythonBuildBackend", "createPythonBuildDependencies", "createPythonBuildEnvironment", "createPythonExecutorCommands", "createPythonExecutorPool", "createPythonHostBridge", "createPythonJspiAssets", "createPythonJspiExecutor", "createPythonJspiNativeCall", "createPythonJspiStatResult", "createPythonJspiTrampoline", "createPythonLlmCapability", "createPythonLlmFragmentLoader", "createPythonLlmLoaderDiscovery", "createPythonLlmLoaderProvider", "createPythonLlmPackageManager", "createPythonLlmTemplateLoader", "createPythonLlmToolLoader", "createPythonPackageCache", "createPythonPackageEnvironment", "createPythonPackageFileManifestStore", "createPythonPackageManifestStore", "createPythonPackageStreamingManifestStore", "createPythonShellCapability", "createPythonSourcePackageEnvironment", "createPythonSourceSnapshot", "inspectPythonCapabilities", "installPythonLlmDependencies", "installPythonLlmPackages", "publishPythonBuildWheel", "pythonDocumentPackages", "pythonExecutorCommands", "pythonHostFailureCode", "pythonLlmDependencies", "pythonLlmPackages" } from "../../../safe-bash-command-python/executor.js";
|
|
2
2
|
//# sourceMappingURL=executor.js.map
|
|
@@ -22,7 +22,9 @@ import {
|
|
|
22
22
|
createPythonLlmToolLoader,
|
|
23
23
|
createPythonPackageCache,
|
|
24
24
|
createPythonPackageEnvironment,
|
|
25
|
+
createPythonPackageFileManifestStore,
|
|
25
26
|
createPythonPackageManifestStore,
|
|
27
|
+
createPythonPackageStreamingManifestStore,
|
|
26
28
|
createPythonShellCapability,
|
|
27
29
|
createPythonSourcePackageEnvironment,
|
|
28
30
|
createPythonSourceSnapshot,
|
|
@@ -36,7 +38,7 @@ import {
|
|
|
36
38
|
pythonHostFailureCode,
|
|
37
39
|
pythonLlmDependencies,
|
|
38
40
|
pythonLlmPackages
|
|
39
|
-
} from "../../chunks/chunk-
|
|
41
|
+
} from "../../chunks/chunk-M6XFU6LQ.js";
|
|
40
42
|
export {
|
|
41
43
|
PythonFailure,
|
|
42
44
|
PythonPackageConflictError,
|
|
@@ -61,7 +63,9 @@ export {
|
|
|
61
63
|
createPythonLlmToolLoader,
|
|
62
64
|
createPythonPackageCache,
|
|
63
65
|
createPythonPackageEnvironment,
|
|
66
|
+
createPythonPackageFileManifestStore,
|
|
64
67
|
createPythonPackageManifestStore,
|
|
68
|
+
createPythonPackageStreamingManifestStore,
|
|
65
69
|
createPythonShellCapability,
|
|
66
70
|
createPythonSourcePackageEnvironment,
|
|
67
71
|
createPythonSourceSnapshot,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { "PythonFailure", "PythonPackageConflictError", "createPythonBuildBackend", "createPythonBuildDependencies", "createPythonBuildEnvironment", "createPythonCommands", "createPythonExecutorCommands", "createPythonExecutorPool", "createPythonHostBridge", "createPythonJspiAssets", "createPythonJspiExecutor", "createPythonJspiNativeCall", "createPythonJspiStatResult", "createPythonJspiTrampoline", "createPythonLlmCapability", "createPythonLlmFragmentLoader", "createPythonLlmLoaderDiscovery", "createPythonLlmLoaderProvider", "createPythonLlmPackageManager", "createPythonLlmTemplateLoader", "createPythonLlmToolLoader", "createPythonPackageCache", "createPythonPackageEnvironment", "createPythonPackageManifestStore", "createPythonShellCapability", "createPythonSourcePackageEnvironment", "createPythonSourceSnapshot", "inspectPythonCapabilities", "installPythonLlmDependencies", "installPythonLlmPackages", "publishPythonBuildWheel", "pythonCommands", "pythonDocumentPackages", "pythonExecutorCommands", "pythonHostFailureCode", "pythonLlmDependencies", "pythonLlmPackages" } from "../../../safe-bash-command-python/index.js";
|
|
1
|
+
export { "PythonFailure", "PythonPackageConflictError", "createPythonBuildBackend", "createPythonBuildDependencies", "createPythonBuildEnvironment", "createPythonCommands", "createPythonExecutorCommands", "createPythonExecutorPool", "createPythonHostBridge", "createPythonJspiAssets", "createPythonJspiExecutor", "createPythonJspiNativeCall", "createPythonJspiStatResult", "createPythonJspiTrampoline", "createPythonLlmCapability", "createPythonLlmFragmentLoader", "createPythonLlmLoaderDiscovery", "createPythonLlmLoaderProvider", "createPythonLlmPackageManager", "createPythonLlmTemplateLoader", "createPythonLlmToolLoader", "createPythonPackageCache", "createPythonPackageEnvironment", "createPythonPackageFileManifestStore", "createPythonPackageManifestStore", "createPythonPackageStreamingManifestStore", "createPythonShellCapability", "createPythonSourcePackageEnvironment", "createPythonSourceSnapshot", "inspectPythonCapabilities", "installPythonLlmDependencies", "installPythonLlmPackages", "publishPythonBuildWheel", "pythonCommands", "pythonDocumentPackages", "pythonExecutorCommands", "pythonHostFailureCode", "pythonLlmDependencies", "pythonLlmPackages" } from "../../../safe-bash-command-python/index.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,6 +3,6 @@ export { CommandRegistry, Shell, ShellLimitError, ShellSyntaxError, cloudflareWo
|
|
|
3
3
|
export { baseAgentCommands, createBoundedRegexProvider } from "./registry-entry.browser.js";
|
|
4
4
|
export { agentCommands, createAgentCommands } from "./plugins/index.browser.js";
|
|
5
5
|
export { EreLedger, EreProfileLimitError, EreSyntaxError, EreUnsupportedError, EreUsageUnknownError, RegexExecutionError, RegexExecutor, RegexSession, compileEre, matchEre } from "./commands/regex-execution/public.browser.js";
|
|
6
|
-
export { PythonFailure, PythonPackageConflictError, createPythonBuildBackend, createPythonBuildDependencies, createPythonBuildEnvironment, createPythonExecutorCommands, createPythonExecutorPool, createPythonHostBridge, createPythonJspiAssets, createPythonJspiExecutor, createPythonJspiNativeCall, createPythonJspiStatResult, createPythonJspiTrampoline, createPythonLlmCapability, createPythonLlmFragmentLoader, createPythonLlmLoaderDiscovery, createPythonLlmLoaderProvider, createPythonLlmPackageManager, createPythonLlmTemplateLoader, createPythonLlmToolLoader, createPythonPackageCache, createPythonPackageEnvironment, createPythonPackageManifestStore, createPythonShellCapability, createPythonSourcePackageEnvironment, createPythonSourceSnapshot, inspectPythonCapabilities, installPythonLlmDependencies, installPythonLlmPackages, publishPythonBuildWheel, pythonDocumentPackages, pythonExecutorCommands, pythonHostFailureCode, pythonLlmDependencies, pythonLlmPackages } from "./commands/python/executor.browser.js";
|
|
6
|
+
export { PythonFailure, PythonPackageConflictError, createPythonBuildBackend, createPythonBuildDependencies, createPythonBuildEnvironment, createPythonExecutorCommands, createPythonExecutorPool, createPythonHostBridge, createPythonJspiAssets, createPythonJspiExecutor, createPythonJspiNativeCall, createPythonJspiStatResult, createPythonJspiTrampoline, createPythonLlmCapability, createPythonLlmFragmentLoader, createPythonLlmLoaderDiscovery, createPythonLlmLoaderProvider, createPythonLlmPackageManager, createPythonLlmTemplateLoader, createPythonLlmToolLoader, createPythonPackageCache, createPythonPackageEnvironment, createPythonPackageFileManifestStore, createPythonPackageManifestStore, createPythonPackageStreamingManifestStore, createPythonShellCapability, createPythonSourcePackageEnvironment, createPythonSourceSnapshot, inspectPythonCapabilities, installPythonLlmDependencies, installPythonLlmPackages, publishPythonBuildWheel, pythonDocumentPackages, pythonExecutorCommands, pythonHostFailureCode, pythonLlmDependencies, pythonLlmPackages } from "./commands/python/executor.browser.js";
|
|
7
7
|
export { createPythonCommands, pythonCommands } from "./commands/python/index.browser.js";
|
|
8
|
-
export { LlmCancelToolCall, LlmLoaderLookupError, createElevenLabsProvider, createLlmCommand, createLlmCommands, createLlmConfiguration, createLlmFragmentLoaders, createLlmFragmentSource, createLlmInputBudget, createLlmService, createLlmSpool, createLlmTemplateStore, createLlmToolRegistry, createLlmUrlFragmentSource, createLlmUrlSource, createOpenAiProvider, encodeLlmBase64, evaluateLlmTemplate, executeLlmToolCalls, findExtractedRange, getLlmAttachmentUrlId, getLlmFragmentPrefix, getLlmModelAliases, llmCommands, llmReferenceVersion, llmTemplateUsesInput, loadLlmPluginFragments, openAiChatOptions, parseLlmSchemaDsl, resolveLlmSchemaInput, resolveLlmUrlAttachment, selectLlmModelByQuery, selectLlmTools, serializeLlmJsonString, serializeLlmJsonValue, serializeLlmTokenUsage, serializeOpenAiChatRequest, streamLlmToolChain, templateYaml, validateLlmTemplateParameters, validateModelOptions } from "./commands/llm/index.browser.js";
|
|
8
|
+
export { LlmCancelToolCall, LlmLoaderLookupError, LlmPluginExit, createElevenLabsProvider, createLlmCommand, createLlmCommands, createLlmConfiguration, createLlmFragmentLoaders, createLlmFragmentSource, createLlmInputBudget, createLlmService, createLlmSpool, createLlmTemplateStore, createLlmToolRegistry, createLlmUrlFragmentSource, createLlmUrlSource, createOpenAiProvider, encodeLlmBase64, evaluateLlmTemplate, executeLlmToolCalls, findExtractedRange, getLlmAttachmentUrlId, getLlmFragmentPrefix, getLlmModelAliases, llmCommands, llmReferenceVersion, llmTemplateUsesInput, loadLlmPluginFragments, openAiChatOptions, openLlmJsonDocument, parseLlmSchemaDsl, resolveLlmSchemaInput, resolveLlmUrlAttachment, selectLlmModelByQuery, selectLlmTools, serializeLlmJsonString, serializeLlmJsonValue, serializeLlmTokenUsage, serializeOpenAiChatRequest, streamLlmToolChain, templateYaml, validateLlmTemplateParameters, validateModelOptions } from "./commands/llm/index.browser.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
htmlqCommands,
|
|
34
34
|
mmdcCommands,
|
|
35
35
|
unrtfCommands
|
|
36
|
-
} from "./chunks/chunk-
|
|
36
|
+
} from "./chunks/chunk-SGHFQIZB.js";
|
|
37
37
|
import {
|
|
38
38
|
createMikeYqCommand,
|
|
39
39
|
createMikeYqCommands,
|
|
@@ -62,6 +62,7 @@ import {
|
|
|
62
62
|
import {
|
|
63
63
|
LlmCancelToolCall,
|
|
64
64
|
LlmLoaderLookupError,
|
|
65
|
+
LlmPluginExit,
|
|
65
66
|
createElevenLabsProvider,
|
|
66
67
|
createLlmCommand,
|
|
67
68
|
createLlmCommands,
|
|
@@ -88,6 +89,7 @@ import {
|
|
|
88
89
|
llmTemplateUsesInput,
|
|
89
90
|
loadLlmPluginFragments,
|
|
90
91
|
openAiChatOptions,
|
|
92
|
+
openLlmJsonDocument,
|
|
91
93
|
parseLlmSchemaDsl,
|
|
92
94
|
resolveLlmSchemaInput,
|
|
93
95
|
resolveLlmUrlAttachment,
|
|
@@ -101,12 +103,12 @@ import {
|
|
|
101
103
|
templateYaml,
|
|
102
104
|
validateLlmTemplateParameters,
|
|
103
105
|
validateModelOptions
|
|
104
|
-
} from "./chunks/chunk-
|
|
106
|
+
} from "./chunks/chunk-T6FHWSHM.js";
|
|
105
107
|
import {
|
|
106
108
|
cloudflareWorkerLimits,
|
|
107
109
|
mapfileExtension,
|
|
108
110
|
readExtension
|
|
109
|
-
} from "./chunks/chunk-
|
|
111
|
+
} from "./chunks/chunk-HWYINF6Y.js";
|
|
110
112
|
import "./chunks/chunk-GI7OALXO.js";
|
|
111
113
|
import {
|
|
112
114
|
base32Commands,
|
|
@@ -236,7 +238,7 @@ import {
|
|
|
236
238
|
xanCommands,
|
|
237
239
|
xxdCommands,
|
|
238
240
|
yesCommands
|
|
239
|
-
} from "./chunks/chunk-
|
|
241
|
+
} from "./chunks/chunk-Y67A2DE4.js";
|
|
240
242
|
import {
|
|
241
243
|
createDos2unixCommand,
|
|
242
244
|
createDos2unixCommands,
|
|
@@ -356,7 +358,9 @@ import {
|
|
|
356
358
|
createPythonLlmToolLoader,
|
|
357
359
|
createPythonPackageCache,
|
|
358
360
|
createPythonPackageEnvironment,
|
|
361
|
+
createPythonPackageFileManifestStore,
|
|
359
362
|
createPythonPackageManifestStore,
|
|
363
|
+
createPythonPackageStreamingManifestStore,
|
|
360
364
|
createPythonShellCapability,
|
|
361
365
|
createPythonSourcePackageEnvironment,
|
|
362
366
|
createPythonSourceSnapshot,
|
|
@@ -370,7 +374,7 @@ import {
|
|
|
370
374
|
pythonHostFailureCode,
|
|
371
375
|
pythonLlmDependencies,
|
|
372
376
|
pythonLlmPackages
|
|
373
|
-
} from "./chunks/chunk-
|
|
377
|
+
} from "./chunks/chunk-M6XFU6LQ.js";
|
|
374
378
|
import {
|
|
375
379
|
captureEnvironment,
|
|
376
380
|
createDocumentHandlers,
|
|
@@ -615,7 +619,7 @@ import {
|
|
|
615
619
|
readlinkCommands,
|
|
616
620
|
realpathCommands,
|
|
617
621
|
touchCommands
|
|
618
|
-
} from "./chunks/chunk-
|
|
622
|
+
} from "./chunks/chunk-C7RBTLYX.js";
|
|
619
623
|
import "./chunks/chunk-N4CQ5E3G.js";
|
|
620
624
|
import "./chunks/chunk-EDJBO2HZ.js";
|
|
621
625
|
import {
|
|
@@ -1011,6 +1015,7 @@ export {
|
|
|
1011
1015
|
InputByteBudget,
|
|
1012
1016
|
LlmCancelToolCall,
|
|
1013
1017
|
LlmLoaderLookupError,
|
|
1018
|
+
LlmPluginExit,
|
|
1014
1019
|
MdqError,
|
|
1015
1020
|
MemoryFileSystem,
|
|
1016
1021
|
MockS3Client,
|
|
@@ -1330,7 +1335,9 @@ export {
|
|
|
1330
1335
|
createPythonLlmToolLoader,
|
|
1331
1336
|
createPythonPackageCache,
|
|
1332
1337
|
createPythonPackageEnvironment,
|
|
1338
|
+
createPythonPackageFileManifestStore,
|
|
1333
1339
|
createPythonPackageManifestStore,
|
|
1340
|
+
createPythonPackageStreamingManifestStore,
|
|
1334
1341
|
createPythonShellCapability,
|
|
1335
1342
|
createPythonSourcePackageEnvironment,
|
|
1336
1343
|
createPythonSourceSnapshot,
|
|
@@ -1608,6 +1615,7 @@ export {
|
|
|
1608
1615
|
odCommands,
|
|
1609
1616
|
opCommands,
|
|
1610
1617
|
openAiChatOptions,
|
|
1618
|
+
openLlmJsonDocument,
|
|
1611
1619
|
opensslCommands,
|
|
1612
1620
|
optionalCommandCatalog,
|
|
1613
1621
|
optionalCommands,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
agentCommands,
|
|
3
3
|
createAgentCommands
|
|
4
|
-
} from "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-SGHFQIZB.js";
|
|
5
5
|
import "../chunks/chunk-XDDXXCBG.js";
|
|
6
6
|
import {
|
|
7
7
|
baseAgentCommands
|
|
8
|
-
} from "../chunks/chunk-
|
|
8
|
+
} from "../chunks/chunk-Y67A2DE4.js";
|
|
9
9
|
import "../chunks/chunk-Z6R76REA.js";
|
|
10
10
|
import "../chunks/chunk-5ICB3H25.js";
|
|
11
11
|
import "../chunks/chunk-GXEFNZGD.js";
|
|
@@ -32,7 +32,7 @@ import "../chunks/chunk-ESH5MDQR.js";
|
|
|
32
32
|
import "../chunks/chunk-4KYUJ3GC.js";
|
|
33
33
|
import "../chunks/chunk-6E4SGHLU.js";
|
|
34
34
|
import "../chunks/chunk-LFKUWFZT.js";
|
|
35
|
-
import "../chunks/chunk-
|
|
35
|
+
import "../chunks/chunk-C7RBTLYX.js";
|
|
36
36
|
import "../chunks/chunk-N4CQ5E3G.js";
|
|
37
37
|
import "../chunks/chunk-EDJBO2HZ.js";
|
|
38
38
|
import "../chunks/chunk-IMOFLK26.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseAgentCommands
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-Y67A2DE4.js";
|
|
4
4
|
import "./chunks/chunk-Z6R76REA.js";
|
|
5
5
|
import "./chunks/chunk-5ICB3H25.js";
|
|
6
6
|
import "./chunks/chunk-GXEFNZGD.js";
|
|
@@ -26,7 +26,7 @@ import "./chunks/chunk-F76MF5GT.js";
|
|
|
26
26
|
import {
|
|
27
27
|
createBoundedRegexProvider
|
|
28
28
|
} from "./chunks/chunk-LFKUWFZT.js";
|
|
29
|
-
import "./chunks/chunk-
|
|
29
|
+
import "./chunks/chunk-C7RBTLYX.js";
|
|
30
30
|
import "./chunks/chunk-N4CQ5E3G.js";
|
|
31
31
|
import "./chunks/chunk-EDJBO2HZ.js";
|
|
32
32
|
import "./chunks/chunk-IMOFLK26.js";
|