Repository navigation
feat(permissions): always allow in this workspace, written to the workspace's opencode.json - #4292
reachjalil wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Test evidence — a-rule-saved-into-the-workspace-s-opencode-json-is-read-by-the-engine-as-the-las — 0/0 screenshots passed · 2 assertions✅ 0/0 screenshots passed · 2 assertions · 2 expectations passed · 0 failed · 0 pending
ℹ️ ASSERTION — 1. An allow rule saved from a prompt is enforced by the engine for exactly that pattern and attributed to the workspace filebash "git status --porcelain" ask → allow (source workspace); "git push" and "rm -rf" still ask; the file's comment survived.
ℹ️ ASSERTION — 2. Removing the saved rule restores the previous decisionbash "git status --porcelain" is back to ask after the entry was removed from opencode.json.
Test run created 2026-09-02T00:13:12.893Z · Source: |
ef4a3f7 to
986ab09
Compare
6b79bcc to
616e905
Compare
|
@OmarMcAdam Please review persistent workspace permission writes, host approval and revocation semantics, plus the stack base before merging. #4293 also contains an explicit permission-policy decision requiring review. Holding for your review under the current merge instructions. |
…kspace's opencode.json The approval prompt gains "Always allow in this workspace" beside "Allow for session". It replies "always" to the engine exactly as before and also writes the engine's own suggested patterns as allow entries under that permission in the workspace's opencode.json — the layer the engine reads last, visible in the repository, and exactly what an OpenCode user would write by hand. Settings > Permissions lists the permission rules of that file with a remove button per entry, so anything saved from a prompt (or written by hand) can be seen and revoked in the same place. Edits preserve the file's comments and formatting; string shorthand is expanded rather than overwritten; a removed entry that empties its permission object removes the object too. Routes: GET/POST/DELETE /workspace/:id/permissions/rules (client auth; writes require collaborator scope, host approval as config.write, and are audited; a real change records a config reload event). OpenWork stores nothing of its own for these rules.
- File edits: comments survive, string shorthand expands, duplicates are not written twice, removals drop emptied objects; routes list/add/remove for collaborators and refuse viewer writes, recording a config reload event. - Real engine (workspace-permission-rules-engine): an allow entry written for the engine's suggested pattern flips exactly that command from ask to allow and is attributed to the workspace file; other commands still ask; removing the entry restores ask. - UI: the prompt offers the workspace-wide reply after the session one and disables it when the file cannot be edited; the Settings list explains itself and shows nothing before the server answers.
616e905 to
508b925
Compare
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (508b9255cf21c3fbd2262083bd21cf49501a9b9f). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Deploying openwork with
|
| Latest commit: |
3d98392
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6ee63337.openwork.pages.dev |
| Branch Preview URL: | https://workspace-permission-rules.openwork.pages.dev |
|
Deployment failed for project openwork-diagnostics with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
|
Deployment failed for project openwork-app with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
|
Deployment failed for project openwork-den with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
|
Deployment failed for project openwork-landing with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (3d98392872905654c831d369452a89c54b1a2832). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Summary
The approval prompt can save “Always allow in this workspace” rules to that workspace's
opencode.json. Settings lists the saved rules and lets the user remove them. Rules use the engine's suggested patterns and preserve the file's comments and existing entries.The effective-permissions parent #4290 has already merged. This PR now targets current
devdirectly; #4293 remains its dependent run-mode change. The existing effective-permissions summary stays in Advanced, while the new rule editor appears in Permissions.Verification
Verdict: Incomplete. Refreshed head:
508b9255c.An initial local engine check failed because the installed engine was 1.18.15; rerunning with the repository-pinned 1.18.18 passed. Current upstream CI and Warden must complete on the refreshed head before merging.