Problem
The `track-tick` payload (`buildTrackTickRequest` in `hooks/runtime.js`) emits `ai_tool_version: 1` (an internal schema number) but never the installed plugin version. There is no way, from the dashboard or DB, to tell which plugin version produced a tick.
This is why a stale install is invisible: a user can be pinned to an old cached version under `~/.cursor/plugins/cache/devclocked/devclocked//` and we cannot detect it from their data.
Fix
Stamp the plugin version (read from `.cursor-plugin/plugin.json`) into:
- `activity_context.ai_tool.plugin_version` (persisted verbatim into `activity_logs.activity_context` — queryable with no server change), and
- an `x-devclocked-plugin-version` request header (server-log observability).
Payoff
Enables verifying that a reinstall actually reached a user: query `activity_context->'ai_tool'->>'plugin_version'` for their recent ticks.
Problem
The `track-tick` payload (`buildTrackTickRequest` in `hooks/runtime.js`) emits `ai_tool_version: 1` (an internal schema number) but never the installed plugin version. There is no way, from the dashboard or DB, to tell which plugin version produced a tick.
This is why a stale install is invisible: a user can be pinned to an old cached version under `~/.cursor/plugins/cache/devclocked/devclocked//` and we cannot detect it from their data.
Fix
Stamp the plugin version (read from `.cursor-plugin/plugin.json`) into:
Payoff
Enables verifying that a reinstall actually reached a user: query `activity_context->'ai_tool'->>'plugin_version'` for their recent ticks.