1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
// SPDX-License-Identifier: MIT OR Apache-2.0
//! Configuration types for the `zeph://` deep-link scheme (spec-066).
//!
//! This module provides [`DeepLinkConfig`] for the `[deep_link]` config section and the
//! [`AcpPreference`] enum for controlling ACP attach behaviour. All types use explicit
//! `Default` impls where needed to preserve secure defaults that differ from Rust's
//! type-level defaults (e.g., `bool::default()` is `false`, but `confirm_before_prompt`
//! must default to `true`).
use PathBuf;
use ;
/// Configuration for the `[deep_link]` section.
///
/// Controls security gates, path allowlists, and ACP attach preferences for sessions
/// initiated via `zeph://` URIs. Gated by the `deep-link` Cargo feature.
///
/// All fields have `#[serde(default)]` so existing configs without `[deep_link]` parse
/// cleanly with secure defaults.
///
/// # Examples
///
/// ```
/// use zeph_config::deep_link::DeepLinkConfig;
///
/// let cfg = DeepLinkConfig::default();
/// assert!(cfg.confirm_before_prompt, "default must require confirmation");
/// assert!(cfg.allowed_cwd_roots.is_empty());
/// ```
/// ACP server attach preference for deep-link-initiated sessions.
///
/// `Never` is the only supported mode in v1. `Auto` and `Always` are parsed and accepted
/// by the config but treated identically to `Never` until the v2 ACP discovery mechanism
/// is implemented (see spec-066 ยง13 for the v2 design sketch).
///
/// # Examples
///
/// ```
/// use zeph_config::deep_link::AcpPreference;
///
/// let pref = AcpPreference::default();
/// assert!(matches!(pref, AcpPreference::Never));
/// ```