bc-telemetry-buddy-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/$null +2 -0
- package/.bctb-config.json +28 -0
- package/CHANGELOG.md +131 -0
- package/README.md +548 -0
- package/config-schema.json +205 -0
- package/coverage/clover.xml +110 -0
- package/coverage/coverage-final.json +2 -0
- package/coverage/lcov-report/auth.ts.html +772 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/cache.ts.html +835 -0
- package/coverage/lcov-report/cli.ts.html +595 -0
- package/coverage/lcov-report/config.ts.html +1186 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +116 -0
- package/coverage/lcov-report/kusto.ts.html +502 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/queries.ts.html +1147 -0
- package/coverage/lcov-report/references.ts.html +832 -0
- package/coverage/lcov-report/sanitize.ts.html +409 -0
- package/coverage/lcov-report/server.ts.html +1282 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +255 -0
- package/dist/cli.js +573 -0
- package/dist/cli.js.map +7 -0
- package/dist/server.js +548 -0
- package/dist/server.js.map +7 -0
- package/images/waldo.png +0 -0
- package/jest.config.js +35 -0
- package/launcher.js +26 -0
- package/mcp-test-results.txt +797 -0
- package/package.json +39 -0
- package/src/__tests__/config.test.ts +757 -0
- package/src/__tests__/customer-folders.test.ts +382 -0
- package/src/__tests__/event-catalog.test.ts +726 -0
- package/src/__tests__/event-field-samples.test.ts +498 -0
- package/src/__tests__/tenant-mapping.test.ts +364 -0
- package/src/cli.ts +170 -0
- package/src/config.ts +367 -0
- package/src/server.ts +1795 -0
- package/tsconfig.json +26 -0
- package/tsconfig.tsbuildinfo +1 -0
package/$null
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profiles": {
|
|
3
|
+
"default": {
|
|
4
|
+
"connectionName": "My BC Production",
|
|
5
|
+
"authFlow": "azure_cli",
|
|
6
|
+
"applicationInsightsAppId": "your-app-insights-id",
|
|
7
|
+
"kustoClusterUrl": "https://ade.applicationinsights.io",
|
|
8
|
+
"workspacePath": "C:\\_Source\\Community\\waldo.BCTelemetryBuddy\\packages\\mcp",
|
|
9
|
+
"queriesFolder": "queries"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"defaultProfile": "default",
|
|
13
|
+
"cache": {
|
|
14
|
+
"enabled": true,
|
|
15
|
+
"ttlSeconds": 3600
|
|
16
|
+
},
|
|
17
|
+
"sanitize": {
|
|
18
|
+
"removePII": false
|
|
19
|
+
},
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Microsoft BC Telemetry Samples",
|
|
23
|
+
"type": "github",
|
|
24
|
+
"url": "https://github.com/microsoft/BCTech",
|
|
25
|
+
"enabled": true
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# MCP Backend Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the BC Telemetry Buddy MCP backend will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2025-11-18
|
|
11
|
+
|
|
12
|
+
### 🚨 BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
**First standalone release of BC Telemetry Buddy MCP Server**
|
|
15
|
+
|
|
16
|
+
This is the first release of the MCP server as a standalone NPM package, separated from the VSCode extension.
|
|
17
|
+
|
|
18
|
+
**Major Changes:**
|
|
19
|
+
- **Standalone Package**: Published as `bc-telemetry-buddy-mcp` on NPM
|
|
20
|
+
- **CLI Interface**: New `bctb-mcp` CLI with commands: `start`, `init`, `validate`, `test-auth`
|
|
21
|
+
- **File-Based Configuration**: Uses `.bctb-config.json` instead of environment variables
|
|
22
|
+
- **Multi-Profile Support**: Manage multiple customer environments in single config file
|
|
23
|
+
- **Shared Core**: Uses `@bctb/shared` library for business logic (bundled at build time)
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- **CLI Commands**: `bctb-mcp start`, `bctb-mcp init`, `bctb-mcp validate`, `bctb-mcp test-auth`
|
|
28
|
+
- **File-Based Configuration**: Support for `.bctb-config.json` with config discovery
|
|
29
|
+
- **Multi-Profile Support**: Named profiles with inheritance and environment variable substitution
|
|
30
|
+
- **Profile Switching**: Support for `--profile` flag and `BCTB_PROFILE` environment variable
|
|
31
|
+
- **Config Schema**: JSON schema for `.bctb-config.json` validation
|
|
32
|
+
- **Standalone Mode**: Can run independently without VSCode extension
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **Architecture**: Refactored to use `@bctb/shared` library for core functionality
|
|
37
|
+
- **Configuration**: Migrated from environment variables to file-based config
|
|
38
|
+
- **Distribution**: Published to NPM for global installation (`npm install -g bc-telemetry-buddy-mcp`)
|
|
39
|
+
|
|
40
|
+
### Migration Notes
|
|
41
|
+
|
|
42
|
+
- See [MIGRATION.md](../../MIGRATION.md) for upgrade guide from bundled v0.2.x
|
|
43
|
+
- Extension v0.3.0+ offers automatic MCP installation and configuration
|
|
44
|
+
- Old environment variable config still supported as fallback
|
|
45
|
+
|
|
46
|
+
## [0.2.22] - 2025-11-01
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
- No MCP backend changes in this release (extension-only changes for workspace validation and configuration handling)
|
|
50
|
+
|
|
51
|
+
## [0.2.21] - 2025-10-29
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- Cache folder creation made lazy: `.vscode/.bctb/cache` is no longer created at server startup. It's created only on first cache write.
|
|
55
|
+
- `clear()` and `cleanupExpired()` now return early if the cache directory does not exist, avoiding unnecessary filesystem operations.
|
|
56
|
+
|
|
57
|
+
## [0.2.20] - 2025-10-22
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
- No MCP backend changes in this release (extension-only feature for multiple chatmodes)
|
|
61
|
+
|
|
62
|
+
## [0.2.19] - 2025-10-22
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
- No MCP backend changes in this release (extension-only fix for settings validation)
|
|
66
|
+
|
|
67
|
+
## [0.2.18] - 2025-10-22
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
- **Queries folder**: Implemented lazy creation - queries folder only created when first query is saved, not on QueriesService initialization
|
|
71
|
+
|
|
72
|
+
## [0.2.17] - 2025-10-20
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
- **Event catalog**: Improved shortMessage logic for unique event identification - converted nested iif() to case() statement with specific handlers for RT0048, LC0169, and LC0170 events to prevent duplicate eventId entries in catalog
|
|
76
|
+
|
|
77
|
+
## [0.2.16] - 2025-10-20
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
- **Release process**: Simplified release workflow - manually update package.json version and CHANGELOG, commit, then create GitHub release
|
|
81
|
+
|
|
82
|
+
## [0.2.15] - 2025-10-20
|
|
83
|
+
|
|
84
|
+
### Fixed
|
|
85
|
+
- **Release process**: Corrected release workflow to ensure version bump and CHANGELOG updates are committed together in a single atomic commit
|
|
86
|
+
|
|
87
|
+
## [0.2.14] - 2025-10-20
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
- `get_event_field_samples` tool: Analyzes customDimensions structure for specific event IDs with field types, occurrence rates, sample values, and ready-to-use KQL templates
|
|
91
|
+
- `get_event_catalog` enhancement: Added `includeCommonFields` parameter that analyzes field prevalence across events, categorizing fields into Universal (80%+), Common (50-79%), Occasional (20-49%), and Rare (<20%) with type detection and actionable recommendations
|
|
92
|
+
- Dynamic event category lookup: Analyzes event messages and metadata to determine appropriate categorization (Lifecycle, Performance, Security, Error, Integration, Configuration, Custom)
|
|
93
|
+
- Message field priority in event analysis: Enhanced custom event categorization by analyzing actual telemetry message content
|
|
94
|
+
|
|
95
|
+
### Changed
|
|
96
|
+
- **BREAKING**: Removed natural language translation from `query_telemetry` tool - removed `nl` parameter and all pattern-matching logic. Users should use discovery tools (`get_event_catalog`, `get_event_field_samples`) to understand telemetry structure before writing KQL queries
|
|
97
|
+
- `query_telemetry` now only accepts explicit KQL queries (no NL translation)
|
|
98
|
+
- Tool descriptions updated to guide users toward data-driven discovery workflow
|
|
99
|
+
|
|
100
|
+
### Fixed
|
|
101
|
+
- **First-run experience**: MCP server now starts gracefully with incomplete configuration instead of exiting with code 1, allowing setup wizard to guide new users through configuration. `validateConfig()` returns errors array instead of throwing exceptions, enabling degraded mode with helpful error messages directing users to setup wizard.
|
|
102
|
+
|
|
103
|
+
### Removed
|
|
104
|
+
- `translateNLToKQL` method and supporting pattern-matching code (unreliable keyword-based translation that misled GitHub Copilot)
|
|
105
|
+
|
|
106
|
+
## [0.2.1] - 2025-10-17
|
|
107
|
+
|
|
108
|
+
### Changed
|
|
109
|
+
- Launcher: renamed from `server.cjs` to `launcher.js` to ensure reliable VSIX packaging and installation across all VSCode versions. Preserves CommonJS semantics while using `.js` extension that VSCode handles correctly.
|
|
110
|
+
|
|
111
|
+
## [0.2.0] - 2025-10-17
|
|
112
|
+
|
|
113
|
+
### Fixed
|
|
114
|
+
- Marketplace bundling: bundle MCP server into a single `dist/server.js` (esbuild) and ensure the extension copies the bundle into `packages/extension/mcp/dist/server.js` before packaging. Fixes runtime errors in marketplace installs where MCP couldn't be found and ensures the MCP server runs without requiring separate node_modules in the published extension.
|
|
115
|
+
|
|
116
|
+
## [0.1.0] - 2025-10-15
|
|
117
|
+
|
|
118
|
+
### Added
|
|
119
|
+
- Project structure and configuration
|
|
120
|
+
- TypeScript setup with ES2022 + ESM
|
|
121
|
+
- Jest testing framework
|
|
122
|
+
- Package.json with dependencies
|
|
123
|
+
- Initial MCP backend scaffold
|
|
124
|
+
- Express server with JSON-RPC protocol support
|
|
125
|
+
- MSAL authentication (device_code and client_credentials flows)
|
|
126
|
+
- File-based caching with TTL
|
|
127
|
+
- Kusto/Application Insights query execution
|
|
128
|
+
- Saved queries management (.kql files)
|
|
129
|
+
- External references fetching (GitHub API)
|
|
130
|
+
- PII sanitization (opt-in)
|
|
131
|
+
- Recommendations engine (heuristics-based)
|