@mcpc-tech/unplugin-dev-inspector-mcp 0.0.9 → 0.0.10
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/client/dist/inspector.iife.js +342 -323
- package/dist/index.cjs +20 -3
- package/dist/index.js +20 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ let __babel_parser = require("@babel/parser");
|
|
|
42
42
|
let __vue_compiler_sfc = require("@vue/compiler-sfc");
|
|
43
43
|
let fs_promises = require("fs/promises");
|
|
44
44
|
|
|
45
|
-
//#region ../../node_modules/.pnpm/@mcpc-tech+cmcp@0.0.
|
|
45
|
+
//#region ../../node_modules/.pnpm/@mcpc-tech+cmcp@0.0.15/node_modules/@mcpc-tech/cmcp/index.mjs
|
|
46
46
|
var ClientToolResponseRequestSchema = zod.z.object({
|
|
47
47
|
method: zod.z.literal("proxy/tool_response"),
|
|
48
48
|
params: zod.z.object({
|
|
@@ -86323,8 +86323,17 @@ var ComposableMCPServer = class extends __modelcontextprotocol_sdk_server_index_
|
|
|
86323
86323
|
server: this,
|
|
86324
86324
|
toolNames: Object.keys(allTools)
|
|
86325
86325
|
});
|
|
86326
|
-
this.onclose = async () => {
|
|
86327
|
-
|
|
86326
|
+
this.onclose = async () => {
|
|
86327
|
+
await cleanupClients();
|
|
86328
|
+
await this.disposePlugins();
|
|
86329
|
+
await this.logger.info(`[${name}] Event: closed - cleaned up dependent clients and plugins`);
|
|
86330
|
+
};
|
|
86331
|
+
this.onerror = async (error$1) => {
|
|
86332
|
+
await this.logger.error(`[${name}] Event: error - ${error$1?.stack ?? String(error$1)}`);
|
|
86333
|
+
await cleanupClients();
|
|
86334
|
+
await this.disposePlugins();
|
|
86335
|
+
await this.logger.info(`[${name}] Action: cleaned up dependent clients and plugins`);
|
|
86336
|
+
};
|
|
86328
86337
|
const toolNameToDetailList = Object.entries(allTools);
|
|
86329
86338
|
const publicToolNames = this.getPublicToolNames();
|
|
86330
86339
|
const hiddenToolNames = this.getHiddenToolNames();
|
|
@@ -87897,12 +87906,20 @@ function setupAcpMiddleware(middlewares, serverContext, acpOptions) {
|
|
|
87897
87906
|
console.log(`[dev-inspector] [acp] Delaying response by ${delay}ms, agent: ${agent.name}`);
|
|
87898
87907
|
await new Promise((resolve$4) => setTimeout(resolve$4, delay));
|
|
87899
87908
|
}
|
|
87909
|
+
const abortController = new AbortController();
|
|
87910
|
+
req.on("close", () => {
|
|
87911
|
+
console.log("[dev-inspector] [acp] Client disconnected, aborting stream");
|
|
87912
|
+
abortController.abort();
|
|
87913
|
+
provider.cleanup();
|
|
87914
|
+
});
|
|
87900
87915
|
const response = (0, ai.streamText)({
|
|
87901
87916
|
model: provider.languageModel(),
|
|
87902
87917
|
includeRawChunks: true,
|
|
87903
87918
|
messages: (0, ai.convertToModelMessages)(messages),
|
|
87919
|
+
abortSignal: abortController.signal,
|
|
87904
87920
|
onError: (error$1) => {
|
|
87905
87921
|
console.error("Error occurred while streaming text:", JSON.stringify(error$1, null, 2));
|
|
87922
|
+
provider.cleanup();
|
|
87906
87923
|
},
|
|
87907
87924
|
tools: provider.tools
|
|
87908
87925
|
}).toUIMessageStreamResponse({
|
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
|
|
|
76
76
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
77
77
|
|
|
78
78
|
//#endregion
|
|
79
|
-
//#region ../../node_modules/.pnpm/@mcpc-tech+cmcp@0.0.
|
|
79
|
+
//#region ../../node_modules/.pnpm/@mcpc-tech+cmcp@0.0.15/node_modules/@mcpc-tech/cmcp/index.mjs
|
|
80
80
|
var ClientToolResponseRequestSchema = z.object({
|
|
81
81
|
method: z.literal("proxy/tool_response"),
|
|
82
82
|
params: z.object({
|
|
@@ -86357,8 +86357,17 @@ var ComposableMCPServer = class extends Server {
|
|
|
86357
86357
|
server: this,
|
|
86358
86358
|
toolNames: Object.keys(allTools)
|
|
86359
86359
|
});
|
|
86360
|
-
this.onclose = async () => {
|
|
86361
|
-
|
|
86360
|
+
this.onclose = async () => {
|
|
86361
|
+
await cleanupClients();
|
|
86362
|
+
await this.disposePlugins();
|
|
86363
|
+
await this.logger.info(`[${name}] Event: closed - cleaned up dependent clients and plugins`);
|
|
86364
|
+
};
|
|
86365
|
+
this.onerror = async (error$1) => {
|
|
86366
|
+
await this.logger.error(`[${name}] Event: error - ${error$1?.stack ?? String(error$1)}`);
|
|
86367
|
+
await cleanupClients();
|
|
86368
|
+
await this.disposePlugins();
|
|
86369
|
+
await this.logger.info(`[${name}] Action: cleaned up dependent clients and plugins`);
|
|
86370
|
+
};
|
|
86362
86371
|
const toolNameToDetailList = Object.entries(allTools);
|
|
86363
86372
|
const publicToolNames = this.getPublicToolNames();
|
|
86364
86373
|
const hiddenToolNames = this.getHiddenToolNames();
|
|
@@ -87931,12 +87940,20 @@ function setupAcpMiddleware(middlewares, serverContext, acpOptions) {
|
|
|
87931
87940
|
console.log(`[dev-inspector] [acp] Delaying response by ${delay}ms, agent: ${agent.name}`);
|
|
87932
87941
|
await new Promise((resolve$4) => setTimeout(resolve$4, delay));
|
|
87933
87942
|
}
|
|
87943
|
+
const abortController = new AbortController();
|
|
87944
|
+
req.on("close", () => {
|
|
87945
|
+
console.log("[dev-inspector] [acp] Client disconnected, aborting stream");
|
|
87946
|
+
abortController.abort();
|
|
87947
|
+
provider.cleanup();
|
|
87948
|
+
});
|
|
87934
87949
|
const response = streamText({
|
|
87935
87950
|
model: provider.languageModel(),
|
|
87936
87951
|
includeRawChunks: true,
|
|
87937
87952
|
messages: convertToModelMessages(messages),
|
|
87953
|
+
abortSignal: abortController.signal,
|
|
87938
87954
|
onError: (error$1) => {
|
|
87939
87955
|
console.error("Error occurred while streaming text:", JSON.stringify(error$1, null, 2));
|
|
87956
|
+
provider.cleanup();
|
|
87940
87957
|
},
|
|
87941
87958
|
tools: provider.tools
|
|
87942
87959
|
}).toUIMessageStreamResponse({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpc-tech/unplugin-dev-inspector-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@babel/parser": "^7.28.5",
|
|
73
73
|
"@babel/traverse": "^7.28.5",
|
|
74
74
|
"@mcpc-tech/acp-ai-provider": "^0.1.25",
|
|
75
|
-
"@mcpc-tech/cmcp": "^0.0.
|
|
75
|
+
"@mcpc-tech/cmcp": "^0.0.15",
|
|
76
76
|
"@mcpc-tech/core": "^0.3.8",
|
|
77
77
|
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
78
78
|
"@radix-ui/primitive": "^1.1.3",
|