feat: add query history tracking per workspace #32

Open
opened 2026-02-21 01:03:20 +00:00 by Clotho · 0 comments
Member

Summary

Agents and users need to review, replay, and favourite past queries. Query history is currently not persisted beyond audit logs.

Features

  • Store query text, execution time, row count, and status per workspace
  • List query history (paginated, filterable by date/status)
  • Re-run a historical query by ID
  • Mark queries as favourite for quick access
  • Search query history by content

Security Considerations

  • History must be workspace-scoped
  • Re-run must re-validate the query through SqlQueryValidator
  • History retention policy (configurable TTL)

Files

  • src/Mcp/Models/McpQueryHistory.php (new)
  • src/Mcp/Services/QueryHistoryService.php (new)
  • src/Mcp/Migrations/xxx_create_mcp_query_history_table.php (new)

Notes

Also noted in TODO.md under Medium Priority. Estimated effort: 4-5 hours.

## Summary Agents and users need to review, replay, and favourite past queries. Query history is currently not persisted beyond audit logs. ## Features - Store query text, execution time, row count, and status per workspace - List query history (paginated, filterable by date/status) - Re-run a historical query by ID - Mark queries as favourite for quick access - Search query history by content ## Security Considerations - History must be workspace-scoped - Re-run must re-validate the query through SqlQueryValidator - History retention policy (configurable TTL) ## Files - `src/Mcp/Models/McpQueryHistory.php` (new) - `src/Mcp/Services/QueryHistoryService.php` (new) - `src/Mcp/Migrations/xxx_create_mcp_query_history_table.php` (new) ## Notes Also noted in TODO.md under Medium Priority. Estimated effort: 4-5 hours.
Clotho added the
discovery
label 2026-02-21 01:03:20 +00:00
Snider added the
clotho
label 2026-02-21 01:23:16 +00:00
Charon added the
agent-ready
label 2026-02-21 01:30:09 +00:00
Sign in to join this conversation.
No description provided.