opencode/packages
Ryan Vogel 3d1addb2ac fix(core): ask the webfetch permission for Code Mode fetch calls
The execute (Code Mode) tool exposes a `fetch` global that went straight to
the network. The webfetch tool asks the `webfetch` permission for every URL,
but Code Mode did not, so a `webfetch: deny` rule or a Console "Can't fetch
the web" policy did nothing against a model that used `execute` to send data
to any server.

- core: the tool registry now asserts the `webfetch` permission (resource =
  the URL, same shape as the webfetch tool) in the extension.before hook of
  every fetch a Code Mode program makes. A denied URL throws inside the
  program and its progress row settles as an error. Tool.node now depends on
  Permission.node.
- codemode: extension globals were called before their `extension.before`
  hook ran, so a failing hook only hid the result while the request had
  already been sent. The hook now runs first and a denied call never reaches
  the host function. A denied async global still rejects its promise; any
  other denied global throws.

Verified: new cases in codemode/test/codemode.test.ts (denied host function
is never called) and core/test/tool-execute.test.ts (webfetch deny rule fails
the script's fetch, allow rule lets it through, each URL is asserted) both go
red without the fix. bun typecheck in core and codemode, codemode suite
(1415 pass), core suite (only pre-existing local failures: ripgrep download
and macOS bash 3.2 shell tests, also failing on dev), bun run check.
2026-10-26 14:30:37 -04:00
..
ai ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
app ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
cli ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
client ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
codemode fix(core): ask the webfetch permission for Code Mode fetch calls 2026-10-26 14:30:37 -04:00
console feat(console): serve apple-app-site-association for iOS pair links (#58540) 2026-10-25 15:53:00 -07:00
core fix(core): ask the webfetch permission for Code Mode fetch calls 2026-10-26 14:30:37 -04:00
desktop ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
effect-drizzle-sqlite sync release versions for v1.18.35 2026-10-06 20:18:36 +00:00
function sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
gui-extensions ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
http-recorder sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
httpapi-codegen fix(httpapi-codegen): emit flat Promise input field types (#58875) 2026-10-26 01:33:32 -05:00
identity
latex sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
merman sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
patchmark feat(session-ui): replace marked + remend streaming re-lexing with @opencode/patchmark (#57016) 2026-10-19 22:32:18 -07:00
plugin ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
plugin-browser ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
plugins sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
posts chore: use bun check for local typechecks and TypeScript 7.1 in CI (#58253) 2026-10-23 09:23:31 +10:00
protocol ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
schema ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
script ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
sdk ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
server ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
session-ui fix(session-ui): make question highlight instant and hover-only (#59333) 2026-10-26 11:03:11 -07:00
simulation ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
stats docs(go): add Iceman Contributor Free (#58792) 2026-10-24 13:24:13 -07:00
stories chore: merge beta into dev 2026-10-26 13:56:31 +10:00
theme ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
tui fix(tui): keep pasted text intact when you copy it out of the prompt (#59209) 2026-10-26 09:57:10 -07:00
ui ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
util ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
web sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00