encrypt-file
Encrypts one plain file in its repository location using an age public key, requiring confirmation and a reason for this emergency operation.
Instructions
dbabrain common.cli encrypt-file: ONE file encrypted with age where it lies on the repository, for a key's public half only (0.37.0).
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
host (required): Where the file is: {runtime (linux | docker | k8s), host, port, username, password | key_file, sudo}.
path (required): The one plain file, in full.
file_name (required): The last part of path - stated, and held to it.
size_bytes (required): The plain file's bytes, as the catalog proved them.
sha256 (required): The plain file's sha256, as the catalog proved it.
must_be_under (required): The repository folder path must be strictly under.
recipients (required): The key's public half (age1...).
key_id (required): The key's number in the runtime store.
key_expires_at (required): When the key stops encrypting (UTC) - refused at and after it.
timeout_seconds: Seconds the host may take; default 3600.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "encrypt-file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |