Commit graph

76 commits

Author SHA1 Message Date
Luke Parker
be740a5d01 fix(browser): revoke attach grants left behind by a server that was killed
The attach grant is a stored session rule, but its revoke runs only from the
plugin's finalizer. After SIGKILL, a crash or a stop timeout, the session kept
browser:* and skill:browser allows with no attachment behind them, so the next
server listed the browser tools and every call failed with
[browser.disconnected].

Each grant is now recorded in plugin storage with the server process that wrote
it (host and process ID) and its location, before the grant is written; a
successful revoke removes the record. When the plugin starts for a location, and
before it registers the browser RPC so no attach can race it, it revokes the
grants recorded for that location by a process that no longer runs.

Several server processes can share one database (a desktop's server and a
manual `opencode serve` both use opencode.db), so a sweep of every session in
the location could revoke another server's live grant. The sweep skips records
of a running process and of another host, which cannot be checked. Grants
written before this change have no record and are left alone; the next attach
and detach of their session removes them.

The startup sweep before RPC registration, its location scoping and ignoring
per-session failures come from #61639.

Fixes #61609

Co-authored-by: Chen Yufeiyang <fei76161@gmail.com>
2026-11-13 08:25:22 +10:00
Luke Parker
5778f64f3d fix(browser): revoke the attach grant a subagent inherits from its parent
A child session copies its parent's permissions, so a subagent spawned from an
attached session got the browser:* and skill:browser allows but no attachment.
It listed the browser tools and the Browser skill, every call failed with
[browser.disconnected], and the copied allow outlived the parent's attachment.

The plugin now revokes the grant from a child session while the child's prompt
is admitted (session prompt hook), before any step of the child can list the
tools, so there is no race with its first step. It holds the attachment lock
while it checks and writes, and skips a child that has an attachment of its own.
A subagent whose agent denies the browser stays denied even when the desktop
attaches to it, through the check from the previous commit.

Refs #61238
2026-11-13 08:25:05 +10:00
Luke Parker
34490b7c7d fix(browser): let a configured browser deny win over the desktop's attach grant
Attaching a desktop browser writes browser:* and skill:browser allows into the
session's permissions. Session rules are evaluated after agent rules, so the
grant overrode a browser deny from config, an agent definition (for example a
"*" deny) or the session itself. Browser tools never called the permission
check either, so tool.use policies did not apply.

The plugin now records each agent's rules before it appends its own default
deny. A browser call is refused when those rules, plus the session's rules
without the grant, deny the browser, decided the way core's tool filter decides.
The call then runs the permission check with the operation as its resource, so
permission.evaluate hooks such as tool.use policies apply. Sessions without a
deny behave as before: the grant allows the check, so nothing prompts.

