Skip to content

feat(paw-compute): computer attach access + governed Exec surface - #462

Draft
nerdsane wants to merge 6 commits into
mainfrom
claude/paw-compute-access
Draft

feat(paw-compute): computer attach access + governed Exec surface#462
nerdsane wants to merge 6 commits into
mainfrom
claude/paw-compute-access

Conversation

@nerdsane

Copy link
Copy Markdown
Owner

Part of the Datadog Computer usecase (3p harness walk).

ADR-0001 — attach access. The shipped Cedar policy had no entity ops on Computer at all: every create/read/list 403'd (and reads deny without raising decisions), so the registry was unreachable. Permit create/read/list for authenticated tenant principals, matching the existing Configure/Provision scope. Bind (attach audit trail) considered and deferred.

ADR-0002 — governed Exec surface. New Exec entity (Created → Running → Succeeded|Failed) whose Run action fires the new computer_exec WASM module: resolves the Computer row by id via loopback, requires Ready + sandbox_url, executes via wasm_helpers::sandbox (tensorlake/modal), reports back RunSucceeded(exit_code, stdout_tail, stderr_tail) / RunFailed(error). Output tails truncated UTF-8-safe at 8KB. Cedar: Exec create/read/list/Run for principal is Agent; callbacks admin-only; http_call/access_secret scoped to context.module == "computer_exec".

Tests: 11 unit tests on the module's pure logic (SandboxHandle construction from a Computer row, Ready gate, output truncation, callback params) — all pass. cargo build --target wasm32-unknown-unknown --release clean (262KB artifact, gitignored).

Verification plan (before merge): publish to Genesis, hot-install into openpaw-production, live-test the walk: operator/Agent creates Exec → Run on Computer dsf → Succeeded with real exit code and output; failure path with bogus computer id → Failed. Evidence lands in .proofs/.

🤖 Generated with Claude Code

rita-aga and others added 6 commits August 23, 2026 11:06
Open Computer create/read/list to authenticated tenant principals so
harnesses can attach the existing computer by name (ADR-0001), and add
the Exec entity + computer_exec WASM integration so third-party harnesses
run commands on a Computer's sandbox as Cedar-gated, audited entity rows
instead of raw provider CLI access (ADR-0002).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…uthenticated

The deployed principal model carries no 'authenticated' attribute and Cedar
denies on missing attributes, so the conditioned entity-op permits never
matched. Use the shapes the dsf tool policies use: unconditional tenant-scoped
read/list, Agent-only create.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…del across all Computer/Exec permits

Lifecycle actions move to 'principal is Agent'; callbacks to
agent_type == "system" or Admin; action ids listed in namespaced and
bare forms until live dispatch pins the engine's naming.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Captures the bridge deployed on computer dsf as a reproducible,
idempotent script (systemd unit, VncAuth-gated, page removable via
port rm), so browser access to a computer's desktop is source-controlled
rather than hand-applied sandbox state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LatencyDiag was submitted at runtime and lived only in the deployed
tenant. Make it a first-class repo artifact so it can be published to
Genesis: the LatencyDiag automaton (Idle/Scanning/Ready/Failed, RunScan
fires the computer_exec trigger with a canned read-only Datadog p95
query), its EntityType + EntitySet in the app model, Cedar permits
mirroring the Exec pattern, and an APP.md section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZkYwk1gmU6GPKRuQsSLda
Large command output was lost to the 8 KB stdout tail. computer_exec now
wraps each command so its full combined output is persisted to
~/.exec-out/<exec_id>.log on the computer while the row still carries a
tail (raised 8 KB -> 256 KB). The wrapper reports the log's byte count
and path, parsed back into two new RunSucceeded result fields —
stdout_path and stdout_bytes — so an agent can grep/sed/page output
larger than the tail via follow-up Execs. exit $__rc preserves the
user command's exit code through the wrapper. The exec id is sanitized
into the filename so it cannot escape the log directory.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZkYwk1gmU6GPKRuQsSLda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants