telemetry: share tool approval classification metadata #336746

Merged
dmitrivMS opened 4:10am on September 18, 2026 wanted to merge 27 Ξ” into microsoft/vscode main from
agents/align-tool-approval-telemetry
Diff Delta:
27
About 405 Diff Delta/hour
Classified as:  General

dmitrivMS's Description of Work

Summary

Share the existing workbench chat.toolApproval classification with Agent Host through the platform telemetry module. Both emitters use the same event name, so their overlapping declaration metadata must agree.

The newly published @vscode/[email protected] compares all overlapping declaration fields, exposing differing owners and descriptions in these two declarations. This prevents a dependency-only pickup from passing telemetry extraction.


  • Move the workbench classification verbatim into LanguageModelToolApprovalClassification.

  • Reuse it in both emitters, retaining the existing canonical owner (chrmarti) and descriptions.

  • Keep Agent Host-specific metadata and all event payloads unchanged.

  • No dependency bump, new telemetry fields, classification/purpose changes, privacy changes, or disabled validation.

Validation

Using the actual published 1.20.5 tarball on VS Code baseline cd6d024b513eaa67a3217741ba323460bc55490e, Node 24.18.0 / Windows x64 and the existing 4096 MiB setting:


  • Before: core extraction fails on conflicting chat.toolApproval declarations.

  • After: core extraction succeeds with 485 events and 34 common properties.

  • Extension/helper config extraction also succeeds with 72 events and 14 common properties.

  • All three changed TypeScript files compile to byte-identical runtime JavaScript before/after.

  • The shared classification matches the original workbench type verbatim after line-ending normalization.

  • Targeted repository hygiene and git diff --check pass.

This uses existing dependencies read-only, not a full CI filesystem/agent reproduction. No pipeline was queued or rerun.

Coordination

Prerequisite for the separate 1.20.5 dependency pickup. Refs #336369 and microsoft/vscode-telemetry-extractor#80.

Related #336653 adds explicit measurement annotations to the two Agent Host sandbox flags. Those flags move into the shared classification here, so that follow-up should target the shared declaration. Its annotation change is not folded into this PR.

3 total changed files
Loading changes...
Loading changes...
Loading changes...
That’s the last hunk
The diff well is dry.