feat(acp): permission persistence and MCP transport parity#819
Merged
Conversation
AllowAlways/RejectAlways decisions are now saved to ~/.config/zeph/acp-permissions.toml (configurable via acp.permission_file or ZEPH_ACP_PERMISSION_FILE env var) and restored on startup, eliminating redundant IDE permission prompts. - Atomic write via temp file + rename with 0o600 permissions on Unix - PID-unique temp filename to prevent multi-instance collisions - NUL separator for session/tool cache keys (supports tool names with colons) - 1 MiB file size guard before TOML parsing - Graceful fallback on missing or corrupt files
- corrupt TOML graceful fallback - empty file returns empty cache - oversized file (>1 MiB) returns empty cache - unknown decision string skipped with valid entries preserved
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
Implements Epic #786 — Permission Persistence and MCP Transport Parity.
~/.config/zeph/acp-permissions.tomland restored on startup, eliminating redundant IDE permission prompts across restartsPermission persistence details
acp.permission_fileorZEPH_ACP_PERMISSION_FILEenv varFiles changed
crates/zeph-acp/src/permission.rs— load/save logic, atomic write, security hardeningcrates/zeph-acp/src/agent.rs— thread permission_file through agentcrates/zeph-acp/src/transport.rs— permission_file in AcpServerConfigcrates/zeph-core/src/config/types.rs— permission_file field in AcpConfigcrates/zeph-core/src/config/env.rs— ZEPH_ACP_PERMISSION_FILE env overridesrc/main.rs— wire permission_file through AgentDepsTest plan
Closes #786