@mcpc-tech/unplugin-dev-inspector-mcp 0.0.29 → 0.0.31

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.
@@ -87226,7 +87226,7 @@ function setupInspectorMiddleware(middlewares, config) {
87226
87226
  }
87227
87227
 
87228
87228
  //#endregion
87229
- //#region ../../node_modules/.pnpm/@mcpc-tech+acp-ai-provider@0.1.35/node_modules/@mcpc-tech/acp-ai-provider/index.mjs
87229
+ //#region ../../node_modules/.pnpm/@mcpc-tech+acp-ai-provider@0.1.37/node_modules/@mcpc-tech/acp-ai-provider/index.mjs
87230
87230
  (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
87231
87231
  function formatToolError(toolResult) {
87232
87232
  if (!toolResult || toolResult.length === 0) return "Unknown tool error";
@@ -87542,7 +87542,8 @@ function convertAiSdkMessagesToAcp(options, isFreshSession) {
87542
87542
  });
87543
87543
  isFirst = false;
87544
87544
  } else if (part.type === "tool-result") {
87545
- const resultText = JSON.stringify(part.result);
87545
+ const resultData = part.result ?? part.output;
87546
+ const resultText = JSON.stringify(resultData) ?? "null";
87546
87547
  const text$2 = isFirst ? `${prefix}${resultText} ` : resultText;
87547
87548
  contentBlocks.push({
87548
87549
  type: "text",
@@ -87672,7 +87673,7 @@ var ACPLanguageModel = class {
87672
87673
  return {
87673
87674
  toolCallId: update$1.toolCallId,
87674
87675
  toolName: update$1.title || update$1.toolCallId,
87675
- toolResult: update$1.rawOutput ?? null,
87676
+ toolResult: update$1.rawOutput ?? update$1.content ?? null,
87676
87677
  isError: update$1.status === "failed",
87677
87678
  status: update$1.status
87678
87679
  };
@@ -88003,6 +88004,7 @@ var ACPLanguageModel = class {
88003
88004
  break;
88004
88005
  }
88005
88006
  case "tool_call_update": {
88007
+ console.log(`###[acp-ai-provider] tool_call_update received:`, JSON.stringify(update$1, null, 2));
88006
88008
  const { toolCallId, toolName, toolResult, isError, status } = this.parseToolResult(update$1);
88007
88009
  let toolInfo = this.toolCallsMap.get(toolCallId);
88008
88010
  if (status === "in_progress") {
@@ -15,7 +15,7 @@ import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"
15
15
  import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
16
16
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
17
17
  import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
18
- import process$1, { cwd } from "node:process";
18
+ import process2, { cwd } from "node:process";
19
19
  import { homedir } from "os";
20
20
  import fs, { existsSync } from "fs";
21
21
  import * as http from "http";
@@ -58123,13 +58123,13 @@ var require_getMachineId_bsd$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
58123
58123
  var require_getMachineId_win$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
58124
58124
  Object.defineProperty(exports, "__esModule", { value: true });
58125
58125
  exports.getMachineId = void 0;
58126
- const process$5 = __require("process");
58126
+ const process$4 = __require("process");
58127
58127
  const execAsync_1 = require_execAsync$1();
58128
58128
  const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
58129
58129
  async function getMachineId() {
58130
58130
  const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
58131
58131
  let command = "%windir%\\System32\\REG.exe";
58132
- if (process$5.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process$5.env) command = "%windir%\\sysnative\\cmd.exe /c " + command;
58132
+ if (process$4.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process$4.env) command = "%windir%\\sysnative\\cmd.exe /c " + command;
58133
58133
  try {
58134
58134
  const parts = (await (0, execAsync_1.execAsync)(`${command} ${args}`)).stdout.split("REG_SZ");
58135
58135
  if (parts.length === 2) return parts[1].trim();
@@ -58159,10 +58159,10 @@ var require_getMachineId_unsupported$1 = /* @__PURE__ */ __commonJSMin(((exports
58159
58159
  var require_getMachineId$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
58160
58160
  Object.defineProperty(exports, "__esModule", { value: true });
58161
58161
  exports.getMachineId = void 0;
58162
- const process$4 = __require("process");
58162
+ const process$3 = __require("process");
58163
58163
  let getMachineId;
58164
58164
  exports.getMachineId = getMachineId;
58165
- switch (process$4.platform) {
58165
+ switch (process$3.platform) {
58166
58166
  case "darwin":
58167
58167
  exports.getMachineId = getMachineId = require_getMachineId_darwin$1().getMachineId;
58168
58168
  break;
@@ -66275,13 +66275,13 @@ var require_getMachineId_bsd = /* @__PURE__ */ __commonJSMin(((exports) => {
66275
66275
  var require_getMachineId_win = /* @__PURE__ */ __commonJSMin(((exports) => {
66276
66276
  Object.defineProperty(exports, "__esModule", { value: true });
66277
66277
  exports.getMachineId = void 0;
66278
- const process$3 = __require("process");
66278
+ const process$2 = __require("process");
66279
66279
  const execAsync_1 = require_execAsync();
66280
66280
  const api_1 = (init_esm$2(), __toCommonJS(esm_exports$2));
66281
66281
  async function getMachineId() {
66282
66282
  const args = "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid";
66283
66283
  let command = "%windir%\\System32\\REG.exe";
66284
- if (process$3.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process$3.env) command = "%windir%\\sysnative\\cmd.exe /c " + command;
66284
+ if (process$2.arch === "ia32" && "PROCESSOR_ARCHITEW6432" in process$2.env) command = "%windir%\\sysnative\\cmd.exe /c " + command;
66285
66285
  try {
66286
66286
  const parts = (await (0, execAsync_1.execAsync)(`${command} ${args}`)).stdout.split("REG_SZ");
66287
66287
  if (parts.length === 2) return parts[1].trim();
@@ -66311,10 +66311,10 @@ var require_getMachineId_unsupported = /* @__PURE__ */ __commonJSMin(((exports)
66311
66311
  var require_getMachineId = /* @__PURE__ */ __commonJSMin(((exports) => {
66312
66312
  Object.defineProperty(exports, "__esModule", { value: true });
66313
66313
  exports.getMachineId = void 0;
66314
- const process$2 = __require("process");
66314
+ const process$1 = __require("process");
66315
66315
  let getMachineId;
66316
66316
  exports.getMachineId = getMachineId;
66317
- switch (process$2.platform) {
66317
+ switch (process$1.platform) {
66318
66318
  case "darwin":
66319
66319
  exports.getMachineId = getMachineId = require_getMachineId_darwin().getMachineId;
66320
66320
  break;
@@ -83385,7 +83385,7 @@ function parseTags(htmlString, tags) {
83385
83385
  }
83386
83386
  new TextEncoder();
83387
83387
  TransformStream;
83388
- var GEMINI_PREFERRED_FORMAT = process$1.env.GEMINI_PREFERRED_FORMAT === "0" ? false : true;
83388
+ var GEMINI_PREFERRED_FORMAT = process2.env.GEMINI_PREFERRED_FORMAT === "0" ? false : true;
83389
83389
  function sanitizePropertyKey(name) {
83390
83390
  return name.replace(/[@.,/\\:;!?#$%^&*()[\]{}]/g, "_").substring(0, 64);
83391
83391
  }
@@ -83439,7 +83439,7 @@ function createTransport(def) {
83439
83439
  command: defAny.command,
83440
83440
  args: defAny.args,
83441
83441
  env: {
83442
- ...process$1.env,
83442
+ ...process2.env,
83443
83443
  ...defAny.env ?? {}
83444
83444
  },
83445
83445
  cwd: cwd()
@@ -83504,11 +83504,11 @@ var cleanupAllPooledClients = async () => {
83504
83504
  }
83505
83505
  }));
83506
83506
  };
83507
- process$1.once?.("exit", () => {
83507
+ process2.once?.("exit", () => {
83508
83508
  cleanupAllPooledClients();
83509
83509
  });
83510
- process$1.once?.("SIGINT", () => {
83511
- cleanupAllPooledClients().finally(() => process$1.exit(0));
83510
+ process2.once?.("SIGINT", () => {
83511
+ cleanupAllPooledClients().finally(() => process2.exit(0));
83512
83512
  });
83513
83513
  async function composeMcpDepTools(mcpConfig, filterIn) {
83514
83514
  const allTools = {};
@@ -84068,12 +84068,12 @@ var AgenticExecutor = class {
84068
84068
  this.tracingEnabled = false;
84069
84069
  this.logger = createLogger(`mcpc.agentic.${name}`, server);
84070
84070
  try {
84071
- this.tracingEnabled = process$1.env.MCPC_TRACING_ENABLED === "true";
84071
+ this.tracingEnabled = process2.env.MCPC_TRACING_ENABLED === "true";
84072
84072
  if (this.tracingEnabled) initializeTracing({
84073
84073
  enabled: true,
84074
84074
  serviceName: `mcpc-agentic-${name}`,
84075
- exportTo: process$1.env.MCPC_TRACING_EXPORT ?? "otlp",
84076
- otlpEndpoint: process$1.env.MCPC_TRACING_OTLP_ENDPOINT ?? "http://localhost:4318/v1/traces"
84075
+ exportTo: process2.env.MCPC_TRACING_EXPORT ?? "otlp",
84076
+ otlpEndpoint: process2.env.MCPC_TRACING_OTLP_ENDPOINT ?? "http://localhost:4318/v1/traces"
84077
84077
  });
84078
84078
  } catch {
84079
84079
  this.tracingEnabled = false;
@@ -85006,10 +85006,10 @@ var BaseSamplingExecutor = class {
85006
85006
  this.logger = createLogger(`mcpc.sampling.${name}`, server);
85007
85007
  try {
85008
85008
  const tracingConfig = {
85009
- enabled: process$1.env.MCPC_TRACING_ENABLED === "true",
85009
+ enabled: process2.env.MCPC_TRACING_ENABLED === "true",
85010
85010
  serviceName: `mcpc-sampling-${name}`,
85011
- exportTo: process$1.env.MCPC_TRACING_EXPORT ?? "otlp",
85012
- otlpEndpoint: process$1.env.MCPC_TRACING_OTLP_ENDPOINT ?? "http://localhost:4318/v1/traces"
85011
+ exportTo: process2.env.MCPC_TRACING_EXPORT ?? "otlp",
85012
+ otlpEndpoint: process2.env.MCPC_TRACING_OTLP_ENDPOINT ?? "http://localhost:4318/v1/traces"
85013
85013
  };
85014
85014
  this.tracingEnabled = tracingConfig.enabled;
85015
85015
  if (this.tracingEnabled) initializeTracing(tracingConfig);
@@ -86415,10 +86415,10 @@ var ComposableMCPServer = class extends Server {
86415
86415
  if (!await this.pluginManager.triggerRegisterAgentTool(context2)) throw new Error(`No plugin registered to handle execution mode "${mode}". Did you override the default mode plugin, but in the wrong way?`);
86416
86416
  }
86417
86417
  };
86418
- var isSCF = () => Boolean(process$1.env.SCF_RUNTIME || process$1.env.PROD_SCF);
86418
+ var isSCF = () => Boolean(process2.env.SCF_RUNTIME || process2.env.PROD_SCF);
86419
86419
  if (isSCF()) console.log({
86420
86420
  isSCF: isSCF(),
86421
- SCF_RUNTIME: process$1.env.SCF_RUNTIME
86421
+ SCF_RUNTIME: process2.env.SCF_RUNTIME
86422
86422
  });
86423
86423
  function parseMcpcConfigs(conf) {
86424
86424
  return conf ?? [];
@@ -87261,7 +87261,7 @@ function setupInspectorMiddleware(middlewares, config) {
87261
87261
  }
87262
87262
 
87263
87263
  //#endregion
87264
- //#region ../../node_modules/.pnpm/@mcpc-tech+acp-ai-provider@0.1.35/node_modules/@mcpc-tech/acp-ai-provider/index.mjs
87264
+ //#region ../../node_modules/.pnpm/@mcpc-tech+acp-ai-provider@0.1.37/node_modules/@mcpc-tech/acp-ai-provider/index.mjs
87265
87265
  createRequire(import.meta.url);
87266
87266
  function formatToolError(toolResult) {
87267
87267
  if (!toolResult || toolResult.length === 0) return "Unknown tool error";
@@ -87577,7 +87577,8 @@ function convertAiSdkMessagesToAcp(options, isFreshSession) {
87577
87577
  });
87578
87578
  isFirst = false;
87579
87579
  } else if (part.type === "tool-result") {
87580
- const resultText = JSON.stringify(part.result);
87580
+ const resultData = part.result ?? part.output;
87581
+ const resultText = JSON.stringify(resultData) ?? "null";
87581
87582
  const text$2 = isFirst ? `${prefix}${resultText} ` : resultText;
87582
87583
  contentBlocks.push({
87583
87584
  type: "text",
@@ -87707,7 +87708,7 @@ var ACPLanguageModel = class {
87707
87708
  return {
87708
87709
  toolCallId: update$1.toolCallId,
87709
87710
  toolName: update$1.title || update$1.toolCallId,
87710
- toolResult: update$1.rawOutput ?? null,
87711
+ toolResult: update$1.rawOutput ?? update$1.content ?? null,
87711
87712
  isError: update$1.status === "failed",
87712
87713
  status: update$1.status
87713
87714
  };
@@ -87728,7 +87729,7 @@ var ACPLanguageModel = class {
87728
87729
  async connectClient() {
87729
87730
  if (this.connection) return;
87730
87731
  if (!this.agentProcess) {
87731
- const sessionCwd = this.config.session?.cwd || (typeof process$1.cwd === "function" ? process$1.cwd() : "/");
87732
+ const sessionCwd = this.config.session?.cwd || (typeof process2.cwd === "function" ? process2.cwd() : "/");
87732
87733
  this.agentProcess = spawn(this.config.command, this.config.args ?? [], {
87733
87734
  stdio: [
87734
87735
  "pipe",
@@ -87736,7 +87737,7 @@ var ACPLanguageModel = class {
87736
87737
  "inherit"
87737
87738
  ],
87738
87739
  env: {
87739
- ...process$1.env,
87740
+ ...process2.env,
87740
87741
  ...this.config.env
87741
87742
  },
87742
87743
  cwd: sessionCwd
@@ -87787,7 +87788,7 @@ var ACPLanguageModel = class {
87787
87788
  console.log("[acp-ai-provider] Updating session to include new tools...");
87788
87789
  this.sessionResponse = await this.connection.newSession({
87789
87790
  ...this.config.session,
87790
- cwd: this.config.session?.cwd ?? process$1.cwd(),
87791
+ cwd: this.config.session?.cwd ?? process2.cwd(),
87791
87792
  mcpServers
87792
87793
  });
87793
87794
  this.sessionId = this.sessionResponse.sessionId;
@@ -87799,7 +87800,7 @@ var ACPLanguageModel = class {
87799
87800
  if (this.config.existingSessionId) {
87800
87801
  await this.connection.loadSession({
87801
87802
  sessionId: this.config.existingSessionId,
87802
- cwd: this.config.session?.cwd ?? process$1.cwd(),
87803
+ cwd: this.config.session?.cwd ?? process2.cwd(),
87803
87804
  mcpServers
87804
87805
  });
87805
87806
  this.sessionId = this.config.existingSessionId;
@@ -87808,7 +87809,7 @@ var ACPLanguageModel = class {
87808
87809
  } else {
87809
87810
  this.sessionResponse = await this.connection.newSession({
87810
87811
  ...this.config.session,
87811
- cwd: this.config.session?.cwd ?? process$1.cwd(),
87812
+ cwd: this.config.session?.cwd ?? process2.cwd(),
87812
87813
  mcpServers
87813
87814
  });
87814
87815
  this.sessionId = this.sessionResponse.sessionId;
@@ -88038,6 +88039,7 @@ var ACPLanguageModel = class {
88038
88039
  break;
88039
88040
  }
88040
88041
  case "tool_call_update": {
88042
+ console.log(`###[acp-ai-provider] tool_call_update received:`, JSON.stringify(update$1, null, 2));
88041
88043
  const { toolCallId, toolName, toolResult, isError, status } = this.parseToolResult(update$1);
88042
88044
  let toolInfo = this.toolCallsMap.get(toolCallId);
88043
88045
  if (status === "in_progress") {
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as unplugin1 from "unplugin";
1
+ import * as unplugin0 from "unplugin";
2
2
 
3
3
  //#region src/utils/config-updater.d.ts
4
4
  type EditorId = "cursor" | "vscode" | "windsurf" | "claude-code" | "antigravity";
@@ -134,10 +134,10 @@ interface DevInspectorOptions extends McpConfigOptions, AcpOptions {
134
134
  }
135
135
  //#endregion
136
136
  //#region src/core.d.ts
137
- declare const unplugin: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
137
+ declare const unplugin: unplugin0.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
138
138
  //#endregion
139
139
  //#region src/core-external.d.ts
140
- declare const unpluginExternal: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
140
+ declare const unpluginExternal: unplugin0.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
141
141
  //#endregion
142
142
  //#region src/turbopack.d.ts
143
143
  interface TurbopackDevInspectorOptions extends DevInspectorOptions {
@@ -162,7 +162,7 @@ interface TurbopackDevInspectorOptions extends DevInspectorOptions {
162
162
  declare function turbopackDevInspector(options?: TurbopackDevInspectorOptions): any;
163
163
  //#endregion
164
164
  //#region src/index.d.ts
165
- declare const external: unplugin1.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
165
+ declare const external: unplugin0.UnpluginInstance<DevInspectorOptions | undefined, boolean>;
166
166
  declare module "virtual:dev-inspector-mcp" {}
167
167
  //#endregion
168
168
  export { type CustomEditorConfig, type DevInspectorOptions, type EditorId, type McpConfigOptions, type TurbopackDevInspectorOptions, unplugin as default, unplugin, external, turbopackDevInspector, unpluginExternal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpc-tech/unplugin-dev-inspector-mcp",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "description": "Universal dev inspector plugin for React/Vue - inspect component sources and API calls in any bundler",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -113,7 +113,7 @@
113
113
  "@babel/parser": "^7.28.5",
114
114
  "@babel/traverse": "^7.28.5",
115
115
  "@code-inspector/core": "^1.3.0",
116
- "@mcpc-tech/acp-ai-provider": "^0.1.35",
116
+ "@mcpc-tech/acp-ai-provider": "^0.1.37",
117
117
  "@mcpc-tech/cmcp": "^0.0.15",
118
118
  "@mcpc-tech/core": "^0.3.8",
119
119
  "@modelcontextprotocol/sdk": "^1.20.1",