Replies: 2 comments
|
Your trace is right, and I want to push the root cause one layer deeper, because it changes what the feature request is. It is not that grants aren't remembered. It is that a grant has no path in it to remember. Reading the escalation path end to end (
The consequence for your proposal: bolting memory onto the existing grant would remember "this session may use Can a third-party plugin do this instead? No — and I checked rather than assumed. I enumerated the public services on One thing available today that may cover your actual workflow. Since the root is Interest disclosure: I maintain a third-party DSH plugin. The seam enumeration above is the reason I know there is no plugin-side answer here — I went looking for one for a related request and there is not one. We do not and cannot touch DSH's sandbox. |
|
Thanks for reading it end to end and pushing the root cause one layer deeper — the point that a grant has no path in it to remember is the key framing. I'll reframe this as a new dimension in the vocabulary (directory scoping), not a persistence feature on top of the current grant, and note that bolting memory onto it would just remember "danger-full-access," which is exactly what I wanted to avoid. The workaround (starting the session's cwd at a common parent of the workspace + those folders) is a useful practical note — I'll present it as a workaround for a layout, not a substitute for the feature. And thanks for actually enumerating the seam (no setter on |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
In the DSH web interface, writing files outside the current workspace root always prompts for approval — once per file / per request. There is no way to say "trust these 1–2 specific folders for the rest of this session, and stop asking me for every file inside them." The only options today are a global
ask(every file prompts) or a globalnever/danger-full-access(everything is allowed, including dirs you never wanted touched).This is a common workflow: a session repeatedly works with a fixed set of folders outside the workspace (e.g. another project dir, a data folder, or a network share). Users want a narrow, per-directory grant — not a whole-conversation full-access switch.
Expected behavior
Add a directory-scoped authorization so a user can:
ask→ per-file approval), so the safe boundary is preserved.This is the "allow editing this folder" pattern familiar from Claude Code / WorkBuddy, but scoped per-session.
Environment
@deepseek-ai/dshversion:0.1.1-rc.2Root cause (traced in source)
The approval grant is strictly per request and has no memory of a path/directory.
In
packages/.../dsh-user-approval:request()issues a freshApprovalRequestId(randomUUID())and appends a newapproval/askedevent every time — call IDs and events are independent, nothing is reused/keyed by path.decide()resolves the policy viaeffectivePolicy(session)(ask/never) and dispatches anapproval/requestwaterfall. The only grant value is"allowed-once"("allowed-once" is the only grant). There is no "approved directory, skip future prompts for this session" state.Sandbox is likewise single-root:
dsh-sandbox-policyresolves oneworkspaceRootper session (resolveWorkspaceRoot(session?.header.cwd ?? this.workspaceRoot));workspace-writeonly permits writing inside that one root. Outside it, writes are denied and need an escalation grant (per request). There is no additional write-whitelist / extra allowed directories list.dsh-sandboxexposeswritableRoots, which is the single workspace root (+ temp), not a user-configurable set of directories.So the model is: one workspace root = free write; everything else = per-request approval (with
allowed-once), or all-or-nothingdanger-full-access. There is no middle layer of "these N directories are trusted this session."Suggested approach
A natural fit is to extend the approval/sandbox policy to accept a per-session list of granted directories:
allowed-dir) alongsideallowed-once, recording a normalized path. On a write request, if the target path is lexically under a granted directory, resolve toallowedwithout prompting.permission/preset/sandbox/mode/approval/policy), so replay reconstructs the same trust set.This keeps the safe boundary intact (only trusted directories are auto-allowed) while removing the repeated prompts for folders a user already vouched for.
Related context
This overlaps with, but is distinct from:
AllowedPathsSet) being inconsistent with mode escalation, causing silent permission drift. That is a bug in the existing whitelist mechanism; this request is a new feature to let a user explicitly trust a directory for the session.Motivation
danger-full-accessis too broad — it disables prompts for everything, including sensitive dirs (~/.dsh,~/.claude,~/.workbuddy, network shares) the user never intended to authorize. A directory-scoped grant gives the precision of per-file approval with the convenience of a session-level trust boundary.Thank you!
All reactions