foldrun 11.0.5 → 11.1.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/docs/network.md +28 -3
- package/package.json +1 -1
- package/src/commands.mjs +17 -7
package/docs/network.md
CHANGED
|
@@ -115,8 +115,9 @@ all read those variables. A browser your own script launches does not:
|
|
|
115
115
|
Chromium ignores a password written in the proxy variable, so every page
|
|
116
116
|
fails `ERR_INVALID_AUTH_CREDENTIALS`. Hand Playwright the proxy yourself —
|
|
117
117
|
read `HTTPS_PROXY` with `new URL()` and pass `proxy: { server, username,
|
|
118
|
-
password }` to `launch()
|
|
119
|
-
|
|
118
|
+
password }` to `launch()`. (A step that may browse with the `web` tool gets
|
|
119
|
+
no proxy at all yet — see [Browsing](#browsing) below.) The proxy holds the
|
|
120
|
+
step's list and checks every connection against it:
|
|
120
121
|
|
|
121
122
|
- a site **off the list** is refused — `403`, saying which site and what to
|
|
122
123
|
add — and the refusal is a line in the run trace;
|
|
@@ -136,7 +137,7 @@ The trace opens with the step's network:
|
|
|
136
137
|
```
|
|
137
138
|
network: trusted (default) — the trusted list (207 sites); added: api.hubapi.com
|
|
138
139
|
egress: CONNECT pypi.org:443 × 3 (840ms total)
|
|
139
|
-
network: example.com is not a site this step may reach (network: trusted).
|
|
140
|
+
network: example.com is not a site this step may reach (network: trusted). To allow it, add just this site to the agent's network: list — network: [example.com] — which keeps network: trusted for everything else. Refused.
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
### Report-only, then refuse
|
|
@@ -176,3 +177,27 @@ no egress proxy (no `FOLDRUN_EGRESS_URL`) has no forward door: there,
|
|
|
176
177
|
`not enforced here`. On the single-container tier the proxy variables are
|
|
177
178
|
set and the proxy holds the list, but the container's network is not walled
|
|
178
179
|
in, so a program that ignores the variables still goes direct.
|
|
180
|
+
|
|
181
|
+
### Browsing
|
|
182
|
+
|
|
183
|
+
A step that may **browse** with the `web` tool is not held to its list yet.
|
|
184
|
+
Its browser cannot send the proxy's password the way the other programs do,
|
|
185
|
+
so the step gets no proxy: the browser, and every other program in that
|
|
186
|
+
step, reach sites directly. The trace says so on its network line —
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
network: trusted (agent) — the trusted list (207 sites); added: example.com — not enforced in this step: it may browse, and browsing does not go through the egress proxy yet, so the browser and every other program in this step reach sites directly. Its browser is foldrun's own browser: it comes under network: when hosted enforcement ships (FOL-110).
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
— and names which of three tiers the step's browser falls in, which is
|
|
193
|
+
where it is headed:
|
|
194
|
+
|
|
195
|
+
| tier | browsers | under `network:` |
|
|
196
|
+
|---|---|---|
|
|
197
|
+
| hosted | foldrun's own: the account's browser, Lightpanda, Obscura, a live session | yes, when hosted enforcement ships: its network will reach only the egress proxy |
|
|
198
|
+
| vendor | Browserbase, Steel, Hyperbrowser, Browserless — they take a customer proxy | through the egress proxy, once each vendor passes our own tests |
|
|
199
|
+
| none | Bright Data, ZenRows, any DevTools address — they browse through their own network | never; a restricted, enforced `network:` will refuse them |
|
|
200
|
+
|
|
201
|
+
An agent that must stay inside its list should not browse until then: give
|
|
202
|
+
it `web: {actions: [search, fetch]}`, which goes through the proxy like any
|
|
203
|
+
other program.
|
package/package.json
CHANGED
package/src/commands.mjs
CHANGED
|
@@ -9156,16 +9156,26 @@ async function agentNetworkCmd(positional, flags, layout) {
|
|
|
9156
9156
|
const { listAgents } = await core();
|
|
9157
9157
|
// The folded view a run reads: `network` set inside a `guardrail:` block
|
|
9158
9158
|
// counts the same as a top-level one (effectiveFront lifts it).
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9159
|
+
const front = await effectiveFront(fs.readFileSync(path.join(dir, rel), "utf8"));
|
|
9160
|
+
const info = listAgents("default", "workspace").find((a) => a.name === name);
|
|
9161
|
+
// May it browse? Core answers it (network.browses, with web: inherited
|
|
9162
|
+
// from AGENTS.md); an older core gets the runner's own test on this
|
|
9163
|
+
// file: the web tool, with browse among its actions (trimmed and
|
|
9164
|
+
// lowercased as webConfig reads them) or no actions: list at all.
|
|
9165
|
+
// Such a step is not held to its list yet (FOL-110).
|
|
9166
|
+
const actions = front.web && typeof front.web === "object" && Array.isArray(front.web.actions) ? front.web.actions.map((a) => String(a).trim().toLowerCase()) : null;
|
|
9167
|
+
const fromCore = /** @type {{ browses?: unknown }} */ (info?.network ?? {}).browses; // core ≥ the FOL-110 release
|
|
9168
|
+
const browses = typeof fromCore === "boolean"
|
|
9169
|
+
? fromCore
|
|
9170
|
+
: (info?.tools ?? []).includes("web") && (!actions || actions.includes("browse"));
|
|
9171
|
+
return { info, own: net.readNetwork(front.network).setting, browses };
|
|
9163
9172
|
});
|
|
9164
|
-
const show = (info) => {
|
|
9173
|
+
const show = (info, browses) => {
|
|
9165
9174
|
const p = info?.network;
|
|
9166
9175
|
if (!p) return;
|
|
9167
9176
|
console.log(` ${net.networkLine(p, true)}`);
|
|
9168
9177
|
if (p.level !== "open") console.log(` ${c.dim("a run also allows its MCP servers, its web providers and the sites its secrets are bound to")}`);
|
|
9178
|
+
if (browses) console.log(` ${c.yellow("browsing: this agent may browse, and a browsing step is not held to this list yet — its browser and its other programs reach sites directly (`foldrun docs network`, Browsing). Give it web: {actions: [search, fetch]} to keep it inside the list.")}`);
|
|
9169
9179
|
};
|
|
9170
9180
|
const raw = desk.files.get(rel);
|
|
9171
9181
|
const now = await resolve(desk.files);
|
|
@@ -9174,7 +9184,7 @@ async function agentNetworkCmd(positional, flags, layout) {
|
|
|
9174
9184
|
const removes = list(flags.remove);
|
|
9175
9185
|
if (word === undefined && !adds.length && !removes.length) {
|
|
9176
9186
|
console.log(`\n ${c.bold(name)} ${c.dim(`· ${desk.label}`)}`);
|
|
9177
|
-
show(now.info);
|
|
9187
|
+
show(now.info, now.browses);
|
|
9178
9188
|
console.log();
|
|
9179
9189
|
return 0;
|
|
9180
9190
|
}
|
|
@@ -9205,7 +9215,7 @@ async function agentNetworkCmd(positional, flags, layout) {
|
|
|
9205
9215
|
}
|
|
9206
9216
|
const after = await resolve(new Map([...desk.files, [rel, next]]));
|
|
9207
9217
|
console.log();
|
|
9208
|
-
show(after.info);
|
|
9218
|
+
show(after.info, after.browses);
|
|
9209
9219
|
console.log(`\n ${c.green("✓")} ${rel} ${c.dim(desk.platform ? `in ${desk.ws} — a revision on the platform` : "— `foldrun deploy` ships it")}\n`);
|
|
9210
9220
|
return 0;
|
|
9211
9221
|
}
|