Refs #54044, #53294, #56869
2026-11-13 08:16:25 +10:00
github-actions[bot]
8aa00e805e
release: v2.2.7 (#63085)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 04:49:26 -06:00
github-actions[bot]
5f76acb125
release: v2.2.6 (#62450)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 01:36:56 -06:00
Luke Parker
8b29d45ec1
fix(browser): drive tunnel, proxy and network hop lifecycles through state machines (#61996) 2026-11-05 01:00:23 -06:00
Luke Parker
dd39237ddf
fix(plugin-browser): drive browser attachments through one state machine (#61985) 2026-11-05 00:56:59 -06:00
Aiden Cline
69269e4ebe
feat(core): support in-memory skill:// URIs (#60921) 2026-11-01 01:07:13 -05:00
github-actions[bot]
4878a0e30f
release: v2.2.5 (#60744)
Brings the versions and changelog of the published v2.2.5 release back to dev.
2026-10-30 19:18:59 -04:00
github-actions[bot]
872f694b05
release: v2.2.4 (#60664)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-30 13:06:06 -04:00
github-actions[bot]
b44b7164ba
release: v2.2.3 (#60564)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-30 20:19:43 +10:00
github-actions[bot]
4efad23dd8
release: v2.2.2 (#60337)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-10-29 13:54:46 -05:00
github-actions[bot]
f74b1416a8
release: v2.2.1 (#60113)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
2026-10-29 10:41:32 -05:00
github-actions[bot]
86976449c4
release: v2.2.0 (#59558)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-27 19:13:14 +10:00
Luke Parker
dae4077a96
feat(plugin): add OpenCode Desktop GUI plugins (#55246) 2026-10-27 10:54:50 +10:00
Dax
6996bbcd6d
ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -04:00
Aiden Cline
1434464f7e
feat(plugin): filter event subscriptions by type (#58864) 2026-10-26 10:47:48 -05:00
Luke Parker
4b83402a29 chore: merge dev into beta 2026-10-26 08:34:06 +10:00
opencode
2a3e7c0f34 sync release versions for v2.1.4 [skip ci] 2026-10-23 10:15:01 +00:00
Luke Parker
bcd713e2b7 chore: merge dev into beta 2026-10-23 09:41:06 +10:00
Luke Parker
84578e123f
chore: use bun check for local typechecks and TypeScript 7.1 in CI (#58253) 2026-10-23 09:23:31 +10:00
opencode
e965774fa0 sync release versions for v2.1.3 [skip ci] 2026-10-22 12:45:36 +00:00
Luke Parker
316a688fe9 chore: merge dev into beta 2026-10-22 08:46:18 +10:00
opencode
4b50f5cc6c sync release versions for v2.1.2 [skip ci] 2026-10-21 03:41:13 +00:00
opencode
133b1ebfaf sync release versions for v2.1.1 [skip ci] 2026-10-20 13:36:20 +00:00
opencode
d30e990c69 sync release versions for v2.1.0 [skip ci] 2026-10-20 07:17:22 +00:00
Dax Raad
15d4afd089 Merge remote-tracking branch 'origin/dev' into beta
# Conflicts:
#	packages/app/src/session/composer/location-missing.tsx
2026-10-18 16:03:51 -04:00
opencode-agent[bot]
23359e9fe6
chore: upgrade typecheck to TypeScript 7.0.2 (#56300)
Co-authored-by: kitlangton <7587245+kitlangton@users.noreply.github.com>
2026-10-17 13:26:46 -07:00
opencode
4e95dacd81 sync release versions for v2.0.32 [skip ci] 2026-10-16 22:17:00 +00:00
thdxr
3a58a0c9cf Merge branch 'dev' into beta
# Conflicts:
#	.github/workflows/publish.yml
2026-10-16 13:55:22 +00:00
opencode
83c5abbbe3 sync release versions for v2.0.31 [skip ci] 2026-10-16 12:37:41 +00:00
Luke Parker
f2323623c4
feat(app): add generative UI to the GUI (#54747) 2026-10-16 11:41:43 +10:00
opencode
f40dc433cb sync release versions for v2.0.30 [skip ci] 2026-10-15 19:48:32 +00:00
opencode
34d8ded0c5 sync release versions for v2.0.29 [skip ci] 2026-10-14 09:03:25 +00:00
opencode
c5aabae288 sync release versions for v2.0.28 [skip ci] 2026-10-13 08:17:45 +00:00
opencode
03cb9b9946 sync release versions for v2.0.27 [skip ci] 2026-10-12 04:17:06 +00:00
Kit Langton
1aae67e853
chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
opencode
8059cdcbdf sync release versions for v2.0.26 [skip ci] 2026-10-08 19:45:51 +00:00
opencode
62e087ff7b sync release versions for v2.0.25 [skip ci] 2026-10-08 09:16:16 +00:00
opencode
bd55d4895f sync release versions for v2.0.24 [skip ci] 2026-10-06 03:04:19 +00:00
opencode
9e96aacd64 sync release versions for v2.0.23 2026-10-05 05:24:44 +00:00
Kit Langton
680bca3183
chore: enable noUnusedLocals in already-clean packages (#52849) 2026-10-02 15:23:50 -07:00
opencode
d259ae7163 sync release versions for v2.0.22 2026-10-02 04:23:05 +00:00
Luke Parker
f406d93a66
refactor(app): move GUI features into built-in extensions (#52369) 2026-10-01 15:17:55 +10:00
opencode
dd2af0e5fc sync release versions for v2.0.21 2026-09-30 23:02:16 +00:00
James Long
82bb5ff88a
fix(browser): hide browser tools unless a desktop is attached (#52309) 2026-09-30 11:42:23 -04:00
Luke Parker
01efd22b2a
feat(desktop): comment on page elements from the in-app browser (#52217) 2026-09-30 16:52:42 +10:00
opencode
8d8a7bc844 sync release versions for v2.0.20 2026-09-29 21:08:02 +00:00
opencode
f02c30eb55 sync release versions for v2.0.19 2026-09-29 04:31:02 +00:00
opencode
39021dfd67 sync release versions for v2.0.18 2026-09-25 23:57:39 +00:00