feat(mcp): discover_infra_drift — live Proxmox vs DB guest reconciliation
The DB-only audit_knowledge_graph can't see guests running in Proxmox that have no entity, or entities whose pve_id is no longer live — the drift that the stray test LXCs were a symptom of. discover_infra_drift enumerates running guests via pct/qm list on every proxmox host (over the same SSH/pct path the checks use) and diffs against the DB: returns missing (live, no entity) and ghost (DB, not live). Read-only. Companion to audit_knowledge_graph; the skill now runs both and treats the remaining checks (misplaced parent, undeployed scripts, seed drift) as manual.
This commit is contained in:
@@ -791,6 +791,13 @@ func allTools(pool *db.Pool, agentID uuid.UUID) []toolReg {
|
||||
return textResult(string(b)), nil
|
||||
}},
|
||||
|
||||
{tool: &mcp.Tool{Name: "discover_infra_drift", Description: "Read-only live discovery: compares running Proxmox guests (pct/qm list on every proxmox host) against the DB graph. Returns guests running with no entity (missing) and entities whose pve_id is no longer live (ghost) — drift the DB-only audit_knowledge_graph cannot see. Reaches hosts over the same SSH/pct path the checks use. Does NOT mutate anything.",
|
||||
InputSchema: objSchema(),
|
||||
}, handler: func(ctx context.Context, req *mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
b, _ := json.Marshal(discoverInfraDrift(ctx, pool))
|
||||
return textResult(string(b)), nil
|
||||
}},
|
||||
|
||||
{tool: &mcp.Tool{Name: "list_my_secrets", Description: "List secrets accessible to this client by public key",
|
||||
InputSchema: objSchema(prop{"caller_pubkey", "string", "Age public key of the caller (optional)"}),
|
||||
}, handler: func(ctx context.Context, req *mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
|
||||
Reference in New Issue
Block a user