From 0579ef94f770bcf51c32ba37dee897ac957eb866 Mon Sep 17 00:00:00 2001 From: kami Date: Mon, 20 Jul 2026 11:22:35 +0400 Subject: [PATCH] Add entity-scoped attention query to Praxis client Complements Praxis's new entity_id filter on /tools/attention: lets callers that already hold a resolved Nexus entity_id (e.g. after resolveEntityReference) ask what needs attention for that entity directly, instead of filtering the unscoped list client-side. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_018ghELqYhZNLub2TXGMazqA --- cmd/mavend/ecosystem.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/mavend/ecosystem.go b/cmd/mavend/ecosystem.go index 21287a5..6a7e3a1 100644 --- a/cmd/mavend/ecosystem.go +++ b/cmd/mavend/ecosystem.go @@ -183,6 +183,16 @@ func (c *praxisClient) ListAttention(ctx context.Context, limit int) ([]map[stri return out, err } +// ListAttentionForEntity is ListAttention scoped to a single canonical Nexus +// entity, so callers already holding a resolved entity_id (e.g. after +// resolveEntityReference) can ask "what needs attention for this entity" +// instead of filtering the unscoped list client-side. +func (c *praxisClient) ListAttentionForEntity(ctx context.Context, entityID string, limit int) ([]map[string]any, error) { + var out []map[string]any + err := c.getJSON(ctx, fmt.Sprintf("/api/v1/tools/attention?limit=%d&entity_id=%s", limit, url.QueryEscape(entityID)), &out) + return out, err +} + func (c *praxisClient) ListChanges(ctx context.Context, limit int) ([]map[string]any, error) { var out []map[string]any err := c.getJSON(ctx, fmt.Sprintf("/api/v1/tools/changes?limit=%d", limit), &out)