@ait-co/devtools 0.1.54-beta.0 → 0.1.54

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/dist/mcp/cli.js CHANGED
@@ -3097,26 +3097,19 @@ var InMemoryDiagnosticsCollector = class {
3097
3097
  * when the define is absent (unbundled test runs) and the runtime fallback
3098
3098
  * below also fails — diagnostics must never throw.
3099
3099
  *
3100
- * The old implementation resolved `@modelcontextprotocol/sdk/package.json` at
3101
- * runtime, but that subpath is NOT in the SDK's `exports` map, so the resolve
3102
- * threw `ERR_PACKAGE_PATH_NOT_EXPORTED` and this always returned `null` in a
3103
- * real bundle (issue #361). The build-time define sidesteps the exports gate.
3100
+ * Earlier attempts resolved `@modelcontextprotocol/sdk/package.json` (not in
3101
+ * the SDK `exports` map `ERR_PACKAGE_PATH_NOT_EXPORTED`) or the bare
3102
+ * `@modelcontextprotocol/sdk` main entry (also absent `MODULE_NOT_FOUND`),
3103
+ * so both this fallback AND the build-time define silently produced `null`
3104
+ * leaving `mcpVersion: null` in a real bundle (issue #361, observed live). The
3105
+ * fix resolves a subpath that IS exported (`./server/mcp.js`) and walks back to
3106
+ * the package root, in BOTH the build define and this fallback.
3104
3107
  *
3105
3108
  * Kept `async` for call-site compatibility (`Promise.all` at the caller); the
3106
3109
  * body is synchronous apart from the best-effort fallback.
3107
3110
  */
3108
3111
  async function readMcpSdkVersion() {
3109
- try {
3110
- const { createRequire } = await import("node:module");
3111
- const entry = createRequire(import.meta.url).resolve("@modelcontextprotocol/sdk");
3112
- const root = entry.slice(0, entry.indexOf("@modelcontextprotocol/sdk") + 25);
3113
- const { readFileSync } = await import("node:fs");
3114
- const raw = readFileSync(`${root}/package.json`, "utf8");
3115
- const parsed = JSON.parse(raw);
3116
- return typeof parsed.version === "string" ? parsed.version : null;
3117
- } catch {
3118
- return null;
3119
- }
3112
+ return "1.29.0";
3120
3113
  }
3121
3114
  /**
3122
3115
  * Returns the `@ait-co/devtools` package version injected at build time via
@@ -3124,7 +3117,7 @@ async function readMcpSdkVersion() {
3124
3117
  * some test environments that skip the build step).
3125
3118
  */
3126
3119
  function readDevtoolsVersion() {
3127
- return "0.1.54-beta.0";
3120
+ return "0.1.54";
3128
3121
  }
3129
3122
  /**
3130
3123
  * Derives the next recommended action from a completed diagnostics snapshot.
@@ -3606,7 +3599,7 @@ function createDebugServer(deps) {
3606
3599
  const collector = collectorDep ?? new InMemoryDiagnosticsCollector();
3607
3600
  const server = new Server({
3608
3601
  name: "ait-debug",
3609
- version: "0.1.54-beta.0"
3602
+ version: "0.1.54"
3610
3603
  }, { capabilities: { tools: { listChanged: true } } });
3611
3604
  server.setRequestHandler(ListToolsRequestSchema, () => {
3612
3605
  const conn = router.active;
@@ -4993,7 +4986,7 @@ function createDevServer(deps = {}) {
4993
4986
  const aitSource = deps.aitSource ?? new HttpAitSource({ stateEndpoint });
4994
4987
  const server = new Server({
4995
4988
  name: "ait-devtools",
4996
- version: "0.1.54-beta.0"
4989
+ version: "0.1.54"
4997
4990
  }, { capabilities: { tools: {} } });
4998
4991
  server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: DEV_TOOL_DEFINITIONS.map((tool) => ({ ...tool })) }));
4999
4992
  server.setRequestHandler(CallToolRequestSchema, async (request) => {