feat(acp): add additional_directories, auth_methods, message_ids config + CLI + TUI#3277
Merged
feat(acp): add additional_directories, auth_methods, message_ids config + CLI + TUI#3277
Conversation
…ig + CLI + TUI - Add AcpAuthMethod, AdditionalDir(PathBuf) newtypes and three new AcpConfig fields: additional_directories, auth_methods, message_ids_enabled - AdditionalDir::parse canonicalizes and rejects .., /proc, /sys, /.ssh, /.gnupg, /.aws using component-aware Path::starts_with - validate_additional_directories allowlist helper wired into do_new_session, do_load_session, do_fork_session, do_resume_session (feature-gated) - auth_methods advertised in do_initialize response under unstable-auth-methods - message_id echoed on PromptResponse.user_message_id and streamed chunks under unstable-message-id; current_message_id written after rx.take() - auth_methods = [] is a hard startup error; CLI invalid entries exit non-zero - CLI: --acp-additional-dir (repeatable), --acp-auth-method, --acp-message-ids - TUI: read-only /acp dirs, /acp auth-methods, /acp status commands - --init wizard prompts for all three fields - Config migration: fixture + test asserting three new commented keys - Spec 013-acp updated to 0.11.x with three new invariants - Playbook and coverage-status entries added (7 Untested rows) Closes #3270 Part of epic #3265
b77f75c to
512fce1
Compare
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.
Closes #3270
Part of epic #3265 (ACP 0.11 migration), PR 4 of 5.
Summary
AcpConfiggains three new fields behind feature gates:additional_directories: Vec<AdditionalDir>(unstable-session-add-dirs) — allowlist of extra paths IDE sessions may reference; validated on every new/load/fork/resume requestauth_methods: Vec<AcpAuthMethod>(unstable-auth-methods) — methods advertised ininitializeresponse;[]is a hard startup errormessage_ids_enabled: bool(unstable-message-id) — echoesPromptRequest.message_idonPromptResponseand every message chunkAdditionalDiris a newtype overPathBufthat rejects..traversal and system paths (/proc,~/.ssh, etc.) using component-awarePath::starts_withAcpAuthMethodusesdeny_unknown_fields— unknown variants fail deserialization instead of silently ignoring--acp-additional-dir,--acp-auth-method,--acp-message-ids/--no-acp-message-ids; invalid entries exit non-zero/acp dirs,/acp auth-methods,/acp statusread-only slash commands--initwizard and--migrate-configmigration step for all three fieldsconfig/default.tomlupdated with defaults and inline documentationspecs/013-acp/spec.mdupdated with three new invariantsTest plan
cargo nextest run -p zeph-config—AdditionalDirunit tests (rejects_parent_traversal, rejects_proc, rejects_ssh_dir, accepts_valid_path)cargo nextest run -p zeph-config— migration fixture test (acp_pr4_v0_19.toml)cargo nextest run -p zeph-acp—auth_methods = []startup error pathcargo nextest run --workspace --lib --bins— full suite (8242 tests)zeph --acp-additional-dir /tmp --acp-auth-method agentstarts without errorzeph --acp-additional-dir /etc/passwdexits non-zero/acp statusshows correct config values