bc-telemetry-buddy-mcp 3.5.2 → 3.6.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/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.6.0] - 2026-07-18
11
+
12
+ _Highest blast-radius rating across all plans landed in this release: `low-risk`._
13
+
14
+ ### Added
15
+ - **Per-workspace connections are now discoverable and selectable under Claude Code (and other roots-advertising hosts).** A workspace's own flat `.bctb-config.json` connection is discovered from `CLAUDE_PROJECT_DIR` (synchronous, checked at the opened folder and one level below — so the `…/<Customer>/TelemetryAnalysis/.bctb-config.json` layout is found) and from the MCP `roots` capability. Discovered connections appear in `list_profiles` tagged `source:"workspace"` and are selectable with `switch_profile <name>` — no global-config edit, no restart. A single globally-registered server can now query any customer workspace you open. See [docs/plans/mcp-workspace-connection-discovery.md](../../docs/plans/mcp-workspace-connection-discovery.md).
16
+ - **Opt-in auto-activation of the local connection.** Set `BCTB_AUTO_WORKSPACE_CONNECTION=true` in the server `env` and, when exactly one workspace connection is discovered, it becomes the active connection at startup (with a loud `[MCP] AUTO-ACTIVATED …` stderr line). Default is OFF; discovery never silently retargets which App Insights resource is queried (cross-tenant safety). More than one discovered connection → no auto-pick.
17
+ - **New telemetry** `TB-MCP-006` (`WorkspaceProfileSwitch`, emitted when a workspace connection is activated) and a `connectionsFound` count added to `TB-MCP-004` (`RootsDiscovery`) — both path-free.
18
+
19
+ ### Fixed
20
+ - **Switching to a workspace connection no longer strands you.** `list_profiles`/`switch_profile` are now anchored to the pinned/global config file (`baseConfigFilePath`), so after selecting a workspace connection the global profiles remain listed and switchable. Profile-switch service re-initialization is now atomic — a mid-switch failure leaves the previous connection fully intact.
21
+
10
22
  ## [3.5.2] - 2026-06-25
11
23
 
12
24
  _Highest blast-radius rating across all plans landed in this release: `low-risk`._
package/README.md CHANGED
@@ -267,6 +267,25 @@ Outside VS Code there is no extension to inject `BCTB_WORKSPACE_PATH`, so the se
267
267
 
268
268
  If knowledge can't be located, `get_knowledge` returns a diagnostic naming the exact path it looked under and why (e.g. `reason: no-workspace-config`) — so a missing Knowledge Base is debuggable rather than silent. The server also logs a `[KB]` line to stderr at startup.
269
269
 
270
+ #### Per-workspace connections (`list_profiles` / `switch_profile`)
271
+
272
+ The workspace folder(s) you open are also scanned for their own `.bctb-config.json` **connections**, so a single globally-registered server can query any customer without editing the global config. Discovered connections show up in `list_profiles` tagged `source:"workspace"` and are selectable with `switch_profile <name>` — no restart, no global-file edit. Two discovery signals feed this:
273
+
274
+ - **`CLAUDE_PROJECT_DIR`** — Claude Code sets this to the opened project root. The server checks it and one level below it (so `…/<Customer>/TelemetryAnalysis/.bctb-config.json` is found even though the config is a subfolder of the opened root). This is synchronous, so the connection is available on the very first `list_profiles` call.
275
+ - **MCP `roots`** — every advertised root is scanned the same way.
276
+
277
+ Discovered connections are keyed by the opened folder's name (e.g. `Coeck`), because most customer configs share the same `connectionName`. When two discovered connections share a name, `switch_profile` by that name returns an "ambiguous" error listing the exact keys to use instead.
278
+
279
+ **Safety — discovery never silently retargets your queries.** By default a workspace connection is only made *selectable*; the active App Insights resource changes only when *you* call `switch_profile`. To make the local connection win automatically on open, opt in with:
280
+
281
+ ```json
282
+ "env": { "BCTB_AUTO_WORKSPACE_CONNECTION": "true" }
283
+ ```
284
+
285
+ When set, and when **exactly one** workspace connection is discovered, the server activates it at startup and prints a loud `[MCP] AUTO-ACTIVATED …` line to stderr. Setting this flag means: *I accept that opening a workspace retargets which App Insights resource is queried.* With more than one connection discovered, it does nothing (ambiguous) and you pick with `switch_profile`.
286
+
287
+ > **Auth note (`azure_cli`):** switching connection changes the App Insights *resource*, not your identity — `azure_cli` uses your current `az login` session and ignores the config's `tenantId`. If a query returns 403 after switching, run `az login --tenant <tenantId>`.
288
+
270
289
  ### With Copilot Studio
271
290
 
272
291
  Register as Custom Action: