shared bwrap sandbox, skip for super admin, extend to pi and terminals

- extract buildSandboxPrefix/buildRunuserSuffix into shared sandbox.ts
- super admin bypasses bwrap for full host access (claude, pi, terminal)
- member pi processes now use bwrap instead of sudo -u
- member terminals now use bwrap instead of sudo -u
- mount /run for systemd-resolved DNS inside sandbox
- pass role through claude spawn params and channel types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 00:06:44 +00:00
co-authored by Claude Opus 4.6
parent c38d5b0ea1
commit 9578110e8b
9 changed files with 386 additions and 180 deletions
+2 -1
View File
@@ -79,6 +79,7 @@ export type ClaudeSpawnParams = {
prompt: string;
sessionKey: string;
model?: string;
role?: string;
};
export type ClaudeSpawnStreamingParams = {
@@ -89,6 +90,7 @@ export type ClaudeSpawnStreamingParams = {
sessionKey: string;
cwd?: string;
model?: string;
role?: string;
};
export type ClaudeCodeResult = {
@@ -134,7 +136,6 @@ export type PtyInitConfig = {
cwd?: string;
homeDir?: string;
userLabel?: string;
username?: string;
host?: boolean;
cols?: number;
rows?: number;