Skip to content

[Plugin] adding harness detection and install session ID - #136

Merged
Melkeydev merged 8 commits into
mainfrom
melkey/adding-plugin-telemetry
Aug 12, 2026
Merged

[Plugin] adding harness detection and install session ID #136
Melkeydev merged 8 commits into
mainfrom
melkey/adding-plugin-telemetry

Conversation

@Melkeydev

Copy link
Copy Markdown
Collaborator

This PR adds detection logic for which harness the plugin is installed for + an instal ID for first time users who install the Plugin

@alexfarnhambrown alexfarnhambrown left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for landing on this, @Melkeydev! Stoked to drive the downstream modeling work.

Comment thread hooks/src/telemetry.mts Outdated
Comment thread hooks/src/telemetry.mts
Comment thread hooks/src/telemetry.mts
@socket-security

socket-security Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​detect-agent@​1.2.07510010090100

View full report

@alexfarnhambrown alexfarnhambrown left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three inline notes from the downstream side, plus one proposal that spans both files.

Proposal: carry agentHarness on active-session.json too.

Right now harness only exists in the plugin phone-home, capped at once per harness per UTC day, so a CLI invocation can't be attributed to a harness at all. The marker is refreshed on every SessionStart and costs no network, so putting the harness on it would let CLI telemetry reason about harness per invocation — which is the grain we'd actually need to ask whether harness influences agentic CLI usage.

Two things worth saying up front:

  • It'd need to stay schema: 1. The shipped CLI reader does a hard marker.schema !== 1 -> return null, so a bump would blank out vercel_plugin_active_session and vercel_plugin_version for everyone until they upgrade their CLI. An additive optional field is invisible to old readers.
  • It isn't perfect: the marker is machine-global and last-writer-wins, so with two harnesses open at once a CLI invocation would get whichever started a session most recently, not necessarily the one that ran the command. Still much better than day-grain, but not exact.

The CLI side (reading it and emitting vercel_plugin_agent_harness) is a separate PR in vercel/vercel, so this would be shipping a producer slightly ahead of its consumer. Fine either way from our side — happy for the field to land here, or to pair the two and do both later if you'd rather not ship something unread.

Comment thread hooks/src/session-start-profiler.mts Outdated
Comment thread hooks/src/session-start-profiler.mts
Comment thread README.md
@Melkeydev
Melkeydev merged commit 11c3258 into main Aug 12, 2026
5 checks passed
@Melkeydev
Melkeydev deleted the melkey/adding-plugin-telemetry branch August 12, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants