[Plugin] adding install id to the active-session marker - #157
Draft
alexfarnhambrown wants to merge 1 commit into
Draft
[Plugin] adding install id to the active-session marker#157alexfarnhambrown wants to merge 1 commit into
alexfarnhambrown wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the installation UUID to
active-session.jsonso Vercel CLI telemetry can attribute a command to the plugin installation that ran it.#136 added
plugin:install_idto the plugin's own phone-home but deliberately kept it out of the marker. The CLI only reads the marker, so today it can tell that a command ran inside a plugin session but not which installation that session belonged to. Consumer PR: vercel/vercel#17542. Tracked in PIPE-6602.Changes
hooks/src/telemetry.mts—installId?: stringonActiveSessionMarker, populated from the existinggetOrCreateInstallationId()README.md— the telemetry section stated the ID is never written to the marker, which this changesStays on schema 1
The field is additive and optional, so older readers ignore it. A bump would actively break things: the shipped CLI reader does a hard
marker.schema !== 1 → return null, so schema 2 would blank outvercel_plugin_active_sessionandvercel_plugin_versionfor everyone until they upgrade their CLI.Optional rather than required because
getOrCreateInstallationId()returns null when the file can't be written or read back.Tests
Rollout note
anthropics/claude-plugins-officialpins this repo to commit19606ac(0.45.1), 10 commits behind main. #136 is inside that gap, so the official-marketplace population isn't emittingplugin:install_idyet and won't pick this up either until that pin moves.