barebox 0.12.0 → 0.14.0

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/types/run.d.ts CHANGED
@@ -29,6 +29,7 @@
29
29
  * @property {number} [heldBodyMaxBytes] cap on a held request's body, in bytes (default 52428800); over it the request is denied
30
30
  * @property {{ matcher: any, tools: Record<string, any>, dirs?: string[] }} [labels] the loaded label files (`loadLabels`); their folders are masked from the sandbox
31
31
  * @property {string[]} [allowLocal] exact `host:port` pairs (for example a local model server) that may pass the wall's private/loopback check (the `localLlm` setting)
32
+ * @property {{ pay?: string[], send?: string[] }} [floor] the config `floor` key (M11): hosts, `*.domain` or `"METHOD host/path"` entries that ask in every mode, `trust` included (see `createProxy`)
32
33
  * @property {object} [unsafeTestOnly] TEST-ONLY escape hatch, forwarded to the proxy (see `createProxy`): everything under it weakens the sandbox wall
33
34
  * @property {NodeJS.WritableStream} [stdout] where the agent's stdout goes (default process.stdout)
34
35
  * @property {NodeJS.WritableStream} [stderr] where the agent's stderr goes (default process.stderr)
@@ -52,6 +53,7 @@
52
53
  * @param {number} [opts.heldBodyMaxBytes] cap on a held request's body, in bytes (default 52428800); over it the request is denied
53
54
  * @param {{ matcher: any, tools: Record<string, any>, dirs?: string[] }|null} [opts.labels] the loaded label files (`loadLabels`); their folders are masked from the sandbox
54
55
  * @param {string[]} [opts.allowLocal] exact `host:port` pairs (for example a local model server) that may pass the wall's private/loopback check (the `localLlm` setting)
56
+ * @param {{ pay?: string[], send?: string[] }|null} [opts.floor] the config `floor` key (M11): hosts, `*.domain` or `"METHOD host/path"` entries that ask in every mode, `trust` included (see `createProxy`)
55
57
  * @param {object|null} [opts.unsafeTestOnly] TEST-ONLY escape hatch, forwarded to the proxy (see `createProxy`)
56
58
  * @param {NodeJS.WritableStream|null} [opts.stdout] where the agent's stdout goes (default process.stdout)
57
59
  * @param {NodeJS.WritableStream|null} [opts.stderr] where the agent's stderr goes (default process.stderr)
@@ -66,7 +68,7 @@
66
68
  * import { run } from "barebox";
67
69
  * const { exit, asks, audit } = await run({ proj: "/tmp/proj", command: ["bash", "-c", "echo hi"] });
68
70
  */
69
- export function run({ proj, command, mode, onAsk, onEvent, runtime, agent, timeoutMs, heldBodyMaxBytes, allowLocal, labels, unsafeTestOnly, stdout, stderr, overlay, overlayIgnore, secrets, env }: {
71
+ export function run({ proj, command, mode, onAsk, onEvent, runtime, agent, timeoutMs, heldBodyMaxBytes, allowLocal, floor, labels, unsafeTestOnly, stdout, stderr, overlay, overlayIgnore, secrets, env }: {
70
72
  proj: string;
71
73
  command: string[];
72
74
  mode?: string | undefined;
@@ -82,6 +84,10 @@ export function run({ proj, command, mode, onAsk, onEvent, runtime, agent, timeo
82
84
  dirs?: string[];
83
85
  } | null | undefined;
84
86
  allowLocal?: string[] | undefined;
87
+ floor?: {
88
+ pay?: string[];
89
+ send?: string[];
90
+ } | null | undefined;
85
91
  unsafeTestOnly?: object | null;
86
92
  stdout?: NodeJS.WritableStream | null | undefined;
87
93
  stderr?: NodeJS.WritableStream | null | undefined;
@@ -204,6 +210,13 @@ export type RunOptions = {
204
210
  * exact `host:port` pairs (for example a local model server) that may pass the wall's private/loopback check (the `localLlm` setting)
205
211
  */
206
212
  allowLocal?: string[] | undefined;
213
+ /**
214
+ * the config `floor` key (M11): hosts, `*.domain` or `"METHOD host/path"` entries that ask in every mode, `trust` included (see `createProxy`)
215
+ */
216
+ floor?: {
217
+ pay?: string[];
218
+ send?: string[];
219
+ } | undefined;
207
220
  /**
208
221
  * TEST-ONLY escape hatch, forwarded to the proxy (see `createProxy`): everything under it weakens the sandbox wall
209
222
  */