Skip to main content

handle_vault_request

Function handle_vault_request 

Source
pub(crate) async fn handle_vault_request(
    __arg0: State<AppState>,
    caller: Option<Extension<Caller>>,
    __arg2: Json<RequestBody>,
) -> Response
Expand description

POST /api/v1/vault/request: ask the person for a new entry; answer when they save or dismiss it, or when the wait runs out (the request stays open in the Vault, and the agent finds the entry with list later).

Asking again for the same kind and label is safe: a verified agent whose session ended mid-wait joins the request already open, or gets the answer the person gave, and no second form opens. Every answer carries request_id.