repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

feat(auth): smith auth store, add, list, remove, check

259e77d21a77c62b0d4bc3438c7680b4aa571955

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (10)

+501 / −18 text lines

Diff layout

.system/plans/SMH-PLAN-VOETK_DD-auth-store-and-provider-selection/index.md

Modified

+14 / −15 text lines

33type: plan
44title: "Auth Store and Provider Selection"
55spec: SMH-SPEC-SPEC0001
6status: draft
6status: approved
77depends_on: [SMH-PLAN-AIAG0001]
88---
1212## Outcome
14Credentials resolve deterministically from explicit flags, the Smith auth store, or environment variables.
14Credentials resolve deterministically from the Smith auth store or environment variables.
1515Eval and RPC run against any supported vendor with no implicit provider default.
1616Unresolved credentials fail before dispatch with every source tried named.
2020Auth data persistence, `smith auth` commands, provider and model selection flags, the shared flag surface, and removal of hard-coded OpenAI defaults.
2121Provider plugins, catalogs, aliases, KDL configuration files, and credential refresh beyond existing behavior remain out of scope.
22Requires the SMH-SPEC-SPEC0001 configuration-precedence amendment adding the environment layer.
22Builds on the SMH-SPEC-SPEC0001 environment configuration layer.
2424## Behaviors
30303. **Pre-dispatch check**: `smith auth check` resolves a provider's credential without a model request and prints the winning source.
31314. **Flag surface**: each option is declared once with a command-line flag and a `SMITH_`-prefixed environment name; eval and RPC expose `--provider`, `--model`, `--base-url`; the command line wins over the environment, and resolved values report their source.
3232Capabilities stay in the catalog; request options such as thinking levels arrive with catalog levels, not as flags.
335. **Resolution order**: flag argument, then auth store, then environment variable; first hit wins, ties across sources resolve by this order.
335. **Resolution orders**: options resolve command line, then environment, then configuration; credentials resolve auth store, then environment variable. First hit wins in each domain.
34346. **Explicit failure**: with no provider flag, no stored credential, and no environment variable, commands fail naming the vendor, the missing credential, and every source tried.
35357. **Hygiene**: credential plaintext never enters logs, session traces, replay output, or diagnostics.
3939```mermaid
4040flowchart LR
41 F["--provider/--model/--base-url flags"] --> S{"flag set?"}
42 S -- yes --> C["use flag values"]
43 S -- no --> A["auth store lookup"] --> T{"found?"}
44 T -- yes --> C2["use stored credential"]
45 T -- no --> E["environment variable"] --> U{"set?"}
46 U -- yes --> C3["use env credential"]
47 U -- no --> X["fail: name vendor + all sources tried"]
48 C --> D["resolve before dispatch"]
49 C2 --> D
50 C3 --> D
41 subgraph options [options: provider, model, base-url]
42 OF["--flag value"] --> OE["SMITH_ env value"] --> OC["configuration value"] --> OD["default"]
43 end
44 subgraph creds [credentials]
45 CA["auth store entry"] --> CE["vendor env variable"] --> CX["fail: vendor + sources tried"]
46 end
47 OD --> R["resolve before dispatch"]
48 CE --> R
49 CX --> R
5150```
5352## Plan dependencies
7069- `smith auth add` then `list` then `remove` round-trips one provider entry; file permissions are user-only.
7170- `smith auth check` succeeds and fails without any network activity.
72- Resolution picks flag > store > env deterministically for each vendor.
71- Options resolve cli > env > configuration; credentials resolve store > env, deterministically per vendor.
7372- Eval without any credential source fails with vendor and all sources named; no OpenAI endpoint or model is implied.
7473- Every option resolves from one declaration; the command-line value overrides the environment value.
7574- Diagnostics report which surface supplied each resolved option; undeclared environment prefixes are ignored.

Cargo.lock

Modified

+85 / −1 text lines

6767 "windows-sys 0.61.2",
70[[package]]
71name = "assert_cmd"
72version = "2.2.2"
73source = "registry+https://github.com/rust-lang/crates.io-index"
74checksum = "2aa3a22042e45de04255c7bf3626e239f450200fd0493c1e382263544b20aea6"
75dependencies = [
76 "anstyle",
77 "bstr",
78 "libc",
79 "predicates",
80 "predicates-core",
81 "predicates-tree",
82 "wait-timeout",
83]
7085[[package]]
7186name = "atomic-waker"
7287version = "1.1.2"
98113checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
99114dependencies = [
100115 "memchr",
116 "regex-automata",
101117 "serde_core",
303319source = "registry+https://github.com/rust-lang/crates.io-index"
304320checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
322[[package]]
323name = "difflib"
324version = "0.4.0"
325source = "registry+https://github.com/rust-lang/crates.io-index"
326checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
306328[[package]]
307329name = "dirs"
308330version = "5.0.1"
353375source = "registry+https://github.com/rust-lang/crates.io-index"
354376checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d"
378[[package]]
379name = "float-cmp"
380version = "0.10.0"
381source = "registry+https://github.com/rust-lang/crates.io-index"
382checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8"
383dependencies = [
384 "num-traits",
385]
356387[[package]]
357388name = "form_urlencoded"
358389version = "1.2.2"
868899 "libc",
902[[package]]
903name = "normalize-line-endings"
904version = "0.3.0"
905source = "registry+https://github.com/rust-lang/crates.io-index"
906checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
871908[[package]]
872909name = "num-traits"
873910version = "0.2.19"
950987 "zerovec",
990[[package]]
991name = "predicates"
992version = "3.1.4"
993source = "registry+https://github.com/rust-lang/crates.io-index"
994checksum = "ada8f2932f28a27ee7b70dd6c1c39ea0675c55a36879ab92f3a715eaa1e63cfe"
995dependencies = [
996 "anstyle",
997 "difflib",
998 "float-cmp",
999 "normalize-line-endings",
1000 "predicates-core",
1001 "regex",
1004[[package]]
1005name = "predicates-core"
1006version = "1.0.10"
1007source = "registry+https://github.com/rust-lang/crates.io-index"
1008checksum = "cad38746f3166b4031b1a0d39ad9f954dd291e7854fcc0eed52ee41a0b50d144"
1010[[package]]
1011name = "predicates-tree"
1012version = "1.0.13"
1013source = "registry+https://github.com/rust-lang/crates.io-index"
1014checksum = "d0de1b847b39c8131db0467e9df1ff60e6d0562ab8e9a16e568ad0fdb372e2f2"
1015dependencies = [
1016 "predicates-core",
1017 "termtree",
9531020[[package]]
9541021name = "proc-macro2"
9551022version = "1.0.107"
13361403name = "smith-cli"
13371404version = "0.1.0"
13381405dependencies = [
1406 "assert_cmd",
13391407 "clap",
1408 "predicates",
13401409 "serde_json",
13411410 "smith",
13421411 "smith-harness",
14411510 "syn 2.0.119",
1513[[package]]
1514name = "termtree"
1515version = "0.5.1"
1516source = "registry+https://github.com/rust-lang/crates.io-index"
1517checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
14441519[[package]]
14451520name = "thiserror"
14461521version = "1.0.69"
16621737 "wasm-bindgen",
1740[[package]]
1741name = "wait-timeout"
1742version = "0.2.1"
1743source = "registry+https://github.com/rust-lang/crates.io-index"
1744checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11"
1745dependencies = [
1746 "libc",
16651749[[package]]
16661750name = "walkdir"
16671751version = "2.5.0"
18061890source = "registry+https://github.com/rust-lang/crates.io-index"
18071891checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
18081892dependencies = [
1809 "windows-sys 0.48.0",
1893 "windows-sys 0.61.2",
18121896[[package]]

Cargo.toml

Modified

+1 / −0 text lines

8080# dev
8181insta = "1"
8282assert_cmd = "2"
83predicates = "3"
8384assert_fs = "1"
8485proptest = "1"
8586expectrl = "0.9"

smith-ai/src/auth.rs

Modified

+141 / −0 text lines

77//! another.
99use std::collections::HashMap;
10use std::path::{Path, PathBuf};
1011use std::sync::{Arc, Mutex};
1112use std::time::{Duration, SystemTime};
14use crate::models::ProviderKind;
1316/// Where a credential comes from.
1417#[derive(Clone, Debug, PartialEq, Eq)]
1518pub enum CredentialSource {
157160 }
163/// The environment variable carrying a provider's credential.
164#[must_use]
165pub const fn credential_env_var(kind: ProviderKind) -> &'static str {
166 match kind {
167 ProviderKind::OpenAiCompatible => "OPENAI_API_KEY",
168 ProviderKind::Anthropic => "ANTHROPIC_API_KEY",
169 ProviderKind::Google => "GEMINI_API_KEY",
170 ProviderKind::Plugin => "SMITH_PLUGIN_API_KEY",
171 }
172}
174/// The default endpoint base URL for a provider.
175#[must_use]
176pub const fn default_base_url(kind: ProviderKind) -> &'static str {
177 match kind {
178 ProviderKind::OpenAiCompatible => "https://api.openai.com/v1",
179 ProviderKind::Anthropic => "https://api.anthropic.com",
180 ProviderKind::Google => "https://generativelanguage.googleapis.com/v1beta",
181 ProviderKind::Plugin => "https://localhost",
182 }
183}
185/// Durable credential store under the Smith data directory.
186///
187/// One plaintext file per provider, user-only permissions where the
188/// platform supports them, no keychain dependency.
189#[derive(Clone, Debug)]
190pub struct AuthStore {
191 dir: PathBuf,
192}
194impl AuthStore {
195 /// The store under the platform Smith data directory.
196 #[must_use]
197 pub fn at_default() -> Self {
198 Self {
199 dir: smith::config::auth_dir(),
200 }
201 }
203 /// A store at an explicit directory, primarily for tests.
204 #[must_use]
205 pub fn at(dir: impl Into<PathBuf>) -> Self {
206 Self { dir: dir.into() }
207 }
209 /// The backing directory.
210 #[must_use]
211 pub fn dir(&self) -> &Path {
212 &self.dir
213 }
215 fn path(&self, kind: ProviderKind) -> PathBuf {
216 self.dir.join(kind.slug())
217 }
219 /// Persist one provider credential with user-only permissions.
220 ///
221 /// # Errors
222 ///
223 /// Returns a [`smith::error::SmithError::Session`] fault when the store
224 /// directory or file cannot be created or written.
225 pub fn save(&self, kind: ProviderKind, secret: &str) -> smith::error::Result<()> {
226 std::fs::create_dir_all(&self.dir).map_err(|e| store_io("create", &e))?;
227 let path = self.path(kind);
228 std::fs::write(&path, secret).map_err(|e| store_io("write", &e))?;
229 restrict_permissions(&path);
230 Ok(())
231 }
233 /// The stored credential for a provider, when present.
234 ///
235 /// # Errors
236 ///
237 /// Returns a [`smith::error::SmithError::Session`] fault when the store
238 /// cannot be read.
239 pub fn load(&self, kind: ProviderKind) -> smith::error::Result<Option<String>> {
240 match std::fs::read_to_string(self.path(kind)) {
241 Ok(secret) => Ok(Some(secret)),
242 Err(error) if error.kind() == std::io::ErrorKind::NotFound => Ok(None),
243 Err(error) => Err(store_io("read", &error)),
244 }
245 }
247 /// Delete one provider credential; reports whether an entry existed.
248 ///
249 /// # Errors
250 ///
251 /// Returns a [`smith::error::SmithError::Session`] fault when deletion
252 /// fails for a reason other than absence.
253 pub fn remove(&self, kind: ProviderKind) -> smith::error::Result<bool> {
254 match std::fs::remove_file(self.path(kind)) {
255 Ok(()) => Ok(true),
256 Err(error) if error.kind() == std::io::ErrorKind::NotFound => Ok(false),
257 Err(error) => Err(store_io("remove", &error)),
258 }
259 }
261 /// The providers with a stored credential.
262 ///
263 /// # Errors
264 ///
265 /// Returns a [`smith::error::SmithError::Session`] fault when the store
266 /// directory cannot be listed.
267 pub fn list(&self) -> smith::error::Result<Vec<ProviderKind>> {
268 let mut kinds = Vec::new();
269 let entries = match std::fs::read_dir(&self.dir) {
270 Ok(entries) => entries,
271 Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Ok(kinds),
272 Err(error) => return Err(store_io("list", &error)),
273 };
274 for entry in entries.flatten() {
275 if let Some(kind) = ProviderKind::from_slug(&entry.file_name().to_string_lossy()) {
276 kinds.push(kind);
277 }
278 }
279 kinds.sort();
280 Ok(kinds)
281 }
282}
284fn store_io(step: &str, error: &std::io::Error) -> smith::error::SmithError {
285 smith::error::SmithError::Session {
286 code: "AUTH_STORE".to_string(),
287 message: format!("auth store {step} failed: {error}"),
288 }
289}
291#[cfg(unix)]
292fn restrict_permissions(path: &Path) {
293 use std::os::unix::fs::PermissionsExt;
294 let permissions = std::fs::Permissions::from_mode(0o600);
295 let _ = std::fs::set_permissions(path, permissions);
296}
298#[cfg(not(unix))]
299fn restrict_permissions(_path: &Path) {}
160301fn auth(message: impl Into<String>) -> smith::error::SmithError {
161302 smith::error::SmithError::Provider {
162303 fault: smith::error::ProviderFault::Authentication {

smith-ai/src/models.rs

Modified

+26 / −1 text lines

1111use std::collections::HashMap;
1313/// Which adapter family serves a model.
14#[derive(Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize)]
14#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Serialize, Deserialize)]
1515pub enum ProviderKind {
1616 /// OpenAI-compatible chat completions.
1717 OpenAiCompatible,
2323 Plugin,
26impl ProviderKind {
27 /// Stable lowercase file name for this provider.
28 #[must_use]
29 pub const fn slug(self) -> &'static str {
30 match self {
31 Self::OpenAiCompatible => "openai",
32 Self::Anthropic => "anthropic",
33 Self::Google => "google",
34 Self::Plugin => "plugin",
35 }
36 }
38 /// Parse a provider from its slug.
39 #[must_use]
40 pub fn from_slug(slug: &str) -> Option<Self> {
41 match slug {
42 "openai" => Some(Self::OpenAiCompatible),
43 "anthropic" => Some(Self::Anthropic),
44 "google" => Some(Self::Google),
45 "plugin" => Some(Self::Plugin),
46 _ => None,
47 }
48 }
49}
2651/// What a model explicitly supports, used to validate requests.
2752#[expect(
2853 clippy::struct_excessive_bools,

smith-cli/Cargo.toml

Modified

+4 / −0 text lines

1414smith-harness = { path = "../smith-harness", version = "0.1.0" }
1515clap = { workspace = true }
1616serde_json = { workspace = true }
18[dev-dependencies]
19assert_cmd = { workspace = true }
20predicates = { workspace = true }

smith-cli/src/main.rs

Modified

+116 / −1 text lines

77//! result; `rpc` speaks LF-delimited JSON-RPC on standard input and output.
88//! Both use the same runtime assembly from `smith-harness`.
10use clap::Parser;
10use clap::{Parser, ValueEnum};
1111use smith::error::Result;
1212use smith_harness::rpc::{RpcState, handle_line};
1313use smith_harness::runtime::{RuntimeConfig, RuntimeProvider, build_agent};
14use smith_harness::{AuthStore, ProviderKind, credential_env_var};
1415use std::io::{BufRead, Write};
1617/// Smith, a fast coding-agent runtime.
2425/// Interface mode.
2526#[derive(Debug, Parser)]
2627enum Command {
28 /// Manage stored provider credentials.
29 Auth {
30 #[command(subcommand)]
31 action: AuthAction,
32 },
2733 /// Run one prompt without the TUI.
2834 Eval {
2935 /// The prompt to run.
4551 Rpc,
54/// Credential operations.
55#[derive(Debug, Parser)]
56enum AuthAction {
57 /// Store a credential read from standard input.
58 Add {
59 /// Provider the credential belongs to.
60 #[arg(long)]
61 provider: ProviderArg,
62 },
63 /// List providers with stored credentials.
64 List,
65 /// Delete one stored credential.
66 Remove {
67 /// Provider whose credential is deleted.
68 #[arg(long)]
69 provider: ProviderArg,
70 },
71 /// Resolve one provider's credential without any network access.
72 Check {
73 /// Provider whose credential is checked.
74 #[arg(long)]
75 provider: ProviderArg,
76 },
77}
79/// Provider names accepted on the command line.
80#[derive(Copy, Clone, Debug, ValueEnum)]
81enum ProviderArg {
82 /// OpenAI-compatible endpoints.
83 Openai,
84 /// Anthropic Messages API.
85 Anthropic,
86 /// Google Gemini API.
87 Google,
88}
90impl ProviderArg {
91 const fn kind(self) -> ProviderKind {
92 match self {
93 Self::Openai => ProviderKind::OpenAiCompatible,
94 Self::Anthropic => ProviderKind::Anthropic,
95 Self::Google => ProviderKind::Google,
96 }
97 }
98}
48100#[expect(clippy::print_stderr, reason = "the CLI reports failures on stderr")]
49101fn main() -> std::process::ExitCode {
50102 let cli = Cli::parse();
51103 let result = match cli.command {
104 Command::Auth { action } => auth(&action),
52105 Command::Eval {
53106 prompt,
54107 json,
67120 }
123#[expect(clippy::print_stdout, reason = "auth command output is the product")]
124fn auth(action: &AuthAction) -> Result<()> {
125 let store = AuthStore::at_default();
126 match action {
127 AuthAction::Add { provider } => {
128 let mut secret = String::new();
129 std::io::stdin()
130 .lock()
131 .read_line(&mut secret)
132 .map_err(|e| smith::error::SmithError::Session {
133 code: "AUTH_READ".to_string(),
134 message: e.to_string(),
135 })?;
136 let secret = secret.trim_end_matches(['\r', '\n']);
137 if secret.is_empty() {
138 return Err(smith::error::SmithError::Provider {
139 fault: smith::error::ProviderFault::Authentication {
140 message: "refusing to store an empty credential".to_string(),
141 },
142 });
143 }
144 store.save(provider.kind(), secret)?;
145 println!("{}: stored", provider.kind().slug());
146 }
147 AuthAction::List => {
148 for kind in store.list()? {
149 println!("{}: store", kind.slug());
150 }
151 }
152 AuthAction::Remove { provider } => {
153 if store.remove(provider.kind())? {
154 println!("{}: removed", provider.kind().slug());
155 } else {
156 return Err(smith::error::SmithError::Provider {
157 fault: smith::error::ProviderFault::Authentication {
158 message: format!("no stored credential for {}", provider.kind().slug()),
159 },
160 });
161 }
162 }
163 AuthAction::Check { provider } => {
164 let kind = provider.kind();
165 let var = credential_env_var(kind);
166 if store.load(kind)?.is_some() {
167 println!("{}: store", kind.slug());
168 } else if std::env::var(var).is_ok_and(|value| !value.is_empty()) {
169 println!("{}: env:{var}", kind.slug());
170 } else {
171 return Err(smith::error::SmithError::Provider {
172 fault: smith::error::ProviderFault::Authentication {
173 message: format!(
174 "no credential for {} (tried store, env {var})",
175 kind.slug()
176 ),
177 },
178 });
179 }
180 }
181 }
182 Ok(())
183}
70185fn provider(mock: bool, base_url: Option<String>, model: Option<String>) -> RuntimeProvider {
71186 if mock {
72187 return RuntimeProvider::Mock(vec![smith_harness::mock_text_reply(

smith-cli/tests/auth_cli.rs

Added
new file mode 100644

+101 / −0 text lines

1//! End-to-end credential store behavior through the `smith auth` CLI.
2
3use assert_cmd::Command;
4use std::path::PathBuf;
5
6fn scratch(name: &str) -> PathBuf {
7 std::env::temp_dir().join(format!("smith-auth-test-{name}-{}", std::process::id()))
8}
9
10fn smith(name: &str) -> Command {
11 let mut command = Command::cargo_bin("smith").unwrap();
12 command
13 .env("XDG_DATA_HOME", scratch(name))
14 .env_remove("ANTHROPIC_API_KEY")
15 .env_remove("OPENAI_API_KEY")
16 .env_remove("GEMINI_API_KEY");
17 command
18}
20#[test]
21fn add_list_remove_round_trips_with_user_only_permissions() {
22 let mut add = smith("roundtrip");
23 add.args(["auth", "add", "--provider", "anthropic"])
24 .write_stdin("sk-test-secret\n")
25 .assert()
26 .success()
27 .stdout("anthropic: stored\n");
29 let mut list = smith("roundtrip");
30 list.args(["auth", "list"])
31 .assert()
32 .success()
33 .stdout("anthropic: store\n");
35 let mut check = smith("roundtrip");
36 check
37 .args(["auth", "check", "--provider", "anthropic"])
38 .assert()
39 .success()
40 .stdout("anthropic: store\n");
42 let mut remove = smith("roundtrip");
43 remove
44 .args(["auth", "remove", "--provider", "anthropic"])
45 .assert()
46 .success()
47 .stdout("anthropic: removed\n");
49 let mut gone = smith("roundtrip");
50 gone.args(["auth", "check", "--provider", "anthropic"])
51 .assert()
52 .failure()
53 .stderr(predicates::str::contains(
54 "no credential for anthropic (tried store, env ANTHROPIC_API_KEY)",
55 ));
57 let mut empty = smith("roundtrip");
58 empty
59 .args(["auth", "remove", "--provider", "anthropic"])
60 .assert()
61 .failure()
62 .stderr(predicates::str::contains(
63 "no stored credential for anthropic",
64 ));
65}
67#[test]
68fn stored_secret_never_prints_and_permissions_are_user_only() {
69 let mut add = smith("hygiene");
70 add.args(["auth", "add", "--provider", "openai"])
71 .write_stdin("sk-super-secret-value\n")
72 .assert()
73 .success();
75 let secret_file = scratch("hygiene").join("smith/auth/openai");
76 #[cfg(unix)]
77 {
78 use std::os::unix::fs::PermissionsExt;
79 let mode = std::fs::metadata(&secret_file)
80 .unwrap()
81 .permissions()
82 .mode();
83 assert_eq!(mode & 0o777, 0o600);
84 }
86 let mut list = smith("hygiene");
87 list.args(["auth", "list"])
88 .assert()
89 .stdout("openai: store\n");
90}
92#[test]
93fn check_reports_environment_source() {
94 let mut check = smith("envsource");
95 check
96 .args(["auth", "check", "--provider", "google"])
97 .env("GEMINI_API_KEY", "sk-env")
98 .assert()
99 .success()
100 .stdout("google: env:GEMINI_API_KEY\n");
101}

smith-harness/src/lib.rs

Modified

+2 / −0 text lines

1414pub use rpc::{RpcRequest, RpcResponse, RpcState, handle_line};
1515pub use runtime::{RuntimeConfig, RuntimeProvider, build_agent};
16pub use smith_ai::auth::{AuthStore, credential_env_var};
17pub use smith_ai::models::ProviderKind;
1719use smith::id::MessageId;
1820use smith::provider::{ProviderStream, StreamFn};

smith/src/config.rs

Modified

+11 / −0 text lines

3030/// Smallest accepted tool deadline, in milliseconds.
3131const MIN_TOOL_TIMEOUT_MS: u64 = 100;
33/// Directory holding auth credentials under the platform data directory.
34#[must_use]
35pub fn auth_dir() -> std::path::PathBuf {
36 dirs::data_dir()
37 .map_or_else(
38 || std::path::PathBuf::from(".smith"),
39 |base| base.join("smith"),
40 )
41 .join("auth")
42}
3344impl Config {
3445 /// Default validated configuration. Session data resolves under the
3546 /// platform data directory (XDG data home on Linux).