Skip to content

feat(serve): query.completed — share query results with every client #398

Description

@bgarcevic

Part of #355 (moved from #341). Depends on #397.

What

A query.completed notification sent to every client of a live session when any client finishes a query.run: who ran it, the query text, row count, duration, and the result (capped, for example to the first 1,000 rows).

Why

When an agent queries the model and reports "Margin % is 33.5% for Accessories", the user should be able to see the exact rows it read. The Query tab in tx ui shows the agent's queries in its history as they happen (mockup board "5 · Query").

Scope

  • Notification with client (name as in presence), query, columns, rows, rowCount, truncated, durationMs, at.
  • A client can opt out in initialize (agents don't need other clients' results).
  • Document it in docs/protocol.md.

Acceptance

  • Two clients on one session: a query from one reaches the other with the same rows.
  • Opted-out clients receive nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:devexbuild, CI, tests, contributor tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions