Repository navigation
Trust home and the launch directory without a project-trust prompt - #951
Merged
Merged
Conversation
First GUI launch usually opens in $HOME, and maple acp uses the process cwd. Treat those as trusted when no decision is saved so the one-time prompt cannot race with runtime start. Selecting any other folder still asks once. An explicit untrust is kept.
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
Maple Agent no longer prompts to trust the folder a first-time user actually starts in. Home and the process launch directory are trusted when no decision is saved. Selecting any other project still gets the existing one-time prompt.
This also drops the old silent auto-trust of every newly selected folder. That write raced with the UI prompt and still asked anyway.
An explicit Untrust remains saved, including for home.
Why this is the right layer
Project trust is resolved in
project_trust_status, which the GUI prompt, ACP elicitation, and skill loading all read. Treating home and cwd as trusted there is race-free: the UI no longer depends on runtime start persisting an answer after bootstrap already asked.Choosing a folder in the sidebar is not treated as consent. Only the directory the process was launched from (and home, which is the usual GUI default) skip the prompt. The filesystem root is never implicit, because a Dock-launched GUI often has cwd
/.Tests
cargo test --locked -p maple-agent --lib project_trust_cargo clippy -p maple-agent --all-targets --locked -- -D warnings