feat(evi): connect agent to telemetry mcp - #539
Merged
Conversation
|
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
commit: |
HugoRCD
approved these changes
Aug 9, 2026
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.
Gives the agent read-only access to production evlog CLI telemetry through the telemetry dashboard's existing MCP endpoint, so the digest can report CLI usage and Hugo can ask questions about what is happening in the CLI. The agent authenticates with its own Vercel OIDC token: no shared password, no new env var.
What it adds
agent/connections/telemetry.ts): MCP client tohttps://telemetry.evlog.cloud/mcp(the same host the CLI ingests to, perpackages/cli/src/lib/constants.ts), allowlisting the four existing dashboard tools:telemetry-stats(aggregates with period-over-period, source/environment/tool breakdowns, top commands, top error codes, percentiles),telemetry-adoption(version rollout, new vs returning machines, punchcard, flag/custom-field breakdown),telemetry-runs(raw event list),telemetry-run(full per-run flags and fields). All read-only.process.env.VERCEL_OIDC_TOKEN, the token Vercel injects into the evi deployment (the same one the turbo remote-cache tool already uses). Nothing to configure, no password to share. Locally there is no OIDC token; the dashboard's soft auth keeps a password-less local dashboard open.apps/telemetry):/mcpnow authorizes a bearer token when it matchesANALYTICS_PASSWORD(human MCP clients like Cursor) or is a valid Vercel OIDC token. Verification (server/utils/vercel-oidc.ts) checks the signature against Vercel's team JWKS and pinsisstohttps://oidc.vercel.com/hrcdandsubtoowner:hrcd:project:evi:environment:production, so only the evi project's production deployments pass.joseadded as a direct dependency (already in the tree at the same version; lockfile delta is 3 lines).agent/skills/telemetry/SKILL.md): how to query and what is worth surfacing: version adoption, source mix, flag and custom-field usage, error-code trends, period-over-period shifts.agent/skills/daily-digest/SKILL.md): new "CLI usage (last 7d)" section between Visitors and Worth reading, one or two lines so the digest stays scannable.docs/notes.md): the OIDC auth mapping under a new Telemetry section.Capability placement checklist (per
docs/capability-placement.md)defineMcpClientConnectionwith an allowlist is the cheapest wiring; the skill carries the "what is interesting" procedure. No authored tool needed, no new cadence (the digest schedule already exists).canAccessAdminTools(maintainer + schedule app turns); community and autonomous turns are denied. On the server, the OIDCsubclaim pins team, project and environment, so no other Vercel project can mint an accepted token.vercel-oidc.tson the telemetry side with an injectable keyset for hermetic tests; the gate reuses the testedcanAccessAdminToolson the evi side.notes.mdupdated; digest skill updated; new telemetry skill.Checks
pnpm run lint: 22/22 tasks passpnpm run typecheck: 27/27 tasks passpnpm run test: pass (telemetry 187 tests, +6 new auth/OIDC cases)apps/*No deployment step: OIDC is already enabled on the evi project (the turbo remote-cache tool depends on it).