Commit graph

1261 commits

Author SHA1 Message Date
Luke Parker
43a5b7f629 fix(app): only a built-in's prompt gate is asked, for one second at most
The registry is in the workspace-only SDK, but a registry is its id, so a plugin bundle could add a gate under it, hold every prompt and command and learn the session of each. The host now asks the gates of plugins that ship with the app and no other. The cap drops from two seconds to one: a gate that misses it costs the model one step without what the gate prepared.
2026-11-18 14:50:27 +10:00
Luke Parker
48de7615e0 Merge remote-tracking branch 'origin/dev' into persisted-browser
core/src/tool.ts: dev renamed Code Mode's location switch to full host globals (Bun.file, Bun.write, Bun.Glob, #64518); the catalog cache stays keyed by visible tool names, now with that switch. session-ui markdown.tsx: dev's wrap default and our app-link flag both reach updateBlock.
2026-11-18 13:05:19 +10:00
Luke Parker
62df07625a feat(app): a built-in can prepare a session before its prompt is sent
BuiltinPromptGate: the host waits for every gate, for at most two seconds, after the server created the session and before the prompt or command request goes out. The prompt already shows meanwhile.
2026-11-18 11:57:29 +10:00
Luke Parker
363217b2c4
feat(app): wrap long lines in timeline code blocks (#64545) 2026-11-17 19:56:02 -06:00
Luke Parker
4a14d03164 Merge remote-tracking branch 'origin/dev' into persisted-browser
Conflicts with dev's device toolbar (#63819), text file tabs (#64463), the new icon set (#64466) and the Code Mode split (#64487, #64510):
- chromium.ts: dev's viewport writer, device emulation and per-page reports, with our retry-only detail; pointer commands run in the writer's queue inside our refusal and passkey wrapper; captures share the queue, and a fixed viewport is captured through the device's CDP clip while Auto keeps the fresh-redraw path.
- panel.tsx: dev's device toolbar, preview frame and spotlight, with our extensions menu, options menu (data-browser-popup), prompt-aware native view, error pages and two-view site popover; our page area box is declared again.
- embeds.tsx: our measure and place split and layout spine observers, with dev's scrollport clip in the shown test, the cover rect and the layout key.
- model.ts, pane.ts, ipc users, keys.ts (find previous stays claimed), i18n, fixtures and tests keep both sides.
- artifact-view.tsx: dev's fixed modes; desktop HTML stays source only.
- codemode: a removed tool's sentence is returned as dev's unknown-tool failure; core tool.ts keys the catalog cache by visible names and whether Node's path is on.
- icons: dev's set, our puzzle icon.
2026-11-18 10:50:48 +10:00
James Long
30654dae6c
feat(core): background slow Code Mode scripts behind full_codemode (#64343) 2026-11-17 11:12:13 -05:00
usrnk1
1cb0633c8b
feat(desktop): browser toolbar with mobile and custom viewport sizes (#63819) 2026-11-17 13:54:12 +00:00
Luke Parker
36a2cddc74 feat(browser): mark browser extensions with a puzzle piece
Adds a puzzle glyph to the icon catalog (16 px grid, 1 px stroke, round joins, like its neighbours) and uses it for browser extensions only: the pane's Extensions button and the fallback of an extension without its own icon in the toolbar menu, Settings > Browser and the Add an extension dialog. OpenCode's own extensions keep their icon.
2026-11-17 15:19:21 +10:00
Luke Parker
0ac3895640 Merge remote-tracking branch 'origin/persisted-browser' into browser-pane-open 2026-11-17 11:10:04 +10:00
Luke Parker
7d694a440c Merge remote-tracking branch 'origin/persisted-browser' into browser-pane-links 2026-11-17 11:08:49 +10:00
Luke Parker
aeff43c354 Merge remote-tracking branch 'origin/persisted-browser' into browser-pane-open 2026-11-17 11:08:48 +10:00
Luke Parker
46830d87e5 Merge remote-tracking branch 'origin/persisted-browser' into browser-pane-links 2026-11-17 11:08:39 +10:00
Luke Parker
234f53250c Merge remote-tracking branch 'origin/dev' into persisted-browser
Conflicts: protocol experimental group and server handlers keep dev's blob endpoint and our preview read; fs.ts takes dev's ByteRange, which preview.ts now uses; permission.ts keeps our Permission.rules evaluation and gains dev's nested call rows; client and OpenAPI output regenerated.
2026-11-17 11:07:11 +10:00
Luke Parker
6a53757a06 Merge remote-tracking branch 'origin/persisted-browser' into browser-pane-open 2026-11-17 11:06:21 +10:00
Luke Parker
21d4d39373 feat(app): measure whether the session row fits a side pane 2026-11-17 09:35:36 +10:00
Luke Parker
ebc369e89a fix(plugin): resume owned tab handles and preserve stable open 2026-11-17 09:17:20 +10:00
Aiden Cline
9f807c7777
feat(server): async video generation API with disk-backed media (#64140)
Some checks failed
check-nix / nix-eval (push) Waiting to run
check / typecheck (push) Waiting to run
deploy-files / files-build (push) Waiting to run
deploy-files / files-deploy (push) Blocked by required conditions
deploy-site / site-build (push) Waiting to run
deploy-site / site-deploy (push) Blocked by required conditions
deploy / legacy-build (push) Waiting to run
deploy / legacy-deploy (push) Blocked by required conditions
deploy / data-build (push) Waiting to run
deploy / data-deploy (push) Blocked by required conditions
Process daemon / Miri (callback ownership) (push) Has been cancelled
Process daemon / Core (blacksmith-6vcpu-macos-15) (push) Has been cancelled
Process daemon / Core (ubuntu-22.04) (push) Has been cancelled
Process daemon / Windows (arm64) (push) Has been cancelled
Process daemon / Windows (x64) (push) Has been cancelled
2026-11-16 17:14:18 -06:00
Luke Parker
37c13ed3fb fix(plugin): revoke tab close rights when navigation takes over 2026-11-17 09:08:55 +10:00
Luke Parker
afc0afdace fix(plugin): require the owning session on screen to open a tab 2026-11-17 09:07:31 +10:00
Luke Parker
83eeecbe1d fix(core): keep each experimental.rules hook's denies out of other hooks' reach
Confirmation review, low finding. All hooks shared one event.deny
array, so a later hook could drop an earlier hook's denies, for
example with event.deny.length = 0, or replace the array.

Now event.deny is a function that appends to a list owned by core.
The event object is frozen, so a hook cannot swap deny, rules or
session. No hook can read, clear or reorder the list. Core decodes the
list as before, and a malformed entry still fails closed with a
message that names the hook. Denies still apply in the order the
hooks add them.

Tests: a later hook that tries to replace deny fails to and cannot
undo the earlier deny. The first test now checks that swapping rules
and session fails.
2026-11-17 09:06:56 +10:00
Luke Parker
391d5d369c fix(core): make the experimental.rules hook deny-only
Review finding M1. An experimental.rules hook could rewrite the whole
ruleset, so one appended allow outranked every configured deny for
calls and listing. Agents and sessions showed nothing. The rule
objects were also the agent state's own, so an edit in place changed
the agent for every session.

The new shape is { sessionID, agent, rules, session, deny }.
- rules (agent then session) and session are fresh copies of each
  rule. Core ignores them after the hooks run.
- Core reads only event.deny and decodes it with
  Schema.Array(Struct({ action: String, resource: String })). Other
  fields of an entry, such as effect, are dropped, so each entry is a
  deny.
- Core returns [...agent, ...session, ...denies], in the order the
  hooks pushed them. Nothing a hook writes can allow, remove or
  reorder a rule.

Before this, a configured deny was final: evaluateInput returned deny
before any hook ran. That holds again. A hook can only add denies,
and they are checked in the same place.

A deny entry that is not two strings dies with 'A permission
"experimental.rules" hook added an invalid deny: ...'. The request
or step fails closed instead of running without the hook's denies.

L2: the TSDoc says that the hook runs for every permission check and
every step, must be quick, and must not request permissions itself.
A request would run the hook again without end. The evaluate hook
next to it has no re-entrancy guard, so this hook documents the
constraint in the same way.

Tests (permission.test.ts):
- A hook pushes an allow, edits rules in place, changes the arrays
  and adds an entry with effect "allow". None of this reaches the
  rules or the agent state, and configured denies and asks still
  decide.
- Two hooks' denies are appended in order.
- A hook's deny refuses a request before any evaluate hook runs.
- A malformed entry fails closed and names the hook.
2026-11-17 08:51:27 +10:00
Luke Parker
e2374d81a0 feat(plugin): bind experimental browser tab handles to their opener 2026-11-17 08:41:02 +10:00
Luke Parker
66c4ba9c2e fix(browser): use the session policy and document link boundaries 2026-11-17 08:37:55 +10:00
Luke Parker
085dee256b fix(core): list tools and evaluate calls from one ruleset
Before, a step listed tools, skills and MCP servers from
merge(agent, session) built in SessionContext.select, while calls were
evaluated from the same merge built separately in Permission. A plugin
that changed how calls were decided (the browser plugin's evaluate
hook) could not change what was listed, so the two disagreed.

Now Permission.rules(hooks, { session, agent }) is the only place that
builds the ruleset. Permission's evaluation (assert, ask,
assertNotDenied, allows), SessionContext.select (tool snapshot, Code
Mode catalog and search, skill and MCP instructions) and scheduled
code checks all use it.

Permission.rules triggers a new experimental plugin hook,
permission "experimental.rules". The hook gets the session ID, the
agent ID, the session's own rules (read-only), and the merged rules
(agent, then session). The hook can append rules, which are evaluated
last. Core does not restrict what a hook writes. Hooks are trusted in
the same way as permission.evaluate hooks, which can already set any
effect. With no hook registered, the result is the same as the old
merge.

Agent resolution changes from agents.resolve to agents.select. This
gives the same agent info, and the hook gets an agent ID even when the
default agent is used. An agent that cannot be resolved still gets
the deny-all rule.

The tool-hiding predicate (the last rule matching the action is a deny
on "*") moves to @opencode/schema/permission as deniesAll. Plugins can
then apply the same predicate as Tool.snapshot. Tool.snapshot and
Tool.check use it with the same matching as before (case-insensitive
on Windows).
2026-11-17 08:12:24 +10:00
Luke Parker
bf5e64b241 fix(desktop): review chat application links through the browser pane 2026-11-17 08:05:31 +10:00
Luke Parker
387269d2b6 docs(plugin): clarify which file URLs Browser.open can preview 2026-11-17 08:05:30 +10:00
Luke Parker
1437faca4e Merge branch 'browser-sec-agent' (1fd0956128) into persisted-browser 2026-11-16 15:53:53 +10:00
Luke Parker
f619f44a47 fix(desktop): keep terminal file targets inside the app 2026-11-16 15:39:29 +10:00
Luke Parker
56e47a98f3 fix(browser): scope saved approvals without changing operation policy matching 2026-11-16 15:15:45 +10:00
Luke Parker
04b955c0d4 refactor(browser): share preview path checks and drop stale file URL helper 2026-11-16 14:07:30 +10:00
Luke Parker
1fde97ed44 Merge remote-tracking branch 'origin/dev' into persisted-browser 2026-11-16 11:26:55 +10:00
github-actions[bot]
a554d70499
release: v2.3.0 (#63719)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-13 09:04:03 +00:00
Aiden Cline
b81c5f3465
feat(plugin): export Tool from the effect entrypoint (#63698) 2026-11-13 00:48:01 -06:00
Luke Parker
74f01dda8f Merge remote-tracking branch 'origin/dev' into persisted-browser 2026-11-13 14:18:48 +10:00
Luke Parker
d50410cefb fix(core): keep a permission hook's ask when a saved approval matches
A saved 'always' approval used to answer an ask raised by any permission.evaluate hook, for every tool, and dropped the hook's message. Core no longer overrides a hook's ask. Hooks get a read-only experimental.approved instead, true when saved approvals allow every resource; the browser hook uses it to stop asking for a configured browser ask the user already approved always.
2026-11-13 13:16:34 +10:00
Aiden Cline
2f886a2a5e
fix(core): pass stored message metadata to session request hooks (#63590) 2026-11-12 19:00:57 -06:00
Filip
ec263d62b6
fix(core): keep plugin swaps going when a cleanup fails (#63548)
Co-authored-by: Filip Hejmowski <fhejmowski@simplito.com>
2026-11-12 16:15:41 +01:00
opencode-agent[bot]
b268a4e8b0
feat(session-ui): maximize Mermaid diagrams to zoom and pan them (#59250) 2026-11-12 15:02:33 +00:00
James Long
ffcaeec36c
refactor(app): remove leftover foreground subagent UI (#63391) 2026-11-11 15:53:31 -06:00
Filip
2ef38b2172
fix(app): accept a pasted redirect URL for provider sign-in (#63315)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-11-11 15:51:46 +01:00
Sebastian
e56eff2bc0
feat(core): tell agents when they are in a fork (#63235)
Co-authored-by: OpenCode Agent <opencode-agent[bot]@users.noreply.github.com>
2026-11-11 08:41:50 +01:00
Dax Raad
36f559b0c6 chore: move the data site off sst
the stats site, its og worker and the sync workflow deploy from services/data with cf as
opencode-data-<stage>, opencode-data-og-<stage> and opencode-data-sync-<stage>. the beta
web app and the whole sst setup (sst.config.ts, infra/, sst-env.d.ts, the sst dependency)
are gone, so nothing deploys through sst anymore (security finding #920).
2026-11-10 22:46:25 -05:00
Simon Klee
c4bf172532
v0.8.4 (#63055) 2026-11-10 23:21:50 +00:00
Aiden Cline
53f2d631df
feat(core): use freeform tool input on models that support it (#61703) 2026-11-10 15:15:25 -06:00
James Long
64bd35afa9
feat(plugin): let promise tools stop cooperatively through their signal (#63127) 2026-11-10 16:13:11 -05:00
James Long
05d347d750
fix(core): keep a shell command's output when the user interrupts its call (#62977) 2026-11-10 20:28:23 +00: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
Aiden Cline
b88b867b6e
refactor(plugin): edit the model in place in experimental.model.resolve (#63015) 2026-11-09 20:58:26 -06:00
Aiden Cline
37729b1df1
feat(core): add GitHub Copilot Auto and a model resolve hook (#62997) 2026-11-09 20:46:05 -06:00