`atomic vault init` over InitVault — the vault init operates inside an EXISTING repository (it requires one), so it routes normally via the daemon: the handler runs has_vault → init_vault → the recursive track → the defaults record, and the CLI prints the local report.
()
| 7219 | /// daemon: the handler runs has_vault → init_vault → the recursive track |
| 7220 | /// → the defaults record, and the CLI prints the local report. |
| 7221 | pub fn vault_init() -> CliResult<bool> { |
| 7222 | let Some(session) = Service::open()? else { |
| 7223 | return Ok(false); |
| 7224 | }; |
| 7225 | let request = pb::InitVaultRequest { |
| 7226 | repository: Some(session.reference.clone()), |
| 7227 | meta: request_meta(), |
| 7228 | view: None, |
| 7229 | expected_snapshot: None, |
| 7230 | }; |
| 7231 | let response = session.init_vault(request)?; |
| 7232 | if response.already_initialized { |
| 7233 | print_info("Vault is already initialized"); |
| 7234 | return Ok(true); |
| 7235 | } |
| 7236 | print_info(&format!( |
| 7237 | "Initialized vault at {}", |
| 7238 | response.vault_dir.clone().unwrap_or_default() |
| 7239 | )); |
| 7240 | if response.recorded { |
| 7241 | print_success("Recorded vault defaults"); |
| 7242 | } |
| 7243 | Ok(true) |
| 7244 | } |
| 7245 | |
| 7246 | /// `atomic project init` — the server-side project creation (the |
| 7247 | /// management StorageClient built from the global config + the identity |
no test coverage detected