Repository navigation
Add init-time full-permission consent, wired to every harness - #4
Merged
Merged
Conversation
The traust skills cannot run headlessly without unattended tool use: every harness gates bash and file writes behind per-call approval that an unattended run cannot answer, so scans died on the first permission request. The harness itself expects yolo mode / dangerously-skip- permissions class flags. init now asks for consent once (a wizard question explaining exactly what is granted, or --full-permission for headless installs) and records it in the workspace state. Runs resolve the effective mode from the per-run flag OR the recorded consent — the resolution lives in the runner, so the SDK Provider path honors it too — and translate it into the right switch per harness: claude --dangerously-skip-permissions, crush --yolo on the run fallback and the server's permissions/skip endpoint in session mode, codex --dangerously-bypass-approvals-and-sandbox, and pi's full builtin toolset. The mode is surfaced in the pre-run notes, the run journal and doctor, and consent survives re-inits. Without consent nothing changes: permission and question requests fail closed (exit 2) with guidance pointing at init. S9 isolation, budget bands, spend accounting and run journals apply in both modes. Verified live end to end: the previously blocked smoke run now executes its tools and completes (exit 0) with consent recorded; scoped runs still fail closed. Unit and integration tests cover both modes across the crush serve client, the runner consent resolution and the fallback argv construction. 💘 Generated with Crush Assisted-by: Crush:rits/zai-org/glm-5-3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The traust skills cannot run headlessly without unattended tool use — every harness gates bash and file writes behind per-call approval an unattended run cannot answer, so scans died on the first permission request. This PR adds init-time consent and wires it to every harness:
--full-permissionfor headless installs; recorded in the workspace state and surfaced indoctor. Consent survives re-inits.--unsafe-full-permissionflag OR recorded consent. The resolution lives in the runner, so the SDKProviderpath honors state consent too.--dangerously-skip-permissionsPOST /v1/workspaces/{id}/permissions/skip {"skip":true}(the server's yolo); run fallback:--yolo--dangerously-bypass-approvals-and-sandbox--tools(pi gates by tool declaration, not per-call approval)unsafe_full_permission, and the needs-input failure message now points attraust-cli init/ the per-run flag.Verification
READY) with consent recorded; scoped runs still fail closed naming the tool.permissions/skiponly under consent (and never in scoped mode), runner honors state consent (note + journal),--yoloand pi full-toolset argv construction.Note: consent was also recorded in the local deployment's state (
~/.traust/cli/state.json) so the next real scan works immediately.💘 Generated with Crush