Repository navigation
feat(settings): show how agents run in this workspace, and which config decided it - #4290
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Test evidence — the-effective-permissions-summary-reports-the-engine-s-decisions-and-names-the-l — 0/0 screenshots passed · 2 assertions✅ 0/0 screenshots passed · 2 assertions · 2 expectations passed · 0 failed · 0 pending
ℹ️ ASSERTION — 1. A default install is reported as the engine's own postureEngine 1.18.18: {"shell":{"action":"allow","source":"engine","exceptions":0},"edit":{"action":"allow","source":"engine","exceptions":0},"web":{"action":"allow","source":"engine","exceptions":0},"mcp":{"action":"allow","source":"engine","exceptions":0},"outside_folders":{"action":"ask","source":"engine","exceptions":5},"env_files":{"action":"ask","source":"engine","exceptions":2},"doom_loop":{"action":"ask","source":"engine","exceptions":0}}.
ℹ️ ASSERTION — 2. Each decision is attributed to the layer that wrote the winning ruleGlobal {bash: ask + "git status *" allow, webfetch: ask} and workspace {edit: deny} → {"shell":{"action":"ask","source":"global","exceptions":1},"edit":{"action":"deny","source":"workspace","exceptions":0},"web":{"action":"ask","source":"global","exceptions":0},"mcp":{"action":"allow","source":"engine","exceptions":0},"outside_folders":{"action":"ask","source":"engine","exceptions":4},"env_files":{"action":"ask","source":"engine","exceptions":2},"doom_loop":{"action":"ask","source":"engine","exceptions":0}}.
Test run created 2026-09-01T23:59:41.924Z · Source: |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (ef4a3f70fdeb8e50351384da1c556a4bd833d5fa). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
…ig decided it Settings > Permissions gains a read-only "How agents run here" section. It asks the engine for the evaluated permission ruleset of the agent that governs new threads and summarises the decisions people care about — shell commands, file edits, web fetches, MCP tools, files outside authorized folders, .env files, repeated identical calls — as runs / asks you / blocked. Each row names the layer whose rule won: the engine's default, the user's global opencode.json, OpenWork, or this workspace's opencode.json, plus how many narrower rules (allow-lists, folder grants) sit under it. OpenWork evaluates nothing itself: the ruleset is the engine's own answer from GET /agent, read through the bounded diagnostics client, and attribution only looks up the winning rule in the three config files as written, in the engine's merge order. The section refreshes when authorized folders change.
…ed engine Boots the real engine with a user global file, OpenWork's rendered injected file, and a workspace file, then runs the server's own summary over the engine's evaluated ruleset: a default install is reported as the engine's posture with OpenWork's folder grants as exceptions, and when the global file asks for shell commands while the workspace file denies edits, each row is attributed to the layer that wrote its winning rule.
ef4a3f7 to
986ab09
Compare
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (986ab093e9983732f56457578bce38cc04289d71). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
What
Settings > Permissions gains a read-only How agents run here section: what the engine will do in this workspace before asking — shell commands, file edits, web fetches, MCP tools, files outside authorized folders,
.envfiles, repeated identical calls — shown as Runs / Asks you / Blocked, each with the config layer that decided it (engine default, your globalopencode.json, OpenWork, this workspace'sopencode.json) and the number of narrower rules under it.Why
Permissions are OpenCode's; they come from three files merged in a fixed order and evaluated last-match-wins. Today none of that is visible in OpenWork, so people cannot tell whether a prompt (or its absence) comes from an engine default, their own global file, or a workspace file. This is the understanding layer that every later control builds on, and it aligns with OpenCode by design: OpenWork evaluates nothing — the rows are the engine's own answer from
GET /agent, and attribution only looks up the winning rule in the files as written.How
GET /workspace/:id/permissions/effective(client auth, read-only) reads/config+/agentthrough the existing bounded diagnostics client, picks the governing agent (configured default, elseopenwork, elsebuild), and summarises withapps/server/src/effective-permissions.ts— a mirror of the engine's wildcard matcher andfromConfigflattening, used only to find the winning rule in each layer.EffectivePermissionsPanelrenders the rows; refreshes when authorized folders change.Proof (head
ef4a3f70f, local lane — Daytona credentials unavailable in this shell)bashask (+1 narrower allow) and workspaceeditdeny attributed to their layerspnpm evals:pr specs/effective-permissions-attribution.test.tspnpm --filter openwork-server exec bun --conditions=development test effective-permissionsbun test --isolate tests/effective-permissions-panel.test.tsxpnpm evals:pr specs/spec-impact.test.ts·pnpm --dir evals run lint:layerspnpm --filter openwork-server typecheck && pnpm --filter @openwork/app typecheckapps/server/apps/apppnpm --filter openwork-server test/pnpm --filter @openwork/app testf74c26840, same commandsnode:sqlitefailure + one flaky not seen on branch) · app 1122 / 5 identical names → pre-existingNotes
webfetch,websearch,todowrite,question,doom_loopare action-only in the engine schema; the summary probes them accordingly.opencode.json(#C).