`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.
()
| 7302 | /// daemon: the handler runs has_vault → init_vault → the recursive track |
| 7303 | /// → the defaults record, and the CLI prints the local report. |
| 7304 | pub fn vault_init() -> CliResult<bool> { |
| 7305 | let Some(session) = Service::open()? else { |
| 7306 | return Ok(false); |
| 7307 | }; |
| 7308 | let request = pb::InitVaultRequest { |
| 7309 | repository: Some(session.reference.clone()), |
| 7310 | meta: request_meta(), |
| 7311 | view: None, |
| 7312 | expected_snapshot: None, |
| 7313 | }; |
| 7314 | let response = session.init_vault(request)?; |
| 7315 | if response.already_initialized { |
| 7316 | print_info("Vault is already initialized"); |
| 7317 | return Ok(true); |
| 7318 | } |
| 7319 | print_info(&format!( |
| 7320 | "Initialized vault at {}", |
| 7321 | response.vault_dir.clone().unwrap_or_default() |
| 7322 | )); |
| 7323 | if response.recorded { |
| 7324 | print_success("Recorded vault defaults"); |
| 7325 | } |
| 7326 | Ok(true) |
| 7327 | } |
| 7328 | |
| 7329 | /// `atomic project init` — the server-side project creation (the |
| 7330 | /// management StorageClient built from the global config + the identity |
no test coverage detected