opencode/packages
Ryan Vogel 3bfe475327 fix(core): check TUI write_terminal against shell permission rules
The experimental TUI tools (client MCP) give the model a tui_write_terminal
tool that types text into the user's live terminal, which runs commands when
the text ends in a newline. It was only checked as action
tui_write_terminal, which the base '* allow' policy permits, so shell ask and
deny rules (and Console policies that block shell) never applied: a
prompt-injected model could run commands in the user's interactive shell with
no prompt.

The MCP tool wrapper now also asserts the shell permission for
tui_write_terminal, with the typed text (trimmed) as the resource and save
pattern, the same shape the shell tool uses for its commands. The existing
tui_write_terminal assertion stays, so rules written against it keep working.
The experiment description now says the agent can type commands into
terminals.

Verified: new mcp-attach case proves shell '*' deny blocks the call before it
reaches the client, a 'rm *' deny blocks rm while shell '*' allow lets ls
through; it fails with the shell assertion removed and with the resource
replaced by '*'. bun typecheck (core, tui), core mcp-attach/mcp/permission
tests, server client-mcp tests and bun run check pass.
2026-10-26 14:39:03 -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 ci: separate release builds from signing and publishing (#59046) 2026-10-26 14:21:29 -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): check TUI write_terminal against shell permission rules 2026-10-26 14:39:03 -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(core): check TUI write_terminal against shell permission rules 2026-10-26 14:39:03 -04: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