@mcpjam/inspector 3.9.0 → 3.9.2
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/client/assets/{dead-clicks-autocapture-CNJuzPMk.js → dead-clicks-autocapture-IiM_E33e.js} +2 -2
- package/dist/client/assets/{exception-autocapture-DH5ChuHD.js → exception-autocapture-ho2DsZUp.js} +2 -2
- package/dist/client/assets/{highlighted-body-OFNGDK62-B2ukPAhe.js → highlighted-body-OFNGDK62-CL4BGpKx.js} +2 -2
- package/dist/client/assets/{index-Ch7H8snb.js → index-CgVx6LGA.js} +461 -461
- package/dist/client/assets/index-DIFWovxF.css +1 -0
- package/dist/client/assets/{jszip.min-Bo-LuHPU.js → jszip.min-DbrVI1cf.js} +2 -2
- package/dist/client/assets/{posthog-recorder-CI77OSZn.js → posthog-recorder-Jn9DbeVC.js} +2 -2
- package/dist/client/assets/{surveys-DXwx55S-.js → surveys-DGrFiWaS.js} +2 -2
- package/dist/client/assets/{web-vitals-Dr9EFnoG.js → web-vitals-BAEPtyOe.js} +2 -2
- package/dist/client/index.html +2 -2
- package/dist/server/{chunk-RRGPQWGQ.js → chunk-KOQ26LF3.js} +9 -3
- package/dist/server/{chunk-PVTMGID7.js → chunk-TGJCY2WD.js} +2 -2
- package/dist/server/{consent-lifetime-RZJBI5QR.js → consent-lifetime-T4A66FLH.js} +2 -2
- package/dist/server/harness-install-cli.js +1 -1
- package/dist/server/index.js +121 -85
- package/package.json +2 -2
- package/dist/client/assets/index-B_RuD2so.css +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createBrowserConsentLifetime,
|
|
3
3
|
invalidateBrowserConsentLifetimes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KOQ26LF3.js";
|
|
5
5
|
import "./chunk-PZ5AY32C.js";
|
|
6
6
|
export {
|
|
7
7
|
createBrowserConsentLifetime,
|
|
8
8
|
invalidateBrowserConsentLifetimes
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=consent-lifetime-
|
|
10
|
+
//# sourceMappingURL=consent-lifetime-T4A66FLH.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -35,11 +35,12 @@ import {
|
|
|
35
35
|
supportsOwnershipProof,
|
|
36
36
|
terminateOwnedProcess,
|
|
37
37
|
terminateOwnedProcessGroup
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-TGJCY2WD.js";
|
|
39
39
|
import {
|
|
40
40
|
ALLOWED_HOSTS,
|
|
41
41
|
BROWSER_CONSENT_HEADER,
|
|
42
42
|
CANIUSE_LANDING_HOSTS,
|
|
43
|
+
CORS_OPTIONS,
|
|
43
44
|
CORS_ORIGINS,
|
|
44
45
|
ELICITATION_FORM_TTL_MS,
|
|
45
46
|
ELICITATION_POLL_INTERVAL_MS,
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
webmcpInspectorHostedEnabled,
|
|
94
95
|
webmcpInspectorReachable,
|
|
95
96
|
webmcpPageToolsMode
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-KOQ26LF3.js";
|
|
97
98
|
import {
|
|
98
99
|
__export
|
|
99
100
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -2243,18 +2244,6 @@ __export(evaluate_exports, {
|
|
|
2243
2244
|
finalMessageEndsWithQuestion: () => finalMessageEndsWithQuestion
|
|
2244
2245
|
});
|
|
2245
2246
|
|
|
2246
|
-
// ../evaluators/dist/chunk-I4CRERJV.js
|
|
2247
|
-
var PROBE = "__predicate_arg_probe__";
|
|
2248
|
-
function argMatch(matcher, actualArgs) {
|
|
2249
|
-
const argumentMatching = matcher.argumentMatching ?? "partial";
|
|
2250
|
-
const result = evaluateToolCalls(
|
|
2251
|
-
[{ toolName: PROBE, arguments: matcher.args ?? {} }],
|
|
2252
|
-
[{ toolName: PROBE, arguments: actualArgs ?? {} }],
|
|
2253
|
-
{ argumentMatching }
|
|
2254
|
-
);
|
|
2255
|
-
return result.passed;
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
2247
|
// ../evaluators/dist/chunk-PYTZA5U2.js
|
|
2259
2248
|
import { Validator } from "@cfworker/json-schema";
|
|
2260
2249
|
var DRAFT_2020_12_URIS = /* @__PURE__ */ new Set([
|
|
@@ -2329,7 +2318,19 @@ function validateAgainstSchema(schema, instance) {
|
|
|
2329
2318
|
}
|
|
2330
2319
|
}
|
|
2331
2320
|
|
|
2332
|
-
// ../evaluators/dist/chunk-
|
|
2321
|
+
// ../evaluators/dist/chunk-I4CRERJV.js
|
|
2322
|
+
var PROBE = "__predicate_arg_probe__";
|
|
2323
|
+
function argMatch(matcher, actualArgs) {
|
|
2324
|
+
const argumentMatching = matcher.argumentMatching ?? "partial";
|
|
2325
|
+
const result = evaluateToolCalls(
|
|
2326
|
+
[{ toolName: PROBE, arguments: matcher.args ?? {} }],
|
|
2327
|
+
[{ toolName: PROBE, arguments: actualArgs ?? {} }],
|
|
2328
|
+
{ argumentMatching }
|
|
2329
|
+
);
|
|
2330
|
+
return result.passed;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
// ../evaluators/dist/chunk-YNFR3VPW.js
|
|
2333
2334
|
var MAX_VALUE_CHARS = 200;
|
|
2334
2335
|
var MAX_ERROR_MSG_CHARS = 200;
|
|
2335
2336
|
var MAX_ITEMS_SHOWN = 3;
|
|
@@ -3800,7 +3801,7 @@ __export(predicate_scorer_exports, {
|
|
|
3800
3801
|
predicateScorer: () => predicateScorer
|
|
3801
3802
|
});
|
|
3802
3803
|
|
|
3803
|
-
// ../evaluators/dist/chunk-
|
|
3804
|
+
// ../evaluators/dist/chunk-LICJIDQY.js
|
|
3804
3805
|
function assertLocallyEvaluable(predicate) {
|
|
3805
3806
|
if (!requiresRenderObservations(predicate.type)) return;
|
|
3806
3807
|
throw new Error(
|
|
@@ -3878,7 +3879,7 @@ function toEvaluatorRawOutcome(outcome) {
|
|
|
3878
3879
|
};
|
|
3879
3880
|
}
|
|
3880
3881
|
|
|
3881
|
-
// ../evaluators/dist/chunk-
|
|
3882
|
+
// ../evaluators/dist/chunk-K67IGSPF.js
|
|
3882
3883
|
function assertLocallyEvaluable2(rule) {
|
|
3883
3884
|
if (!requiresRenderObservations(rule.type)) return;
|
|
3884
3885
|
throw new Error(
|
|
@@ -11092,9 +11093,10 @@ function wrapFetchForHttpLogging(serverId, logger3, fetchFn) {
|
|
|
11092
11093
|
});
|
|
11093
11094
|
}
|
|
11094
11095
|
var RefreshTokenOAuthProvider = class {
|
|
11095
|
-
constructor(_clientId, refreshToken, _clientSecret) {
|
|
11096
|
+
constructor(_clientId, refreshToken, _clientSecret, _onTokensRotated) {
|
|
11096
11097
|
this._clientId = _clientId;
|
|
11097
11098
|
this._clientSecret = _clientSecret;
|
|
11099
|
+
this._onTokensRotated = _onTokensRotated;
|
|
11098
11100
|
this.currentRefreshToken = refreshToken;
|
|
11099
11101
|
}
|
|
11100
11102
|
currentRefreshToken;
|
|
@@ -11111,10 +11113,20 @@ var RefreshTokenOAuthProvider = class {
|
|
|
11111
11113
|
tokens() {
|
|
11112
11114
|
return this.currentTokens;
|
|
11113
11115
|
}
|
|
11114
|
-
saveTokens(tokens) {
|
|
11116
|
+
async saveTokens(tokens) {
|
|
11115
11117
|
this.currentTokens = tokens;
|
|
11116
|
-
if (tokens.refresh_token)
|
|
11117
|
-
|
|
11118
|
+
if (!tokens.refresh_token) return;
|
|
11119
|
+
const rotated = tokens.refresh_token !== this.currentRefreshToken;
|
|
11120
|
+
this.currentRefreshToken = tokens.refresh_token;
|
|
11121
|
+
if (!rotated || !this._onTokensRotated) return;
|
|
11122
|
+
try {
|
|
11123
|
+
await this._onTokensRotated({
|
|
11124
|
+
refreshToken: tokens.refresh_token,
|
|
11125
|
+
// A copy: a handler must not be able to mutate the token set this
|
|
11126
|
+
// provider is still holding.
|
|
11127
|
+
tokens: { ...tokens }
|
|
11128
|
+
});
|
|
11129
|
+
} catch {
|
|
11118
11130
|
}
|
|
11119
11131
|
}
|
|
11120
11132
|
prepareTokenRequest() {
|
|
@@ -16515,7 +16527,8 @@ var MCPClientManager = class {
|
|
|
16515
16527
|
effectiveAuthProvider = new RefreshTokenOAuthProvider(
|
|
16516
16528
|
trimmedClientId,
|
|
16517
16529
|
trimmedRefresh,
|
|
16518
|
-
trimmedClientSecret
|
|
16530
|
+
trimmedClientSecret,
|
|
16531
|
+
config.onTokensRotated
|
|
16519
16532
|
);
|
|
16520
16533
|
state.authProvider = effectiveAuthProvider instanceof RefreshTokenOAuthProvider ? effectiveAuthProvider : void 0;
|
|
16521
16534
|
effectiveAccessToken = void 0;
|
|
@@ -26466,7 +26479,7 @@ var noopPosthog = {
|
|
|
26466
26479
|
var posthog = isTelemetryDisabled ? noopPosthog : new PostHog("phc_dTOPniyUNU2kD8Jx8yHMXSqiZHM8I91uWopTMX6EBE9", {
|
|
26467
26480
|
host: "https://us.i.posthog.com"
|
|
26468
26481
|
});
|
|
26469
|
-
var SDK_VERSION = "8.
|
|
26482
|
+
var SDK_VERSION = "8.13.0";
|
|
26470
26483
|
var SDK_RELEASE = `@mcpjam/sdk@${SDK_VERSION}`;
|
|
26471
26484
|
var CAPTURED_ERROR_SYMBOL = Symbol.for("@mcpjam/sdk/captured-eval-error");
|
|
26472
26485
|
init_internal();
|
|
@@ -26477,7 +26490,7 @@ init_eval_tool_execution();
|
|
|
26477
26490
|
init_internal();
|
|
26478
26491
|
init_internal();
|
|
26479
26492
|
function readSdkVersion() {
|
|
26480
|
-
return "8.
|
|
26493
|
+
return "8.13.0";
|
|
26481
26494
|
}
|
|
26482
26495
|
var DEFAULT_PLATFORM_USER_AGENT = `mcpjam-sdk/${readSdkVersion()}`;
|
|
26483
26496
|
init_HostRunner();
|
|
@@ -73937,7 +73950,7 @@ var ERROR_CATALOG = {
|
|
|
73937
73950
|
[
|
|
73938
73951
|
"Disable progressive tool discovery for this server, or move headers into the server config."
|
|
73939
73952
|
],
|
|
73940
|
-
"paginated-tool-header-discovery-unsupported",
|
|
73953
|
+
"paginated-tool-and-header-discovery-unsupported",
|
|
73941
73954
|
"warning"
|
|
73942
73955
|
),
|
|
73943
73956
|
// --- Provider / sampling ---
|
|
@@ -73989,7 +74002,7 @@ var ERROR_CATALOG = {
|
|
|
73989
74002
|
// have no BYOK path, so adding a key does nothing for them.
|
|
73990
74003
|
"Your own API key covers supported model inference. MCPJam features can still require credits; Swarm generation and persona turns always do."
|
|
73991
74004
|
],
|
|
73992
|
-
"
|
|
74005
|
+
"out-of-mcpjam-credits",
|
|
73993
74006
|
"warning"
|
|
73994
74007
|
),
|
|
73995
74008
|
"provider/mcpjam_limit_monthly": entry(
|
|
@@ -74004,7 +74017,7 @@ var ERROR_CATALOG = {
|
|
|
74004
74017
|
"Wait for the billing period to renew.",
|
|
74005
74018
|
"Your own API key covers supported model inference. MCPJam features can still require credits; Swarm generation and persona turns always do."
|
|
74006
74019
|
],
|
|
74007
|
-
"
|
|
74020
|
+
"out-of-mcpjam-credits",
|
|
74008
74021
|
"warning"
|
|
74009
74022
|
),
|
|
74010
74023
|
"provider/mcpjam_platform_budget": entry(
|
|
@@ -74037,7 +74050,7 @@ var ERROR_CATALOG = {
|
|
|
74037
74050
|
"Wait for the allowance to reset.",
|
|
74038
74051
|
"Your own API key covers supported model inference. MCPJam features can still require credits; Swarm generation and persona turns always do."
|
|
74039
74052
|
],
|
|
74040
|
-
"
|
|
74053
|
+
"out-of-mcpjam-credits",
|
|
74041
74054
|
"warning"
|
|
74042
74055
|
),
|
|
74043
74056
|
"provider/quota": entry(
|
|
@@ -74329,8 +74342,8 @@ function classifyHttpStatus(status) {
|
|
|
74329
74342
|
return void 0;
|
|
74330
74343
|
}
|
|
74331
74344
|
function classifyByMessageHttp(message) {
|
|
74332
|
-
if (
|
|
74333
|
-
if (
|
|
74345
|
+
if (/(?:^|[^\w.:])401\b/.test(message)) return "auth/http_401";
|
|
74346
|
+
if (/(?:^|[^\w.:])403\b/.test(message)) return "auth/http_403";
|
|
74334
74347
|
if (/(?:^|[^\w.:])429\b|too many requests/i.test(message))
|
|
74335
74348
|
return "provider/quota";
|
|
74336
74349
|
return void 0;
|
|
@@ -74372,7 +74385,7 @@ function resolveSlug(error) {
|
|
|
74372
74385
|
if (/\bout of MCPJam credits\b/i.test(message)) return { slug: "provider/mcpjam_limit" };
|
|
74373
74386
|
const limitSlug = mcpjamLimitSlugForMessage(message);
|
|
74374
74387
|
if (limitSlug) return { slug: limitSlug };
|
|
74375
|
-
const httpStatus2 =
|
|
74388
|
+
const httpStatus2 = httpStatusOf(error);
|
|
74376
74389
|
if (httpStatus2 !== void 0) {
|
|
74377
74390
|
const slug = classifyHttpStatus(httpStatus2);
|
|
74378
74391
|
if (slug) return { slug, rawCode: httpStatus2 };
|
|
@@ -74847,7 +74860,7 @@ function mergeConnectionToolsets(perKey, connectionsByServerId, options) {
|
|
|
74847
74860
|
(t) => asSchema(t.inputSchema).jsonSchema
|
|
74848
74861
|
);
|
|
74849
74862
|
const canMerge = schemas.every(
|
|
74850
|
-
(s) => s?.type === "object" && !Object.hasOwn(s.properties ?? {}, "
|
|
74863
|
+
(s) => s?.type === "object" && !Object.hasOwn(s.properties ?? {}, "link_id") && canonical2(s) === canonical2(schemas[0])
|
|
74851
74864
|
);
|
|
74852
74865
|
if (!canMerge) {
|
|
74853
74866
|
for (const connection of choices) {
|
|
@@ -74881,24 +74894,24 @@ function mergeConnectionToolsets(perKey, connectionsByServerId, options) {
|
|
|
74881
74894
|
output[name15] = {
|
|
74882
74895
|
...baseTool,
|
|
74883
74896
|
description: `${baseTool.description ?? ""}
|
|
74884
|
-
Connected accounts: ${choices.map((c) => `${c.label} (
|
|
74897
|
+
Connected accounts: ${choices.map((c) => `${c.label} (link_id=${c.connectionId})`).join("; ")}`,
|
|
74885
74898
|
inputSchema: jsonSchema({
|
|
74886
74899
|
...schemas[0],
|
|
74887
74900
|
properties: {
|
|
74888
74901
|
...schemas[0].properties,
|
|
74889
|
-
|
|
74902
|
+
link_id: {
|
|
74890
74903
|
type: "string",
|
|
74891
74904
|
enum: choices.map((c) => c.connectionId)
|
|
74892
74905
|
}
|
|
74893
74906
|
},
|
|
74894
|
-
required: [...schemas[0].required ?? [], "
|
|
74907
|
+
required: [...schemas[0].required ?? [], "link_id"]
|
|
74895
74908
|
}),
|
|
74896
74909
|
execute: async (input, opts) => {
|
|
74897
74910
|
const connection = choices.find(
|
|
74898
|
-
(c) => c.connectionId === input?.
|
|
74911
|
+
(c) => c.connectionId === input?.link_id && options.snapshot.get(c.connectionId) === c.key
|
|
74899
74912
|
);
|
|
74900
74913
|
if (!connection) return invalidAccount();
|
|
74901
|
-
const {
|
|
74914
|
+
const { link_id: _linkId, ...args } = input;
|
|
74902
74915
|
const tool19 = perKey[connection.key][name15];
|
|
74903
74916
|
selected.set(opts.toolCallId, { tool: tool19, connection, input: args });
|
|
74904
74917
|
options.onRoute?.(opts.toolCallId, connection);
|
|
@@ -74914,7 +74927,7 @@ Connected accounts: ${choices.map((c) => `${c.label} (account=${c.connectionId})
|
|
|
74914
74927
|
};
|
|
74915
74928
|
return route.tool.toModelOutput ? route.tool.toModelOutput({ ...opts, input: route.input }) : { type: "json", value: opts.output };
|
|
74916
74929
|
},
|
|
74917
|
-
_connectionForInput: (input) => choices.find((c) => c.connectionId === input?.
|
|
74930
|
+
_connectionForInput: (input) => choices.find((c) => c.connectionId === input?.link_id),
|
|
74918
74931
|
_connectionForCall: (id3) => selected.get(id3)?.connection,
|
|
74919
74932
|
_serverId: serverId,
|
|
74920
74933
|
_mcpToolName: name15,
|
|
@@ -82954,7 +82967,7 @@ var ERROR_CATALOG2 = {
|
|
|
82954
82967
|
[
|
|
82955
82968
|
"Disable progressive tool discovery for this server, or move headers into the server config."
|
|
82956
82969
|
],
|
|
82957
|
-
"paginated-tool-header-discovery-unsupported",
|
|
82970
|
+
"paginated-tool-and-header-discovery-unsupported",
|
|
82958
82971
|
"warning"
|
|
82959
82972
|
),
|
|
82960
82973
|
// --- Provider / sampling ---
|
|
@@ -83006,7 +83019,7 @@ var ERROR_CATALOG2 = {
|
|
|
83006
83019
|
// have no BYOK path, so adding a key does nothing for them.
|
|
83007
83020
|
"Your own API key covers supported model inference. MCPJam features can still require credits; Swarm generation and persona turns always do."
|
|
83008
83021
|
],
|
|
83009
|
-
"
|
|
83022
|
+
"out-of-mcpjam-credits",
|
|
83010
83023
|
"warning"
|
|
83011
83024
|
),
|
|
83012
83025
|
"provider/mcpjam_limit_monthly": entry2(
|
|
@@ -83021,7 +83034,7 @@ var ERROR_CATALOG2 = {
|
|
|
83021
83034
|
"Wait for the billing period to renew.",
|
|
83022
83035
|
"Your own API key covers supported model inference. MCPJam features can still require credits; Swarm generation and persona turns always do."
|
|
83023
83036
|
],
|
|
83024
|
-
"
|
|
83037
|
+
"out-of-mcpjam-credits",
|
|
83025
83038
|
"warning"
|
|
83026
83039
|
),
|
|
83027
83040
|
"provider/mcpjam_platform_budget": entry2(
|
|
@@ -83054,7 +83067,7 @@ var ERROR_CATALOG2 = {
|
|
|
83054
83067
|
"Wait for the allowance to reset.",
|
|
83055
83068
|
"Your own API key covers supported model inference. MCPJam features can still require credits; Swarm generation and persona turns always do."
|
|
83056
83069
|
],
|
|
83057
|
-
"
|
|
83070
|
+
"out-of-mcpjam-credits",
|
|
83058
83071
|
"warning"
|
|
83059
83072
|
),
|
|
83060
83073
|
"provider/quota": entry2(
|
|
@@ -83900,7 +83913,7 @@ var NEGATIVE_TEST_MODE_DETAILS = {
|
|
|
83900
83913
|
}
|
|
83901
83914
|
};
|
|
83902
83915
|
function readSdkVersion2() {
|
|
83903
|
-
return "8.
|
|
83916
|
+
return "8.13.0";
|
|
83904
83917
|
}
|
|
83905
83918
|
var CONFORMANCE_CHECKER_VERSION2 = readSdkVersion2();
|
|
83906
83919
|
var MUST_POINTS2 = 95;
|
|
@@ -155020,7 +155033,7 @@ function platformRefusalHint(refusal) {
|
|
|
155020
155033
|
return refusal.canTopUp === false ? `${when} This is a usage limit: topping up credits does not lift it.` : when;
|
|
155021
155034
|
}
|
|
155022
155035
|
function readSdkVersion3() {
|
|
155023
|
-
return "8.
|
|
155036
|
+
return "8.13.0";
|
|
155024
155037
|
}
|
|
155025
155038
|
var DEFAULT_PLATFORM_API_BASE_URL = "https://app.mcpjam.com/api/v1";
|
|
155026
155039
|
function resolvePlatformRequestUrl(spec) {
|
|
@@ -194775,6 +194788,8 @@ function environmentServerRefsForManager(resolved, manager) {
|
|
|
194775
194788
|
function environmentEffectiveServerIds(resolved) {
|
|
194776
194789
|
return resolved.effectiveServerIds ?? resolved.selectedServerIds;
|
|
194777
194790
|
}
|
|
194791
|
+
var EVAL_LAUNCH_SERVER_SOURCE = "environment_only";
|
|
194792
|
+
var loggedServerSourceDowngrade = false;
|
|
194778
194793
|
async function resolveEnvironmentForLaunch(convexClient6, args) {
|
|
194779
194794
|
let raw;
|
|
194780
194795
|
try {
|
|
@@ -194791,7 +194806,20 @@ async function resolveEnvironmentForLaunch(convexClient6, args) {
|
|
|
194791
194806
|
"This deployment cannot resolve project environments yet. Retry after the backend deploys."
|
|
194792
194807
|
);
|
|
194793
194808
|
}
|
|
194794
|
-
|
|
194809
|
+
if (args.serverSource && /Object contains extra field [`'"]?serverSource(?:[`'"]|\b)/i.test(message)) {
|
|
194810
|
+
if (!loggedServerSourceDowngrade) {
|
|
194811
|
+
loggedServerSourceDowngrade = true;
|
|
194812
|
+
logger.warn(
|
|
194813
|
+
"[evals] Backend does not accept serverSource yet; eval launches fall back to the client's own servers until it deploys."
|
|
194814
|
+
);
|
|
194815
|
+
}
|
|
194816
|
+
raw = await convexClient6.query(
|
|
194817
|
+
"projectEnvironments:resolveEnvironmentForLaunch",
|
|
194818
|
+
{ projectId: args.projectId, environmentId: args.environmentId }
|
|
194819
|
+
);
|
|
194820
|
+
} else {
|
|
194821
|
+
throw error;
|
|
194822
|
+
}
|
|
194795
194823
|
}
|
|
194796
194824
|
const resolved = raw;
|
|
194797
194825
|
if (!resolved || !resolved.environmentRef || typeof resolved.environmentRef.revision !== "number" || !Array.isArray(resolved.selectedServerIds)) {
|
|
@@ -194880,6 +194908,30 @@ function environmentLaunchConflictError(error) {
|
|
|
194880
194908
|
message
|
|
194881
194909
|
);
|
|
194882
194910
|
}
|
|
194911
|
+
function translateEnvironmentResolveError(error) {
|
|
194912
|
+
if (error instanceof WebRouteError) return error;
|
|
194913
|
+
const data = error?.data;
|
|
194914
|
+
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
194915
|
+
const code = data.code;
|
|
194916
|
+
const message = data.message;
|
|
194917
|
+
if (typeof code === "string" && code.startsWith("ENV_")) {
|
|
194918
|
+
if (code === "ENV_NOT_FOUND" || code === "ENV_CROSS_PROJECT") {
|
|
194919
|
+
return new WebRouteError(
|
|
194920
|
+
404,
|
|
194921
|
+
ErrorCode.NOT_FOUND,
|
|
194922
|
+
"Environment not found"
|
|
194923
|
+
);
|
|
194924
|
+
}
|
|
194925
|
+
return new WebRouteError(
|
|
194926
|
+
409,
|
|
194927
|
+
ErrorCode.CONFLICT,
|
|
194928
|
+
typeof message === "string" ? message : "Environment cannot be launched right now.",
|
|
194929
|
+
{ code }
|
|
194930
|
+
);
|
|
194931
|
+
}
|
|
194932
|
+
}
|
|
194933
|
+
return error;
|
|
194934
|
+
}
|
|
194883
194935
|
|
|
194884
194936
|
// server/services/evals/recorder.ts
|
|
194885
194937
|
var RUNTIME_TELEMETRY_TIMEOUT_MS = 2e3;
|
|
@@ -207148,8 +207200,11 @@ async function prepareEvalRun(clientManager, request3) {
|
|
|
207148
207200
|
);
|
|
207149
207201
|
}
|
|
207150
207202
|
environmentLaunch = resolvedEnvironment && resolvedEnvironment.environmentRef.environmentId === environmentId ? resolvedEnvironment : await resolveEnvironmentForLaunch(convexClient6, {
|
|
207203
|
+
serverSource: EVAL_LAUNCH_SERVER_SOURCE,
|
|
207151
207204
|
projectId,
|
|
207152
207205
|
environmentId
|
|
207206
|
+
}).catch((error) => {
|
|
207207
|
+
throw translateEnvironmentResolveError(error);
|
|
207153
207208
|
});
|
|
207154
207209
|
} else if (serverIds.length === 0) {
|
|
207155
207210
|
throw new WebRouteError(
|
|
@@ -209566,30 +209621,6 @@ function isConvexFunctionMissing(error) {
|
|
|
209566
209621
|
function convexFunctionUnavailableError(message) {
|
|
209567
209622
|
return new WebRouteError(422, ErrorCode.FEATURE_NOT_SUPPORTED, message);
|
|
209568
209623
|
}
|
|
209569
|
-
function translateEnvironmentResolveError(error) {
|
|
209570
|
-
if (error instanceof WebRouteError) return error;
|
|
209571
|
-
const data = error?.data;
|
|
209572
|
-
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
209573
|
-
const code = data.code;
|
|
209574
|
-
const message = data.message;
|
|
209575
|
-
if (typeof code === "string" && code.startsWith("ENV_")) {
|
|
209576
|
-
if (code === "ENV_NOT_FOUND" || code === "ENV_CROSS_PROJECT") {
|
|
209577
|
-
return new WebRouteError(
|
|
209578
|
-
404,
|
|
209579
|
-
ErrorCode.NOT_FOUND,
|
|
209580
|
-
"Environment not found"
|
|
209581
|
-
);
|
|
209582
|
-
}
|
|
209583
|
-
return new WebRouteError(
|
|
209584
|
-
409,
|
|
209585
|
-
ErrorCode.CONFLICT,
|
|
209586
|
-
typeof message === "string" ? message : "Environment cannot be launched right now.",
|
|
209587
|
-
{ code }
|
|
209588
|
-
);
|
|
209589
|
-
}
|
|
209590
|
-
}
|
|
209591
|
-
return error;
|
|
209592
|
-
}
|
|
209593
209624
|
function requireProjectMatch(resource, projectId, what) {
|
|
209594
209625
|
if (!resource || String(resource.projectId ?? "") !== projectId) {
|
|
209595
209626
|
throw new WebRouteError(404, ErrorCode.NOT_FOUND, `${what} not found`);
|
|
@@ -211372,6 +211403,7 @@ async function resolveLaunchServers(params) {
|
|
|
211372
211403
|
const convex = createConvexReadClient(convexAuthToken);
|
|
211373
211404
|
try {
|
|
211374
211405
|
environmentLaunch = await resolveEnvironmentForLaunch(convex, {
|
|
211406
|
+
serverSource: EVAL_LAUNCH_SERVER_SOURCE,
|
|
211375
211407
|
projectId,
|
|
211376
211408
|
environmentId
|
|
211377
211409
|
});
|
|
@@ -214532,6 +214564,7 @@ evals.post(
|
|
|
214532
214564
|
let launch;
|
|
214533
214565
|
try {
|
|
214534
214566
|
launch = await resolveEnvironmentForLaunch(readClient, {
|
|
214567
|
+
serverSource: EVAL_LAUNCH_SERVER_SOURCE,
|
|
214535
214568
|
projectId,
|
|
214536
214569
|
environmentId
|
|
214537
214570
|
});
|
|
@@ -215104,8 +215137,11 @@ async function handleEvalAuthoring(c, local) {
|
|
|
215104
215137
|
serverField: "servers"
|
|
215105
215138
|
});
|
|
215106
215139
|
const environment = environmentId ? await resolveEnvironmentForLaunch(convex, {
|
|
215140
|
+
serverSource: EVAL_LAUNCH_SERVER_SOURCE,
|
|
215107
215141
|
projectId: input.projectId,
|
|
215108
215142
|
environmentId
|
|
215143
|
+
}).catch((error) => {
|
|
215144
|
+
throw translateEnvironmentResolveError(error);
|
|
215109
215145
|
}) : void 0;
|
|
215110
215146
|
const selection = environment ? {
|
|
215111
215147
|
serverIds: environmentServerIds(environment),
|
|
@@ -237783,13 +237819,18 @@ evals3.post(
|
|
|
237783
237819
|
let preflightEnvironment;
|
|
237784
237820
|
if (typeof rawBody.environmentId === "string" && rawBody.environmentId && typeof rawBody.projectId === "string" && rawBody.projectId) {
|
|
237785
237821
|
const bearer = await getConvexBearerForRequest(c);
|
|
237786
|
-
|
|
237787
|
-
|
|
237788
|
-
|
|
237789
|
-
|
|
237790
|
-
|
|
237791
|
-
|
|
237792
|
-
|
|
237822
|
+
try {
|
|
237823
|
+
preflightEnvironment = await resolveEnvironmentForLaunch(
|
|
237824
|
+
createConvexClient(bearer),
|
|
237825
|
+
{
|
|
237826
|
+
serverSource: EVAL_LAUNCH_SERVER_SOURCE,
|
|
237827
|
+
projectId: rawBody.projectId,
|
|
237828
|
+
environmentId: rawBody.environmentId
|
|
237829
|
+
}
|
|
237830
|
+
);
|
|
237831
|
+
} catch (error) {
|
|
237832
|
+
throw translateEnvironmentResolveError(error);
|
|
237833
|
+
}
|
|
237793
237834
|
rawBody.serverIds = environmentServerIds(preflightEnvironment);
|
|
237794
237835
|
const serverNames = environmentServerNames(preflightEnvironment);
|
|
237795
237836
|
if (serverNames.length) {
|
|
@@ -268964,6 +269005,7 @@ async function executeClaimedRun(claimed) {
|
|
|
268964
269005
|
const resolved = await resolveEnvironmentForLaunch(
|
|
268965
269006
|
createConvexClient(bearer),
|
|
268966
269007
|
{
|
|
269008
|
+
serverSource: EVAL_LAUNCH_SERVER_SOURCE,
|
|
268967
269009
|
projectId: claimed.projectId,
|
|
268968
269010
|
environmentId: claimed.environmentId
|
|
268969
269011
|
}
|
|
@@ -269008,7 +269050,7 @@ async function executeClaimedRun(claimed) {
|
|
|
269008
269050
|
await reportComplete({
|
|
269009
269051
|
triggerId: claimed.triggerId,
|
|
269010
269052
|
ok: false,
|
|
269011
|
-
failureReason: classifyFailure(error)
|
|
269053
|
+
failureReason: classifyFailure(translateEnvironmentResolveError(error))
|
|
269012
269054
|
});
|
|
269013
269055
|
return;
|
|
269014
269056
|
}
|
|
@@ -269042,7 +269084,7 @@ async function executeClaimedRun(claimed) {
|
|
|
269042
269084
|
await reportComplete({
|
|
269043
269085
|
triggerId: claimed.triggerId,
|
|
269044
269086
|
ok: false,
|
|
269045
|
-
failureReason: classifyFailure(error)
|
|
269087
|
+
failureReason: classifyFailure(translateEnvironmentResolveError(error))
|
|
269046
269088
|
});
|
|
269047
269089
|
} finally {
|
|
269048
269090
|
if (manager) {
|
|
@@ -275363,13 +275405,7 @@ if (enableHttpLogs) {
|
|
|
275363
275405
|
})
|
|
275364
275406
|
);
|
|
275365
275407
|
}
|
|
275366
|
-
app.use(
|
|
275367
|
-
"*",
|
|
275368
|
-
cors({
|
|
275369
|
-
origin: CORS_ORIGINS,
|
|
275370
|
-
credentials: true
|
|
275371
|
-
})
|
|
275372
|
-
);
|
|
275408
|
+
app.use("*", cors(CORS_OPTIONS));
|
|
275373
275409
|
app.use("/api/web/*", webBodyLimit());
|
|
275374
275410
|
app.use("/api/*", requestLogContextMiddleware);
|
|
275375
275411
|
if (!HOSTED_MODE) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpjam/inspector",
|
|
3
3
|
"productName": "MCPJam Inspector",
|
|
4
|
-
"version": "3.9.
|
|
4
|
+
"version": "3.9.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22.0.0"
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"@hookform/resolvers": "^3.10.0",
|
|
148
148
|
"@lezer/highlight": "^1.2.3",
|
|
149
149
|
"@mcp-ui/client": "^5.9.0",
|
|
150
|
-
"@mcpjam/sdk": "^8.
|
|
150
|
+
"@mcpjam/sdk": "^8.13.0",
|
|
151
151
|
"@modelcontextprotocol/client": "2.0.0",
|
|
152
152
|
"@modelcontextprotocol/ext-apps": "^1.7.4",
|
|
153
153
|
"@novnc/novnc": "^1.7.0",
|