@modelcontextprotocol/inspector 0.16.8 → 0.17.1
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/cli/build/index.js +13 -4
- package/client/dist/assets/{OAuthCallback-7gQlGWPl.js → OAuthCallback-0GeGMxax.js} +1 -1
- package/client/dist/assets/{OAuthDebugCallback-67pOP7RZ.js → OAuthDebugCallback-DEQBSYMe.js} +1 -1
- package/client/dist/assets/{index-3LzLs-Yz.js → index-9_nBaufL.js} +1447 -953
- package/client/dist/assets/{index-CFrqgd8F.css → index-CV-uzqYs.css} +36 -1
- package/client/dist/index.html +2 -2
- package/package.json +4 -4
package/cli/build/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import * as fs from "fs";
|
|
2
3
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
3
4
|
import { Command } from "commander";
|
|
4
5
|
import { callTool, connect, disconnect, getPrompt, listPrompts, listResources, listResourceTemplates, listTools, readResource, setLoggingLevel, validLogLevels, } from "./client/index.js";
|
|
@@ -51,12 +52,20 @@ function createTransportOptions(target, transport, headers) {
|
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
async function callMethod(args) {
|
|
55
|
+
// Read package.json to get name and version for client identity
|
|
56
|
+
const pathA = "../package.json"; // We're in package @modelcontextprotocol/inspector-cli
|
|
57
|
+
const pathB = "../../package.json"; // We're in package @modelcontextprotocol/inspector
|
|
58
|
+
let packageJson;
|
|
59
|
+
let packageJsonData = await import(fs.existsSync(pathA) ? pathA : pathB, {
|
|
60
|
+
with: { type: "json" },
|
|
61
|
+
});
|
|
62
|
+
packageJson = packageJsonData.default;
|
|
54
63
|
const transportOptions = createTransportOptions(args.target, args.transport, args.headers);
|
|
55
64
|
const transport = createTransport(transportOptions);
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
const [, name = packageJson.name] = packageJson.name.split("/");
|
|
66
|
+
const version = packageJson.version;
|
|
67
|
+
const clientIdentity = { name, version };
|
|
68
|
+
const client = new Client(clientIdentity);
|
|
60
69
|
try {
|
|
61
70
|
await connect(client, transport);
|
|
62
71
|
let result;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-
|
|
1
|
+
import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-9_nBaufL.js";
|
|
2
2
|
const OAuthCallback = ({ onConnect }) => {
|
|
3
3
|
const { toast } = useToast();
|
|
4
4
|
const hasProcessedRef = reactExports.useRef(false);
|
package/client/dist/assets/{OAuthDebugCallback-67pOP7RZ.js → OAuthDebugCallback-DEQBSYMe.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-
|
|
1
|
+
import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-9_nBaufL.js";
|
|
2
2
|
const OAuthDebugCallback = ({ onConnect }) => {
|
|
3
3
|
reactExports.useEffect(() => {
|
|
4
4
|
let isProcessed = false;
|