feat(mcp): Steward's own backups: the runs, the next one, checking and making one (#5836)
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 1m25s
CI / integration (push) Successful in 1m31s
CI / publish (push) Successful in 1m13s

list_backups, check_backup and make_backup are Settings → Backups for an
agent, admin only like the page. make_backup runs the page's job in the
background and is audited as "<user> via MCP". Restoring stays in the
browser. get_overview names a scheduled backup that failed, is two hours
past its slot, or has no bucket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 13:09:12 -04:00
co-authored by Claude Opus 5.5
parent c7ca459b81
commit 8feec4dc77
7 changed files with 493 additions and 4 deletions
+5
View File
@@ -80,6 +80,11 @@ While backups are on, Steward records two metrics under the source
A rule such as `backup_age_secs > 93600` (26 hours) fires when a daily backup
has been missed.
An agent on the MCP sees the same without a rule. `get_overview` names a
scheduled backup that failed, is two hours past its slot with none made, or has
no bucket set up. `list_backups`, `check_backup` and `make_backup` are this
page's admin tools (see [MCP](mcp.md)); restoring isn't among them.
## Checking a backup
**Settings → Backups → Check** compares a backup with what is in place, without
+10
View File
@@ -107,6 +107,16 @@ The loop for building one is save → `run_playbook` in check mode on one target
→ `get_ansible_run` → fix and save again → apply with `check=false`. The audit
row records the size, never the content.
`list_backups`, `check_backup` and `make_backup` are Settings → Backups for an
agent (#5836), admin only like the page, since a backup holds every secret
Steward keeps. `list_backups` gives the schedule, the next run and the last 30
runs with the check each one got after it was sent (`bucket=true` also lists the
bucket, which an append-only key may refuse). `check_backup` fetches one and
compares it with what is in place, changing nothing. `make_backup` starts one in
the background and is audited. Restoring stays in the browser, behind its typed
confirmation. `get_overview` reports, for every role, a scheduled backup that
failed, is overdue, or has no bucket set up.
The client sees each tool's full contract: arguments, what an empty value
means, and what comes back. That contract is the tool's docstring, so read the
docstrings in `steward/mcp/tools/` for the detail.