Skip to content

feat(acp): add additional_directories, auth_methods, message_ids config + CLI + TUI#3277

Merged
bug-ops merged 6 commits intomainfrom
acp-config-cli-tui
Apr 22, 2026
Merged

feat(acp): add additional_directories, auth_methods, message_ids config + CLI + TUI#3277
bug-ops merged 6 commits intomainfrom
acp-config-cli-tui

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 22, 2026

Closes #3270

Part of epic #3265 (ACP 0.11 migration), PR 4 of 5.

Summary

  • AcpConfig gains 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 request
    • auth_methods: Vec<AcpAuthMethod> (unstable-auth-methods) — methods advertised in initialize response; [] is a hard startup error
    • message_ids_enabled: bool (unstable-message-id) — echoes PromptRequest.message_id on PromptResponse and every message chunk
  • AdditionalDir is a newtype over PathBuf that rejects .. traversal and system paths (/proc, ~/.ssh, etc.) using component-aware Path::starts_with
  • AcpAuthMethod uses deny_unknown_fields — unknown variants fail deserialization instead of silently ignoring
  • CLI: --acp-additional-dir, --acp-auth-method, --acp-message-ids / --no-acp-message-ids; invalid entries exit non-zero
  • TUI: /acp dirs, /acp auth-methods, /acp status read-only slash commands
  • --init wizard and --migrate-config migration step for all three fields
  • config/default.toml updated with defaults and inline documentation
  • Spec specs/013-acp/spec.md updated with three new invariants

Test plan

  • cargo nextest run -p zeph-configAdditionalDir unit 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-acpauth_methods = [] startup error path
  • cargo nextest run --workspace --lib --bins — full suite (8242 tests)
  • CLI smoke: zeph --acp-additional-dir /tmp --acp-auth-method agent starts without error
  • CLI error: zeph --acp-additional-dir /etc/passwd exits non-zero
  • TUI: /acp status shows correct config values

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate config Configuration file changes enhancement New feature or request size/XL Extra large PR (500+ lines) labels Apr 22, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 22, 2026 19:32
…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
@bug-ops bug-ops force-pushed the acp-config-cli-tui branch from b77f75c to 512fce1 Compare April 22, 2026 19:34
@bug-ops bug-ops merged commit 61054a2 into main Apr 22, 2026
32 checks passed
@bug-ops bug-ops deleted the acp-config-cli-tui branch April 22, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration file changes core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(acp): add additional_directories, auth_methods, message_ids config + CLI + TUI + migration

1 participant