@mcpjam/inspector 3.12.6 → 3.12.8
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/{OAuthDesktopReturnNotice-Hqfjrb1H.js → OAuthDesktopReturnNotice-DABzFg0y.js} +2 -2
- package/dist/client/assets/{app-bootstrap-BJCjI-vd.js → app-bootstrap-C2vVITe1.js} +324 -324
- package/dist/client/assets/{button-BIwDmB_t.js → button-CR0c6NYb.js} +2 -2
- package/dist/client/assets/{chunk-YOKDWASO-BR3Wei6p.js → chunk-YOKDWASO-C2OuyPZY.js} +5 -5
- package/dist/client/assets/{dead-clicks-autocapture-By9oPZNO.js → dead-clicks-autocapture-DuT1rKSM.js} +2 -2
- package/dist/client/assets/{error-reporting-DETvm7SY.js → error-reporting-CpBaShLK.js} +4 -4
- package/dist/client/assets/{error-reporting-CcPrCWMZ.js → error-reporting-DGKAyE3H.js} +1 -1
- package/dist/client/assets/{exception-autocapture-DwbGcAD3.js → exception-autocapture-DDYbbF4x.js} +2 -2
- package/dist/client/assets/{failed-request-tracker-C_rHGGiC.js → failed-request-tracker-DTcEBfel.js} +2 -2
- package/dist/client/assets/{highlighted-body-KPVGNVTW-BtWesXMy.js → highlighted-body-KPVGNVTW-BTjtAEXQ.js} +2 -2
- package/dist/client/assets/{index-DVxvFt1b.js → index-Cp_KMvUf.js} +3 -3
- package/dist/client/assets/{jszip.min-jjKI-S8C.js → jszip.min-CUbyF_hU.js} +2 -2
- package/dist/client/assets/{mermaid-HWGCJPDP-Sm76m65k.js → mermaid-HWGCJPDP-CmCtP4Dv.js} +1 -1
- package/dist/client/assets/{posthog-recorder-e8IS69Uh.js → posthog-recorder-D05rTwSB.js} +2 -2
- package/dist/client/assets/{preload-helper-CWYHVRyR.js → preload-helper-Bbq9_x_H.js} +2 -2
- package/dist/client/assets/{rolldown-runtime-CQzr1Zku.js → rolldown-runtime-DFaaNfet.js} +1 -1
- package/dist/client/assets/{surveys-o2N6B1zC.js → surveys-C6jQxZ__.js} +2 -2
- package/dist/client/assets/{trace-timeline-Beb_Djgr.js → trace-timeline-B4-o8QjE.js} +1 -1
- package/dist/client/assets/{trace-timeline-D_iD3a0v.js → trace-timeline-DuWo46vf.js} +2 -2
- package/dist/client/assets/{web-vitals-DCOcPgvo.js → web-vitals-DGvwJdv7.js} +2 -2
- package/dist/client/index.html +6 -6
- package/dist/server/{chunk-T4H5HSBJ.js → chunk-ER75CVTG.js} +2 -2
- package/dist/server/{chunk-SUMJU6PX.js → chunk-HHMYIKER.js} +2 -2
- package/dist/server/harness-install-cli.js +1 -1
- package/dist/server/index.js +130 -53
- package/dist/server/{local-turn-ZKWOMPM4.js → local-turn-SXHFOZVA.js} +3 -3
- package/package.json +2 -2
package/dist/server/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
stopLocalHarnessProject,
|
|
29
29
|
stopLocalHarnessWorkspace,
|
|
30
30
|
validateWorkspaceCandidate
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ER75CVTG.js";
|
|
32
32
|
import {
|
|
33
33
|
LOCAL_HARNESS_MANIFEST,
|
|
34
34
|
LOCAL_HARNESS_POLICY_VERSION,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
runtimeInstallRoot,
|
|
58
58
|
startRuntimeInstall,
|
|
59
59
|
supportsOwnershipProof
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-HHMYIKER.js";
|
|
61
61
|
import {
|
|
62
62
|
BROWSER_CONSENT_HEADER,
|
|
63
63
|
createBrowserConsentLifetime,
|
|
@@ -28834,7 +28834,7 @@ var noopPosthog = {
|
|
|
28834
28834
|
var posthog = isTelemetryDisabled ? noopPosthog : new PostHog("phc_dTOPniyUNU2kD8Jx8yHMXSqiZHM8I91uWopTMX6EBE9", {
|
|
28835
28835
|
host: "https://us.i.posthog.com"
|
|
28836
28836
|
});
|
|
28837
|
-
var SDK_VERSION = "8.20.
|
|
28837
|
+
var SDK_VERSION = "8.20.1";
|
|
28838
28838
|
var SDK_RELEASE = `@mcpjam/sdk@${SDK_VERSION}`;
|
|
28839
28839
|
var CAPTURED_ERROR_SYMBOL = Symbol.for("@mcpjam/sdk/captured-eval-error");
|
|
28840
28840
|
init_internal();
|
|
@@ -28846,7 +28846,7 @@ init_eval_tool_execution();
|
|
|
28846
28846
|
init_internal();
|
|
28847
28847
|
init_internal();
|
|
28848
28848
|
function readSdkVersion() {
|
|
28849
|
-
return "8.20.
|
|
28849
|
+
return "8.20.1";
|
|
28850
28850
|
}
|
|
28851
28851
|
var DEFAULT_PLATFORM_USER_AGENT = `mcpjam-sdk/${readSdkVersion()}`;
|
|
28852
28852
|
init_HostRunner();
|
|
@@ -87729,7 +87729,7 @@ var NEGATIVE_TEST_MODE_DETAILS = {
|
|
|
87729
87729
|
};
|
|
87730
87730
|
init_client_id_metadata2();
|
|
87731
87731
|
function readSdkVersion2() {
|
|
87732
|
-
return "8.20.
|
|
87732
|
+
return "8.20.1";
|
|
87733
87733
|
}
|
|
87734
87734
|
var CONFORMANCE_CHECKER_VERSION2 = readSdkVersion2();
|
|
87735
87735
|
var MUST_POINTS2 = 95;
|
|
@@ -89334,7 +89334,7 @@ function getActiveTunnelDomains() {
|
|
|
89334
89334
|
}
|
|
89335
89335
|
|
|
89336
89336
|
// server/utils/guest-spend-ip.ts
|
|
89337
|
-
import { isIP, isIPv4, isIPv6 } from "net";
|
|
89337
|
+
import { isIP as isIP2, isIPv4, isIPv6 } from "net";
|
|
89338
89338
|
|
|
89339
89339
|
// server/utils/local-secret-store.ts
|
|
89340
89340
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
@@ -89400,6 +89400,7 @@ function getGuestSessionHashPepper() {
|
|
|
89400
89400
|
|
|
89401
89401
|
// server/utils/client-ip.ts
|
|
89402
89402
|
import { timingSafeEqual as timingSafeEqual3 } from "crypto";
|
|
89403
|
+
import { isIP } from "net";
|
|
89403
89404
|
import { getConnInfo } from "@hono/node-server/conninfo";
|
|
89404
89405
|
function getClientIp(c) {
|
|
89405
89406
|
const cfConnectingIp = c.req.header("cf-connecting-ip")?.trim();
|
|
@@ -89445,6 +89446,34 @@ function getAttestedClientIp(c) {
|
|
|
89445
89446
|
}
|
|
89446
89447
|
return null;
|
|
89447
89448
|
}
|
|
89449
|
+
function ipRateLimitKey(ip) {
|
|
89450
|
+
const address = ip.trim();
|
|
89451
|
+
if (isIP(address) !== 6) return address;
|
|
89452
|
+
const groups = ipv6Groups(address.split("%")[0]);
|
|
89453
|
+
if (groups.slice(0, 6).join(":") === "0:0:0:0:0:65535") {
|
|
89454
|
+
const [high, low] = groups.slice(6);
|
|
89455
|
+
return [high >> 8, high & 255, low >> 8, low & 255].join(".");
|
|
89456
|
+
}
|
|
89457
|
+
const prefix = groups.slice(0, 4).map((group) => group.toString(16));
|
|
89458
|
+
return `${prefix.join(":")}::/64`;
|
|
89459
|
+
}
|
|
89460
|
+
function ipv6Groups(address) {
|
|
89461
|
+
const v4Tail = /(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(address);
|
|
89462
|
+
let text2 = address;
|
|
89463
|
+
if (v4Tail) {
|
|
89464
|
+
const [a, b, c, d] = v4Tail.slice(1).map(Number);
|
|
89465
|
+
const high = (a << 8 | b).toString(16);
|
|
89466
|
+
const low = (c << 8 | d).toString(16);
|
|
89467
|
+
text2 = `${address.slice(0, v4Tail.index)}${high}:${low}`;
|
|
89468
|
+
}
|
|
89469
|
+
const parse3 = (part) => part === "" ? [] : part.split(":").map((group) => parseInt(group, 16));
|
|
89470
|
+
const [head, tail] = text2.split("::");
|
|
89471
|
+
const left = parse3(head);
|
|
89472
|
+
if (tail === void 0) return left;
|
|
89473
|
+
const right = parse3(tail);
|
|
89474
|
+
const zeros = new Array(8 - left.length - right.length).fill(0);
|
|
89475
|
+
return [...left, ...zeros, ...right];
|
|
89476
|
+
}
|
|
89448
89477
|
|
|
89449
89478
|
// server/utils/guest-spend-ip.ts
|
|
89450
89479
|
var SCOPE = "guest-spend-ip";
|
|
@@ -89496,7 +89525,7 @@ function canonicalizeClientIp(rawIp) {
|
|
|
89496
89525
|
return null;
|
|
89497
89526
|
}
|
|
89498
89527
|
}
|
|
89499
|
-
return
|
|
89528
|
+
return isIP2(trimmed) ? trimmed.toLowerCase() : null;
|
|
89500
89529
|
}
|
|
89501
89530
|
async function hashGuestSpendIp(rawIp) {
|
|
89502
89531
|
const canonical4 = canonicalizeClientIp(rawIp);
|
|
@@ -92547,7 +92576,7 @@ async function sweepLocalHarnessScratch() {
|
|
|
92547
92576
|
var startup;
|
|
92548
92577
|
function startLocalHarnessJanitor() {
|
|
92549
92578
|
startup ??= (async () => {
|
|
92550
|
-
const { localHarnessSupervisor } = await import("./local-turn-
|
|
92579
|
+
const { localHarnessSupervisor } = await import("./local-turn-SXHFOZVA.js");
|
|
92551
92580
|
await localHarnessSupervisor().reclaimOrphans();
|
|
92552
92581
|
await sweepLocalHarnessScratch();
|
|
92553
92582
|
})().catch((error) => {
|
|
@@ -161594,7 +161623,7 @@ function platformRefusalHint(refusal) {
|
|
|
161594
161623
|
return refusal.canTopUp === false ? `${when} This is a usage limit: topping up credits does not lift it.` : when;
|
|
161595
161624
|
}
|
|
161596
161625
|
function readSdkVersion3() {
|
|
161597
|
-
return "8.20.
|
|
161626
|
+
return "8.20.1";
|
|
161598
161627
|
}
|
|
161599
161628
|
var DEFAULT_PLATFORM_API_BASE_URL = "https://app.mcpjam.com/api/v1";
|
|
161600
161629
|
function resolvePlatformRequestUrl(spec) {
|
|
@@ -219324,10 +219353,22 @@ var AUTHENTICATION_FAILURE = /\b(unauthenticated|invalid token|token (has )?expi
|
|
|
219324
219353
|
function redactedReadRefusalError(error, notFoundMessage) {
|
|
219325
219354
|
if (error instanceof WebRouteError) return void 0;
|
|
219326
219355
|
if (hasConvexErrorData(error)) return void 0;
|
|
219327
|
-
|
|
219328
|
-
|
|
219356
|
+
const failure = classifyConvexReadError(error);
|
|
219357
|
+
if (failure.kind === "invalid-argument") {
|
|
219358
|
+
logRejectedReadArguments("v1.read-refusal", error);
|
|
219359
|
+
} else if (failure.kind === "redacted") {
|
|
219360
|
+
logRedactedReadAsNotFound("v1.read-refusal", error);
|
|
219361
|
+
} else {
|
|
219362
|
+
return void 0;
|
|
219363
|
+
}
|
|
219329
219364
|
return new WebRouteError(404, ErrorCode.NOT_FOUND, notFoundMessage);
|
|
219330
219365
|
}
|
|
219366
|
+
function logRejectedReadArguments(scope, error) {
|
|
219367
|
+
logger.warn(`[${scope}] convex rejected read arguments`, {
|
|
219368
|
+
scope,
|
|
219369
|
+
detail: redactForLog(error)
|
|
219370
|
+
});
|
|
219371
|
+
}
|
|
219331
219372
|
function logRedactedReadAsNotFound(scope, error) {
|
|
219332
219373
|
logger.warn(`[${scope}] redacted read failure answered as not found`, {
|
|
219333
219374
|
scope,
|
|
@@ -219358,10 +219399,7 @@ function translateConvexReadError(error, options) {
|
|
|
219358
219399
|
if (structured) return structured;
|
|
219359
219400
|
const failure = classifyConvexReadError(error);
|
|
219360
219401
|
if (failure.kind === "invalid-argument") {
|
|
219361
|
-
|
|
219362
|
-
scope: options.scope,
|
|
219363
|
-
detail: redactForLog(error)
|
|
219364
|
-
});
|
|
219402
|
+
logRejectedReadArguments(options.scope, error);
|
|
219365
219403
|
return new WebRouteError(
|
|
219366
219404
|
404,
|
|
219367
219405
|
ErrorCode.NOT_FOUND,
|
|
@@ -225757,6 +225795,19 @@ async function handleEvalAuthoring(c, local) {
|
|
|
225757
225795
|
requestedEnvironmentId: input.environmentId,
|
|
225758
225796
|
hasServerOverride: false,
|
|
225759
225797
|
serverField: "servers"
|
|
225798
|
+
}).catch((error) => {
|
|
225799
|
+
if (!local && input.source === "markdown" && error instanceof WebRouteError && error.details?.reason === "ENVIRONMENT_REQUIRED") {
|
|
225800
|
+
getRequestLogger(c, "routes.shared.eval-authoring").event(
|
|
225801
|
+
"eval.import.environment_selection.failed",
|
|
225802
|
+
{
|
|
225803
|
+
projectId: input.projectId,
|
|
225804
|
+
suiteId: input.suiteId,
|
|
225805
|
+
reason: "ENVIRONMENT_REQUIRED"
|
|
225806
|
+
},
|
|
225807
|
+
{ sentry: true }
|
|
225808
|
+
);
|
|
225809
|
+
}
|
|
225810
|
+
throw error;
|
|
225760
225811
|
});
|
|
225761
225812
|
const environment = environmentId ? await resolveEnvironmentForLaunch(convex, {
|
|
225762
225813
|
serverSource: EVAL_LAUNCH_SERVER_SOURCE,
|
|
@@ -237304,6 +237355,7 @@ document.addEventListener('securitypolicyviolation', function(e) {
|
|
|
237304
237355
|
sandboxAttrs,
|
|
237305
237356
|
cspDirectives,
|
|
237306
237357
|
cspSubtypePolicy,
|
|
237358
|
+
clientContext,
|
|
237307
237359
|
browserStorage,
|
|
237308
237360
|
permissive,
|
|
237309
237361
|
colorScheme,
|
|
@@ -237446,6 +237498,8 @@ document.addEventListener('securitypolicyviolation', function(e) {
|
|
|
237446
237498
|
{
|
|
237447
237499
|
csp,
|
|
237448
237500
|
cspDirectives,
|
|
237501
|
+
cspSubtypePolicy,
|
|
237502
|
+
clientContext,
|
|
237449
237503
|
permissive: Boolean(permissive),
|
|
237450
237504
|
},
|
|
237451
237505
|
);
|
|
@@ -265344,16 +265398,11 @@ function createConvexClient3(convexAuthToken) {
|
|
|
265344
265398
|
client3.setAuth(convexAuthToken);
|
|
265345
265399
|
return client3;
|
|
265346
265400
|
}
|
|
265401
|
+
var PROJECT_OR_CLIENT_NOT_FOUND = "Project or client not found, or you do not have access to it.";
|
|
265347
265402
|
function translateConvexWriteError3(error) {
|
|
265348
265403
|
return translateConvexWriteError(error, {
|
|
265349
265404
|
resource: "Client",
|
|
265350
|
-
|
|
265351
|
-
// missing" into the same generic error, and the v1 surface deliberately
|
|
265352
|
-
// doesn't leak which. Keep the message neutral rather than asserting
|
|
265353
|
-
// "Client not found" — the failure on the list/create paths is usually the
|
|
265354
|
-
// PROJECT (bad id or no membership), where a client-specific message
|
|
265355
|
-
// misleads.
|
|
265356
|
-
notFoundMessage: "Project or client not found, or you do not have access to it.",
|
|
265405
|
+
notFoundMessage: PROJECT_OR_CLIENT_NOT_FOUND,
|
|
265357
265406
|
fallbackMessage: "Client write rejected by the platform"
|
|
265358
265407
|
});
|
|
265359
265408
|
}
|
|
@@ -265365,13 +265414,10 @@ async function listHostRows(convexAuthToken, projectId) {
|
|
|
265365
265414
|
{ projectId }
|
|
265366
265415
|
) ?? [];
|
|
265367
265416
|
} catch (error) {
|
|
265368
|
-
throw redactedReadRefusalError(
|
|
265369
|
-
error,
|
|
265370
|
-
"Project or client not found, or you do not have access to it."
|
|
265371
|
-
) ?? translateConvexWriteError3(error);
|
|
265417
|
+
throw redactedReadRefusalError(error, PROJECT_OR_CLIENT_NOT_FOUND) ?? translateConvexWriteError3(error);
|
|
265372
265418
|
}
|
|
265373
265419
|
}
|
|
265374
|
-
async function readHostDetail(convexAuthToken, projectId, hostId) {
|
|
265420
|
+
async function readHostDetail(convexAuthToken, projectId, hostId, read3) {
|
|
265375
265421
|
const readClient = createConvexClient3(convexAuthToken);
|
|
265376
265422
|
let detail;
|
|
265377
265423
|
try {
|
|
@@ -265383,7 +265429,7 @@ async function readHostDetail(convexAuthToken, projectId, hostId) {
|
|
|
265383
265429
|
}
|
|
265384
265430
|
);
|
|
265385
265431
|
} catch (error) {
|
|
265386
|
-
throw translateConvexWriteError3(error);
|
|
265432
|
+
throw (read3 === "scope" ? redactedReadRefusalError(error, "Client not found") : void 0) ?? translateConvexWriteError3(error);
|
|
265387
265433
|
}
|
|
265388
265434
|
if (!detail) {
|
|
265389
265435
|
throw new WebRouteError(404, ErrorCode.NOT_FOUND, "Client not found");
|
|
@@ -265405,7 +265451,9 @@ async function resolveClientId(convexAuthToken, projectId, selector, includePriv
|
|
|
265405
265451
|
throw new WebRouteError(404, ErrorCode.NOT_FOUND, "Client not found");
|
|
265406
265452
|
} catch (error) {
|
|
265407
265453
|
if (error instanceof WebRouteError) throw error;
|
|
265408
|
-
if (!isMissingConvexFunction(error))
|
|
265454
|
+
if (!isMissingConvexFunction(error)) {
|
|
265455
|
+
throw redactedReadRefusalError(error, PROJECT_OR_CLIENT_NOT_FOUND) ?? translateConvexWriteError3(error);
|
|
265456
|
+
}
|
|
265409
265457
|
}
|
|
265410
265458
|
const rows = (await listHostRows(convexAuthToken, projectId)).filter(
|
|
265411
265459
|
(row2) => includePrivateBacking || !isPrivateBacking(row2)
|
|
@@ -265604,7 +265652,7 @@ async function getHandler(c, surface) {
|
|
|
265604
265652
|
const projectId = pathParam(c, "projectId");
|
|
265605
265653
|
const token = await getConvexBearerForRequest(c);
|
|
265606
265654
|
const clientId = await resolveSelector(c, token, surface);
|
|
265607
|
-
const detail = await readHostDetail(token, projectId, clientId);
|
|
265655
|
+
const detail = await readHostDetail(token, projectId, clientId, "scope");
|
|
265608
265656
|
if (!surface.legacy && !includePrivateBackingParam(c) && isPrivateBacking(detail)) {
|
|
265609
265657
|
throw new WebRouteError(404, ErrorCode.NOT_FOUND, "Client not found");
|
|
265610
265658
|
}
|
|
@@ -265631,7 +265679,12 @@ async function createHandler(c, surface) {
|
|
|
265631
265679
|
} catch (error) {
|
|
265632
265680
|
throw translateConvexWriteError3(error);
|
|
265633
265681
|
}
|
|
265634
|
-
const detail = await readHostDetail(
|
|
265682
|
+
const detail = await readHostDetail(
|
|
265683
|
+
token,
|
|
265684
|
+
projectId,
|
|
265685
|
+
created.hostId,
|
|
265686
|
+
"readBack"
|
|
265687
|
+
);
|
|
265635
265688
|
if (surface.legacy) {
|
|
265636
265689
|
markDeprecated2(c);
|
|
265637
265690
|
return v1Resource(c, toLegacyHostDetailDto(detail), 201);
|
|
@@ -265667,7 +265720,7 @@ async function updateClientHandler(c) {
|
|
|
265667
265720
|
try {
|
|
265668
265721
|
if (body.config !== void 0) {
|
|
265669
265722
|
assertConfigKeepsPinnedModel(
|
|
265670
|
-
await readHostDetail(token, projectId, clientId),
|
|
265723
|
+
await readHostDetail(token, projectId, clientId, "scope"),
|
|
265671
265724
|
body.config
|
|
265672
265725
|
);
|
|
265673
265726
|
await convexClient6.mutation(
|
|
@@ -265697,7 +265750,9 @@ async function updateClientHandler(c) {
|
|
|
265697
265750
|
}
|
|
265698
265751
|
return v1Resource(
|
|
265699
265752
|
c,
|
|
265700
|
-
toClientDetailDto(
|
|
265753
|
+
toClientDetailDto(
|
|
265754
|
+
await readHostDetail(token, projectId, clientId, "readBack")
|
|
265755
|
+
)
|
|
265701
265756
|
);
|
|
265702
265757
|
}
|
|
265703
265758
|
async function updateHostAliasHandler(c) {
|
|
@@ -265709,7 +265764,7 @@ async function updateHostAliasHandler(c) {
|
|
|
265709
265764
|
if (body.name !== void 0) updateArgs.name = body.name;
|
|
265710
265765
|
if (body.config !== void 0) {
|
|
265711
265766
|
assertConfigKeepsPinnedModel(
|
|
265712
|
-
await readHostDetail(token, projectId, hostId),
|
|
265767
|
+
await readHostDetail(token, projectId, hostId, "scope"),
|
|
265713
265768
|
body.config
|
|
265714
265769
|
);
|
|
265715
265770
|
updateArgs.input = normalizeConfigForWrite(body.config);
|
|
@@ -265723,7 +265778,9 @@ async function updateHostAliasHandler(c) {
|
|
|
265723
265778
|
markDeprecated2(c);
|
|
265724
265779
|
return v1Resource(
|
|
265725
265780
|
c,
|
|
265726
|
-
toLegacyHostDetailDto(
|
|
265781
|
+
toLegacyHostDetailDto(
|
|
265782
|
+
await readHostDetail(token, projectId, hostId, "readBack")
|
|
265783
|
+
)
|
|
265727
265784
|
);
|
|
265728
265785
|
}
|
|
265729
265786
|
async function setServersHandler(c, surface) {
|
|
@@ -265746,7 +265803,7 @@ async function setServersHandler(c, surface) {
|
|
|
265746
265803
|
}
|
|
265747
265804
|
return detailResponse(
|
|
265748
265805
|
c,
|
|
265749
|
-
await readHostDetail(token, projectId, clientId),
|
|
265806
|
+
await readHostDetail(token, projectId, clientId, "readBack"),
|
|
265750
265807
|
surface.legacy
|
|
265751
265808
|
);
|
|
265752
265809
|
}
|
|
@@ -265759,7 +265816,7 @@ async function duplicateHandler(c, surface) {
|
|
|
265759
265816
|
await readJsonObjectBody(c)
|
|
265760
265817
|
);
|
|
265761
265818
|
const convexClient6 = createConvexClient3(token);
|
|
265762
|
-
const source = await readHostDetail(token, projectId, clientId);
|
|
265819
|
+
const source = await readHostDetail(token, projectId, clientId, "scope");
|
|
265763
265820
|
if (!hostConfigPinsAModel(source.config)) {
|
|
265764
265821
|
throw new WebRouteError(
|
|
265765
265822
|
400,
|
|
@@ -265777,7 +265834,12 @@ async function duplicateHandler(c, surface) {
|
|
|
265777
265834
|
} catch (error) {
|
|
265778
265835
|
throw translateConvexWriteError3(error);
|
|
265779
265836
|
}
|
|
265780
|
-
const detail = await readHostDetail(
|
|
265837
|
+
const detail = await readHostDetail(
|
|
265838
|
+
token,
|
|
265839
|
+
projectId,
|
|
265840
|
+
created.hostId,
|
|
265841
|
+
"readBack"
|
|
265842
|
+
);
|
|
265781
265843
|
if (surface.legacy) {
|
|
265782
265844
|
markDeprecated2(c);
|
|
265783
265845
|
return v1Resource(c, toLegacyHostDetailDto(detail), 201);
|
|
@@ -266208,7 +266270,10 @@ environments2.get(
|
|
|
266208
266270
|
{ projectId, environmentId }
|
|
266209
266271
|
);
|
|
266210
266272
|
} catch (error) {
|
|
266211
|
-
throw
|
|
266273
|
+
throw redactedReadRefusalError(
|
|
266274
|
+
error,
|
|
266275
|
+
"Environment or project not found, or you do not have access to it."
|
|
266276
|
+
) ?? translateResolveError(error);
|
|
266212
266277
|
}
|
|
266213
266278
|
if (!resolved || !resolved.environmentRef) {
|
|
266214
266279
|
throw new WebRouteError(
|
|
@@ -270483,7 +270548,10 @@ images.post("/projects/:projectId/images/validate", async (c) => {
|
|
|
270483
270548
|
{ projectId, blueprint: body.blueprint }
|
|
270484
270549
|
);
|
|
270485
270550
|
} catch (error) {
|
|
270486
|
-
throw
|
|
270551
|
+
throw redactedReadRefusalError(
|
|
270552
|
+
error,
|
|
270553
|
+
"Environment or project not found, or you do not have access to it."
|
|
270554
|
+
) ?? translateConvexWriteError4(error);
|
|
270487
270555
|
}
|
|
270488
270556
|
return v1Resource(c, result);
|
|
270489
270557
|
});
|
|
@@ -282569,6 +282637,8 @@ function flushRelayStats() {
|
|
|
282569
282637
|
setInterval(flushRelayStats, STATS_FLUSH_INTERVAL_MS).unref();
|
|
282570
282638
|
var RATE_LIMIT_PER_MIN = 600;
|
|
282571
282639
|
var RELAY_INGEST_LIMIT_PER_MIN = 60;
|
|
282640
|
+
var RELAY_UNATTESTED_INGEST_LIMIT_PER_MIN = 60;
|
|
282641
|
+
var RELAY_POOLED_INGEST_LIMIT_PER_MIN = 4 * RELAY_INGEST_LIMIT_PER_MIN;
|
|
282572
282642
|
var RATE_WINDOW_MS2 = 6e4;
|
|
282573
282643
|
var UNATTESTED_CLIENT_KEY3 = "unattested";
|
|
282574
282644
|
var relayWindows = createFixedWindowMap(RATE_LIMIT_PER_MIN, RATE_WINDOW_MS2);
|
|
@@ -282577,24 +282647,31 @@ var ingestWindows = createFixedWindowMap(
|
|
|
282577
282647
|
RATE_WINDOW_MS2
|
|
282578
282648
|
);
|
|
282579
282649
|
var unattestedIngestWindows = createFixedWindowMap(
|
|
282580
|
-
|
|
282650
|
+
RELAY_UNATTESTED_INGEST_LIMIT_PER_MIN,
|
|
282651
|
+
RATE_WINDOW_MS2
|
|
282652
|
+
);
|
|
282653
|
+
var pooledIngestWindows = createFixedWindowMap(
|
|
282654
|
+
RELAY_POOLED_INGEST_LIMIT_PER_MIN,
|
|
282581
282655
|
RATE_WINDOW_MS2
|
|
282582
282656
|
);
|
|
282583
282657
|
function isIngestSubpath(subpath) {
|
|
282584
282658
|
return /^\/(?:e|i\/v0\/e|s|i\/v1\/(?:logs|metrics))\/?$/.test(subpath);
|
|
282585
282659
|
}
|
|
282586
|
-
function
|
|
282587
|
-
|
|
282660
|
+
function attestedClientKey(c) {
|
|
282661
|
+
if (!edgeAttestationConfigured()) return null;
|
|
282662
|
+
const ip = getAttestedClientIp(c);
|
|
282663
|
+
return ip === null ? null : ipRateLimitKey(ip);
|
|
282588
282664
|
}
|
|
282589
282665
|
function relayClientKey(c) {
|
|
282590
|
-
return
|
|
282666
|
+
return attestedClientKey(c) ?? UNATTESTED_CLIENT_KEY3;
|
|
282591
282667
|
}
|
|
282592
|
-
function relayRateLimit(c,
|
|
282668
|
+
function relayRateLimit(c, ingest) {
|
|
282593
282669
|
if (!HOSTED_MODE) return null;
|
|
282594
|
-
const
|
|
282595
|
-
let refusedMs = relayWindows.charge(
|
|
282596
|
-
if (refusedMs === null &&
|
|
282597
|
-
|
|
282670
|
+
const clientKey = attestedClientKey(c);
|
|
282671
|
+
let refusedMs = relayWindows.charge(clientKey ?? UNATTESTED_CLIENT_KEY3);
|
|
282672
|
+
if (refusedMs === null && ingest) {
|
|
282673
|
+
const sharedWindows = edgeAttestationConfigured() ? unattestedIngestWindows : pooledIngestWindows;
|
|
282674
|
+
refusedMs = clientKey ? ingestWindows.charge(clientKey) : sharedWindows.charge(UNATTESTED_CLIENT_KEY3);
|
|
282598
282675
|
}
|
|
282599
282676
|
if (refusedMs === null) return null;
|
|
282600
282677
|
stats2.rateLimitRejects++;
|
|
@@ -283199,7 +283276,7 @@ async function checkProjectTokens(subpath, url, method, body) {
|
|
|
283199
283276
|
}
|
|
283200
283277
|
var relayRoutes = new Hono137();
|
|
283201
283278
|
relayRoutes.post("/launch-engagement", makeBodyLimit(2048), async (c) => {
|
|
283202
|
-
const limited = relayRateLimit(c,
|
|
283279
|
+
const limited = relayRateLimit(c, true);
|
|
283203
283280
|
if (limited) return limited;
|
|
283204
283281
|
const parsed = launchEngagementSchema.safeParse(
|
|
283205
283282
|
await c.req.json().catch(() => null)
|
|
@@ -283211,7 +283288,7 @@ relayRoutes.post("/launch-engagement", makeBodyLimit(2048), async (c) => {
|
|
|
283211
283288
|
relayRoutes.all("*", async (c) => {
|
|
283212
283289
|
const url = new URL(c.req.url);
|
|
283213
283290
|
const subpath = stripRelayPrefix(url.pathname);
|
|
283214
|
-
const limited = relayRateLimit(c, subpath);
|
|
283291
|
+
const limited = relayRateLimit(c, isIngestSubpath(subpath));
|
|
283215
283292
|
if (limited) {
|
|
283216
283293
|
return limited;
|
|
283217
283294
|
}
|
|
@@ -284060,7 +284137,7 @@ function egressOverrideWeakensDefaults(override) {
|
|
|
284060
284137
|
}
|
|
284061
284138
|
|
|
284062
284139
|
// server/services/github-checks/network-monitor.ts
|
|
284063
|
-
import { isIP as
|
|
284140
|
+
import { isIP as isIP3 } from "net";
|
|
284064
284141
|
|
|
284065
284142
|
// server/services/github-checks/network-monitor-script.ts
|
|
284066
284143
|
var NETWORK_MONITOR_SCRIPT = String.raw`
|
|
@@ -284271,7 +284348,7 @@ function parseConnectionRecord(line2) {
|
|
|
284271
284348
|
if (line2.length > LINE_LIMIT) return null;
|
|
284272
284349
|
try {
|
|
284273
284350
|
const row2 = JSON.parse(line2);
|
|
284274
|
-
if (!row2 || row2.kind !== "connection" || !outcomes.has(row2.outcome) || !["tcp", "udp"].includes(row2.protocol) || typeof row2.destinationIp !== "string" ||
|
|
284351
|
+
if (!row2 || row2.kind !== "connection" || !outcomes.has(row2.outcome) || !["tcp", "udp"].includes(row2.protocol) || typeof row2.destinationIp !== "string" || isIP3(row2.destinationIp) === 0 || row2.destinationIp.includes("%") || isIP3(row2.destinationIp) !== row2.family || !Number.isInteger(row2.destinationPort) || row2.destinationPort < 1 || row2.destinationPort > 65535 || !Number.isSafeInteger(row2.timestamp) || row2.timestamp < 0)
|
|
284275
284352
|
return null;
|
|
284276
284353
|
return {
|
|
284277
284354
|
destinationIp: row2.destinationIp,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
localHarnessSupervisor,
|
|
3
3
|
prepareLocalHarnessTurn
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-ER75CVTG.js";
|
|
5
|
+
import "./chunk-HHMYIKER.js";
|
|
6
6
|
import "./chunk-SH24KJBI.js";
|
|
7
7
|
import "./chunk-PZ5AY32C.js";
|
|
8
8
|
export {
|
|
9
9
|
localHarnessSupervisor,
|
|
10
10
|
prepareLocalHarnessTurn
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=local-turn-
|
|
12
|
+
//# sourceMappingURL=local-turn-SXHFOZVA.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpjam/inspector",
|
|
3
3
|
"productName": "MCPJam Inspector",
|
|
4
|
-
"version": "3.12.
|
|
4
|
+
"version": "3.12.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22.0.0"
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"@hookform/resolvers": "^3.10.0",
|
|
151
151
|
"@lezer/highlight": "^1.2.3",
|
|
152
152
|
"@mcp-ui/client": "^5.9.0",
|
|
153
|
-
"@mcpjam/sdk": "^8.20.
|
|
153
|
+
"@mcpjam/sdk": "^8.20.1",
|
|
154
154
|
"@modelcontextprotocol/client": "2.0.0",
|
|
155
155
|
"@modelcontextprotocol/ext-apps": "^1.7.4",
|
|
156
156
|
"@novnc/novnc": "^1.7.0",
|