0.25.1 — get_health_summary destroyed filter + create_entity footgun doc
- get_health_summary: filter out state=destroyed entities (was noise from 20+ destroyed test LXCs, deprecated services, etc.) - create_entity: document the monitoring footgun in the tool description (creating a type=check entity does NOT wire a check_def; the correct path is update_entity_attributes with monitoring + url attributes)
This commit is contained in:
@@ -113,7 +113,7 @@ func allTools(pool *db.Pool, agentID uuid.UUID) []toolReg {
|
||||
query := `
|
||||
SELECT e.slug, e.type, st.health, st.last_check_at
|
||||
FROM entity_status st JOIN entities e ON e.id = st.entity_id
|
||||
WHERE e.type <> 'check'`
|
||||
WHERE e.type <> 'check' AND e.state <> 'destroyed'`
|
||||
if healthStr != "" {
|
||||
query += ` AND st.health = ANY(string_to_array($1, ','))`
|
||||
return queryRows(ctx, pool, query, healthStr), nil
|
||||
@@ -205,7 +205,7 @@ func allTools(pool *db.Pool, agentID uuid.UUID) []toolReg {
|
||||
return upsertKnowledge(ctx, pool, args)
|
||||
}},
|
||||
|
||||
{tool: &mcp.Tool{Name: "create_entity", Description: "Create a new entity in the knowledge graph — the creation half alongside update_entity_attributes (which only updates EXISTING entities). Use it when a task needs an entity that does not exist yet: a new check (check:<kind>:<target>:<n>), an ingress (ingress:<host>), a cert (cert:<host>), a service, a host/LXC/VM, etc. After inserting, it derives default checks from the entity type's monitoring spec (same as a seed ingest), so creating a checkable entity wires its monitoring in one call. Does NOT require approval (this updates the knowledge graph, not the live infrastructure). If the slug already exists it returns 'already exists' — then use update_entity_attributes to change it.",
|
||||
{tool: &mcp.Tool{Name: "create_entity", Description: "Create a new entity in the knowledge graph. Use it when a task needs an entity that does not exist yet: a service, a host/LXC/VM, an ingress, a cert, etc. After inserting, it derives default checks from the entity type's monitoring spec, so creating a checkable entity wires its monitoring in one call. Does NOT require approval. If the slug already exists it returns 'already exists' — then use update_entity_attributes to change it. FOOTGUN: creating a type=check entity creates a bare entity row but does NOT wire a check_def — the scheduler will never probe it. To add monitoring, set `monitoring: [\"http\"]` + `url` on the target via update_entity_attributes.",
|
||||
InputSchema: objSchema(
|
||||
prop{"type", "string", "Entity type — must already exist in the ontology and not be abstract (e.g. service, lxc, host, vm, check, ingress, cert, dns)."},
|
||||
prop{"name", "string", "Human-readable name (e.g. 'HAOS http service check')."},
|
||||
|
||||
Reference in New Issue
Block a user