Skip to main content

agentmux_srv/server/
vault_routes.rs

1// Copyright 2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3
4//! The Vault's routes for agents, declared with what is decided about each.
5
6use super::route_table::declared_routes;
7use super::{vault_handlers, vault_import, vault_import_batch, vault_inspect, vault_rotate, vault_source};
8
9declared_routes! {
10    /// The Vault for agents: entries' names, asking the person for a new one, and an entry whose
11    /// value the Vault makes. Never a value back; the person's writes come only from the host
12    /// (`routes.rs`, `/api/v1/host/vault`).
13    pub(super) fn vault_routes, VAULT_ROUTES;
14    GET "/api/v1/vault" => vault_handlers::handle_vault_list;
15    POST "/api/v1/vault/list", Never => vault_handlers::handle_vault_list_for;
16    POST "/api/v1/vault/generate", Always => vault_handlers::handle_vault_generate;
17    POST "/api/v1/vault/history", Never => vault_handlers::handle_vault_history;
18    POST "/api/v1/vault/import", Always => vault_import::handle_vault_import;
19    POST "/api/v1/vault/import_batch", Always => vault_import_batch::handle_vault_import_batch;
20    POST "/api/v1/vault/check", Always => vault_source::handle_vault_check;
21    POST "/api/v1/vault/share", Always => vault_inspect::handle_vault_share;
22    POST "/api/v1/vault/show", Never => vault_inspect::handle_vault_show;
23    POST "/api/v1/vault/update", Always => vault_inspect::handle_vault_update;
24    POST "/api/v1/vault/verify", Never => vault_inspect::handle_vault_verify;
25    POST "/api/v1/vault/health", Never => vault_inspect::handle_vault_health;
26    POST "/api/v1/vault/rotate", Always => vault_rotate::handle_vault_rotate;
27    POST "/api/v1/vault/request", Always => vault_handlers::handle_vault_request;
28    GET "/api/v1/vault/on_screen" => vault_handlers::handle_vault_on_screen;
29}