@modelcontextprotocol/inspector 0.14.3 → 0.16.0
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/README.md +16 -13
- package/cli/build/index.js +38 -3
- package/cli/build/transport.js +14 -1
- package/client/bin/client.js +11 -6
- package/client/bin/start.js +234 -50
- package/client/dist/assets/{OAuthCallback-BrCtrNqU.js → OAuthCallback-DMQy4ibj.js} +1 -1
- package/client/dist/assets/{OAuthDebugCallback-CnQiL6bh.js → OAuthDebugCallback-9JxBAysc.js} +1 -1
- package/client/dist/assets/{index-C1MLjTGf.css → index-BwWj6LL9.css} +0 -4
- package/client/dist/assets/{index-DYfnI33L.js → index-DI7JCTeu.js} +854 -342
- package/client/dist/index.html +3 -3
- package/package.json +12 -7
- package/server/build/index.js +10 -13
- package/server/build/mcpProxy.js +4 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OAuthCallback-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OAuthCallback-DMQy4ibj.js","assets/oauthUtils-DTcoXpSP.js","assets/OAuthDebugCallback-9JxBAysc.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function _mergeNamespaces(n, m2) {
|
|
3
3
|
for (var i = 0; i < m2.length; i++) {
|
|
4
4
|
const e = m2[i];
|
|
@@ -11612,8 +11612,9 @@ class ZodError extends Error {
|
|
|
11612
11612
|
const formErrors = [];
|
|
11613
11613
|
for (const sub of this.issues) {
|
|
11614
11614
|
if (sub.path.length > 0) {
|
|
11615
|
-
|
|
11616
|
-
fieldErrors[
|
|
11615
|
+
const firstEl = sub.path[0];
|
|
11616
|
+
fieldErrors[firstEl] = fieldErrors[firstEl] || [];
|
|
11617
|
+
fieldErrors[firstEl].push(mapper(sub));
|
|
11617
11618
|
} else {
|
|
11618
11619
|
formErrors.push(mapper(sub));
|
|
11619
11620
|
}
|
|
@@ -11689,6 +11690,8 @@ const errorMap = (issue, _ctx) => {
|
|
|
11689
11690
|
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
11690
11691
|
else if (issue.type === "number")
|
|
11691
11692
|
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
11693
|
+
else if (issue.type === "bigint")
|
|
11694
|
+
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
11692
11695
|
else if (issue.type === "date")
|
|
11693
11696
|
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
11694
11697
|
else
|
|
@@ -12241,6 +12244,8 @@ function isValidJWT(jwt, alg) {
|
|
|
12241
12244
|
return false;
|
|
12242
12245
|
try {
|
|
12243
12246
|
const [header] = jwt.split(".");
|
|
12247
|
+
if (!header)
|
|
12248
|
+
return false;
|
|
12244
12249
|
const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
|
|
12245
12250
|
const decoded = JSON.parse(atob(base64));
|
|
12246
12251
|
if (typeof decoded !== "object" || decoded === null)
|
|
@@ -15119,9 +15124,10 @@ const enumType = ZodEnum.create;
|
|
|
15119
15124
|
ZodPromise.create;
|
|
15120
15125
|
const optionalType = ZodOptional.create;
|
|
15121
15126
|
ZodNullable.create;
|
|
15122
|
-
const LATEST_PROTOCOL_VERSION = "2025-
|
|
15127
|
+
const LATEST_PROTOCOL_VERSION = "2025-06-18";
|
|
15123
15128
|
const SUPPORTED_PROTOCOL_VERSIONS = [
|
|
15124
15129
|
LATEST_PROTOCOL_VERSION,
|
|
15130
|
+
"2025-03-26",
|
|
15125
15131
|
"2024-11-05",
|
|
15126
15132
|
"2024-10-07"
|
|
15127
15133
|
];
|
|
@@ -15143,7 +15149,8 @@ const RequestSchema = objectType({
|
|
|
15143
15149
|
});
|
|
15144
15150
|
const BaseNotificationParamsSchema = objectType({
|
|
15145
15151
|
/**
|
|
15146
|
-
*
|
|
15152
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15153
|
+
* for notes on _meta usage.
|
|
15147
15154
|
*/
|
|
15148
15155
|
_meta: optionalType(objectType({}).passthrough())
|
|
15149
15156
|
}).passthrough();
|
|
@@ -15153,7 +15160,8 @@ const NotificationSchema = objectType({
|
|
|
15153
15160
|
});
|
|
15154
15161
|
const ResultSchema = objectType({
|
|
15155
15162
|
/**
|
|
15156
|
-
*
|
|
15163
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15164
|
+
* for notes on _meta usage.
|
|
15157
15165
|
*/
|
|
15158
15166
|
_meta: optionalType(objectType({}).passthrough())
|
|
15159
15167
|
}).passthrough();
|
|
@@ -15224,10 +15232,22 @@ const CancelledNotificationSchema = NotificationSchema.extend({
|
|
|
15224
15232
|
reason: stringType().optional()
|
|
15225
15233
|
})
|
|
15226
15234
|
});
|
|
15227
|
-
const
|
|
15235
|
+
const BaseMetadataSchema = objectType({
|
|
15236
|
+
/** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
|
|
15228
15237
|
name: stringType(),
|
|
15229
|
-
|
|
15238
|
+
/**
|
|
15239
|
+
* Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
|
|
15240
|
+
* even by those unfamiliar with domain-specific terminology.
|
|
15241
|
+
*
|
|
15242
|
+
* If not provided, the name should be used for display (except for Tool,
|
|
15243
|
+
* where `annotations.title` should be given precedence over using `name`,
|
|
15244
|
+
* if present).
|
|
15245
|
+
*/
|
|
15246
|
+
title: optionalType(stringType())
|
|
15230
15247
|
}).passthrough();
|
|
15248
|
+
const ImplementationSchema = BaseMetadataSchema.extend({
|
|
15249
|
+
version: stringType()
|
|
15250
|
+
});
|
|
15231
15251
|
const ClientCapabilitiesSchema = objectType({
|
|
15232
15252
|
/**
|
|
15233
15253
|
* Experimental, non-standard capabilities that the client supports.
|
|
@@ -15237,6 +15257,10 @@ const ClientCapabilitiesSchema = objectType({
|
|
|
15237
15257
|
* Present if the client supports sampling from an LLM.
|
|
15238
15258
|
*/
|
|
15239
15259
|
sampling: optionalType(objectType({}).passthrough()),
|
|
15260
|
+
/**
|
|
15261
|
+
* Present if the client supports eliciting user input.
|
|
15262
|
+
*/
|
|
15263
|
+
elicitation: optionalType(objectType({}).passthrough()),
|
|
15240
15264
|
/**
|
|
15241
15265
|
* Present if the client supports listing roots.
|
|
15242
15266
|
*/
|
|
@@ -15371,7 +15395,12 @@ const ResourceContentsSchema = objectType({
|
|
|
15371
15395
|
/**
|
|
15372
15396
|
* The MIME type of this resource, if known.
|
|
15373
15397
|
*/
|
|
15374
|
-
mimeType: optionalType(stringType())
|
|
15398
|
+
mimeType: optionalType(stringType()),
|
|
15399
|
+
/**
|
|
15400
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15401
|
+
* for notes on _meta usage.
|
|
15402
|
+
*/
|
|
15403
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15375
15404
|
}).passthrough();
|
|
15376
15405
|
const TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
15377
15406
|
/**
|
|
@@ -15385,17 +15414,11 @@ const BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
|
15385
15414
|
*/
|
|
15386
15415
|
blob: stringType().base64()
|
|
15387
15416
|
});
|
|
15388
|
-
const ResourceSchema =
|
|
15417
|
+
const ResourceSchema = BaseMetadataSchema.extend({
|
|
15389
15418
|
/**
|
|
15390
15419
|
* The URI of this resource.
|
|
15391
15420
|
*/
|
|
15392
15421
|
uri: stringType(),
|
|
15393
|
-
/**
|
|
15394
|
-
* A human-readable name for this resource.
|
|
15395
|
-
*
|
|
15396
|
-
* This can be used by clients to populate UI elements.
|
|
15397
|
-
*/
|
|
15398
|
-
name: stringType(),
|
|
15399
15422
|
/**
|
|
15400
15423
|
* A description of what this resource represents.
|
|
15401
15424
|
*
|
|
@@ -15405,19 +15428,18 @@ const ResourceSchema = objectType({
|
|
|
15405
15428
|
/**
|
|
15406
15429
|
* The MIME type of this resource, if known.
|
|
15407
15430
|
*/
|
|
15408
|
-
mimeType: optionalType(stringType())
|
|
15409
|
-
}).passthrough();
|
|
15410
|
-
const ResourceTemplateSchema = objectType({
|
|
15431
|
+
mimeType: optionalType(stringType()),
|
|
15411
15432
|
/**
|
|
15412
|
-
*
|
|
15433
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15434
|
+
* for notes on _meta usage.
|
|
15413
15435
|
*/
|
|
15414
|
-
|
|
15436
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15437
|
+
});
|
|
15438
|
+
const ResourceTemplateSchema = BaseMetadataSchema.extend({
|
|
15415
15439
|
/**
|
|
15416
|
-
* A
|
|
15417
|
-
*
|
|
15418
|
-
* This can be used by clients to populate UI elements.
|
|
15440
|
+
* A URI template (according to RFC 6570) that can be used to construct resource URIs.
|
|
15419
15441
|
*/
|
|
15420
|
-
|
|
15442
|
+
uriTemplate: stringType(),
|
|
15421
15443
|
/**
|
|
15422
15444
|
* A description of what this template is for.
|
|
15423
15445
|
*
|
|
@@ -15427,8 +15449,13 @@ const ResourceTemplateSchema = objectType({
|
|
|
15427
15449
|
/**
|
|
15428
15450
|
* The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
|
|
15429
15451
|
*/
|
|
15430
|
-
mimeType: optionalType(stringType())
|
|
15431
|
-
|
|
15452
|
+
mimeType: optionalType(stringType()),
|
|
15453
|
+
/**
|
|
15454
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15455
|
+
* for notes on _meta usage.
|
|
15456
|
+
*/
|
|
15457
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15458
|
+
});
|
|
15432
15459
|
const ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
15433
15460
|
method: literalType("resources/list")
|
|
15434
15461
|
});
|
|
@@ -15497,11 +15524,7 @@ const PromptArgumentSchema = objectType({
|
|
|
15497
15524
|
*/
|
|
15498
15525
|
required: optionalType(booleanType())
|
|
15499
15526
|
}).passthrough();
|
|
15500
|
-
const PromptSchema =
|
|
15501
|
-
/**
|
|
15502
|
-
* The name of the prompt or prompt template.
|
|
15503
|
-
*/
|
|
15504
|
-
name: stringType(),
|
|
15527
|
+
const PromptSchema = BaseMetadataSchema.extend({
|
|
15505
15528
|
/**
|
|
15506
15529
|
* An optional description of what this prompt provides
|
|
15507
15530
|
*/
|
|
@@ -15509,8 +15532,13 @@ const PromptSchema = objectType({
|
|
|
15509
15532
|
/**
|
|
15510
15533
|
* A list of arguments to use for templating the prompt.
|
|
15511
15534
|
*/
|
|
15512
|
-
arguments: optionalType(arrayType(PromptArgumentSchema))
|
|
15513
|
-
|
|
15535
|
+
arguments: optionalType(arrayType(PromptArgumentSchema)),
|
|
15536
|
+
/**
|
|
15537
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15538
|
+
* for notes on _meta usage.
|
|
15539
|
+
*/
|
|
15540
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15541
|
+
});
|
|
15514
15542
|
const ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
15515
15543
|
method: literalType("prompts/list")
|
|
15516
15544
|
});
|
|
@@ -15535,7 +15563,12 @@ const TextContentSchema = objectType({
|
|
|
15535
15563
|
/**
|
|
15536
15564
|
* The text content of the message.
|
|
15537
15565
|
*/
|
|
15538
|
-
text: stringType()
|
|
15566
|
+
text: stringType(),
|
|
15567
|
+
/**
|
|
15568
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15569
|
+
* for notes on _meta usage.
|
|
15570
|
+
*/
|
|
15571
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15539
15572
|
}).passthrough();
|
|
15540
15573
|
const ImageContentSchema = objectType({
|
|
15541
15574
|
type: literalType("image"),
|
|
@@ -15546,7 +15579,12 @@ const ImageContentSchema = objectType({
|
|
|
15546
15579
|
/**
|
|
15547
15580
|
* The MIME type of the image. Different providers may support different image types.
|
|
15548
15581
|
*/
|
|
15549
|
-
mimeType: stringType()
|
|
15582
|
+
mimeType: stringType(),
|
|
15583
|
+
/**
|
|
15584
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15585
|
+
* for notes on _meta usage.
|
|
15586
|
+
*/
|
|
15587
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15550
15588
|
}).passthrough();
|
|
15551
15589
|
const AudioContentSchema = objectType({
|
|
15552
15590
|
type: literalType("audio"),
|
|
@@ -15557,20 +15595,35 @@ const AudioContentSchema = objectType({
|
|
|
15557
15595
|
/**
|
|
15558
15596
|
* The MIME type of the audio. Different providers may support different audio types.
|
|
15559
15597
|
*/
|
|
15560
|
-
mimeType: stringType()
|
|
15598
|
+
mimeType: stringType(),
|
|
15599
|
+
/**
|
|
15600
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15601
|
+
* for notes on _meta usage.
|
|
15602
|
+
*/
|
|
15603
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15561
15604
|
}).passthrough();
|
|
15562
15605
|
const EmbeddedResourceSchema = objectType({
|
|
15563
15606
|
type: literalType("resource"),
|
|
15564
|
-
resource: unionType([TextResourceContentsSchema, BlobResourceContentsSchema])
|
|
15607
|
+
resource: unionType([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
15608
|
+
/**
|
|
15609
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15610
|
+
* for notes on _meta usage.
|
|
15611
|
+
*/
|
|
15612
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15565
15613
|
}).passthrough();
|
|
15614
|
+
const ResourceLinkSchema = ResourceSchema.extend({
|
|
15615
|
+
type: literalType("resource_link")
|
|
15616
|
+
});
|
|
15617
|
+
const ContentBlockSchema = unionType([
|
|
15618
|
+
TextContentSchema,
|
|
15619
|
+
ImageContentSchema,
|
|
15620
|
+
AudioContentSchema,
|
|
15621
|
+
ResourceLinkSchema,
|
|
15622
|
+
EmbeddedResourceSchema
|
|
15623
|
+
]);
|
|
15566
15624
|
const PromptMessageSchema = objectType({
|
|
15567
15625
|
role: enumType(["user", "assistant"]),
|
|
15568
|
-
content:
|
|
15569
|
-
TextContentSchema,
|
|
15570
|
-
ImageContentSchema,
|
|
15571
|
-
AudioContentSchema,
|
|
15572
|
-
EmbeddedResourceSchema
|
|
15573
|
-
])
|
|
15626
|
+
content: ContentBlockSchema
|
|
15574
15627
|
}).passthrough();
|
|
15575
15628
|
const GetPromptResultSchema = ResultSchema.extend({
|
|
15576
15629
|
/**
|
|
@@ -15621,11 +15674,7 @@ const ToolAnnotationsSchema = objectType({
|
|
|
15621
15674
|
*/
|
|
15622
15675
|
openWorldHint: optionalType(booleanType())
|
|
15623
15676
|
}).passthrough();
|
|
15624
|
-
const ToolSchema =
|
|
15625
|
-
/**
|
|
15626
|
-
* The name of the tool.
|
|
15627
|
-
*/
|
|
15628
|
-
name: stringType(),
|
|
15677
|
+
const ToolSchema = BaseMetadataSchema.extend({
|
|
15629
15678
|
/**
|
|
15630
15679
|
* A human-readable description of the tool.
|
|
15631
15680
|
*/
|
|
@@ -15650,8 +15699,13 @@ const ToolSchema = objectType({
|
|
|
15650
15699
|
/**
|
|
15651
15700
|
* Optional additional tool information.
|
|
15652
15701
|
*/
|
|
15653
|
-
annotations: optionalType(ToolAnnotationsSchema)
|
|
15654
|
-
|
|
15702
|
+
annotations: optionalType(ToolAnnotationsSchema),
|
|
15703
|
+
/**
|
|
15704
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15705
|
+
* for notes on _meta usage.
|
|
15706
|
+
*/
|
|
15707
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15708
|
+
});
|
|
15655
15709
|
const ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
15656
15710
|
method: literalType("tools/list")
|
|
15657
15711
|
});
|
|
@@ -15665,12 +15719,7 @@ const CallToolResultSchema = ResultSchema.extend({
|
|
|
15665
15719
|
* If the Tool does not define an outputSchema, this field MUST be present in the result.
|
|
15666
15720
|
* For backwards compatibility, this field is always present, but it may be empty.
|
|
15667
15721
|
*/
|
|
15668
|
-
content: arrayType(
|
|
15669
|
-
TextContentSchema,
|
|
15670
|
-
ImageContentSchema,
|
|
15671
|
-
AudioContentSchema,
|
|
15672
|
-
EmbeddedResourceSchema
|
|
15673
|
-
])).default([]),
|
|
15722
|
+
content: arrayType(ContentBlockSchema).default([]),
|
|
15674
15723
|
/**
|
|
15675
15724
|
* An object containing structured tool output.
|
|
15676
15725
|
*
|
|
@@ -15814,7 +15863,68 @@ const CreateMessageResultSchema = ResultSchema.extend({
|
|
|
15814
15863
|
AudioContentSchema
|
|
15815
15864
|
])
|
|
15816
15865
|
});
|
|
15817
|
-
const
|
|
15866
|
+
const BooleanSchemaSchema = objectType({
|
|
15867
|
+
type: literalType("boolean"),
|
|
15868
|
+
title: optionalType(stringType()),
|
|
15869
|
+
description: optionalType(stringType()),
|
|
15870
|
+
default: optionalType(booleanType())
|
|
15871
|
+
}).passthrough();
|
|
15872
|
+
const StringSchemaSchema = objectType({
|
|
15873
|
+
type: literalType("string"),
|
|
15874
|
+
title: optionalType(stringType()),
|
|
15875
|
+
description: optionalType(stringType()),
|
|
15876
|
+
minLength: optionalType(numberType()),
|
|
15877
|
+
maxLength: optionalType(numberType()),
|
|
15878
|
+
format: optionalType(enumType(["email", "uri", "date", "date-time"]))
|
|
15879
|
+
}).passthrough();
|
|
15880
|
+
const NumberSchemaSchema = objectType({
|
|
15881
|
+
type: enumType(["number", "integer"]),
|
|
15882
|
+
title: optionalType(stringType()),
|
|
15883
|
+
description: optionalType(stringType()),
|
|
15884
|
+
minimum: optionalType(numberType()),
|
|
15885
|
+
maximum: optionalType(numberType())
|
|
15886
|
+
}).passthrough();
|
|
15887
|
+
const EnumSchemaSchema = objectType({
|
|
15888
|
+
type: literalType("string"),
|
|
15889
|
+
title: optionalType(stringType()),
|
|
15890
|
+
description: optionalType(stringType()),
|
|
15891
|
+
enum: arrayType(stringType()),
|
|
15892
|
+
enumNames: optionalType(arrayType(stringType()))
|
|
15893
|
+
}).passthrough();
|
|
15894
|
+
const PrimitiveSchemaDefinitionSchema = unionType([
|
|
15895
|
+
BooleanSchemaSchema,
|
|
15896
|
+
StringSchemaSchema,
|
|
15897
|
+
NumberSchemaSchema,
|
|
15898
|
+
EnumSchemaSchema
|
|
15899
|
+
]);
|
|
15900
|
+
const ElicitRequestSchema = RequestSchema.extend({
|
|
15901
|
+
method: literalType("elicitation/create"),
|
|
15902
|
+
params: BaseRequestParamsSchema.extend({
|
|
15903
|
+
/**
|
|
15904
|
+
* The message to present to the user.
|
|
15905
|
+
*/
|
|
15906
|
+
message: stringType(),
|
|
15907
|
+
/**
|
|
15908
|
+
* The schema for the requested user input.
|
|
15909
|
+
*/
|
|
15910
|
+
requestedSchema: objectType({
|
|
15911
|
+
type: literalType("object"),
|
|
15912
|
+
properties: recordType(stringType(), PrimitiveSchemaDefinitionSchema),
|
|
15913
|
+
required: optionalType(arrayType(stringType()))
|
|
15914
|
+
}).passthrough()
|
|
15915
|
+
})
|
|
15916
|
+
});
|
|
15917
|
+
const ElicitResultSchema = ResultSchema.extend({
|
|
15918
|
+
/**
|
|
15919
|
+
* The user's response action.
|
|
15920
|
+
*/
|
|
15921
|
+
action: enumType(["accept", "decline", "cancel"]),
|
|
15922
|
+
/**
|
|
15923
|
+
* The collected user input content (only present if action is "accept").
|
|
15924
|
+
*/
|
|
15925
|
+
content: optionalType(recordType(stringType(), unknownType()))
|
|
15926
|
+
});
|
|
15927
|
+
const ResourceTemplateReferenceSchema = objectType({
|
|
15818
15928
|
type: literalType("ref/resource"),
|
|
15819
15929
|
/**
|
|
15820
15930
|
* The URI or URI template of the resource.
|
|
@@ -15831,7 +15941,7 @@ const PromptReferenceSchema = objectType({
|
|
|
15831
15941
|
const CompleteRequestSchema = RequestSchema.extend({
|
|
15832
15942
|
method: literalType("completion/complete"),
|
|
15833
15943
|
params: BaseRequestParamsSchema.extend({
|
|
15834
|
-
ref: unionType([PromptReferenceSchema,
|
|
15944
|
+
ref: unionType([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
15835
15945
|
/**
|
|
15836
15946
|
* The argument's information
|
|
15837
15947
|
*/
|
|
@@ -15844,7 +15954,13 @@ const CompleteRequestSchema = RequestSchema.extend({
|
|
|
15844
15954
|
* The value of the argument to use for completion matching.
|
|
15845
15955
|
*/
|
|
15846
15956
|
value: stringType()
|
|
15847
|
-
}).passthrough()
|
|
15957
|
+
}).passthrough(),
|
|
15958
|
+
context: optionalType(objectType({
|
|
15959
|
+
/**
|
|
15960
|
+
* Previously-resolved variables in a URI template or prompt.
|
|
15961
|
+
*/
|
|
15962
|
+
arguments: optionalType(recordType(stringType(), stringType()))
|
|
15963
|
+
}))
|
|
15848
15964
|
})
|
|
15849
15965
|
});
|
|
15850
15966
|
const CompleteResultSchema = ResultSchema.extend({
|
|
@@ -15871,7 +15987,12 @@ const RootSchema = objectType({
|
|
|
15871
15987
|
/**
|
|
15872
15988
|
* An optional name for the root.
|
|
15873
15989
|
*/
|
|
15874
|
-
name: optionalType(stringType())
|
|
15990
|
+
name: optionalType(stringType()),
|
|
15991
|
+
/**
|
|
15992
|
+
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
|
|
15993
|
+
* for notes on _meta usage.
|
|
15994
|
+
*/
|
|
15995
|
+
_meta: optionalType(objectType({}).passthrough())
|
|
15875
15996
|
}).passthrough();
|
|
15876
15997
|
const ListRootsRequestSchema = RequestSchema.extend({
|
|
15877
15998
|
method: literalType("roots/list")
|
|
@@ -15906,11 +16027,13 @@ const ClientNotificationSchema = unionType([
|
|
|
15906
16027
|
unionType([
|
|
15907
16028
|
EmptyResultSchema,
|
|
15908
16029
|
CreateMessageResultSchema,
|
|
16030
|
+
ElicitResultSchema,
|
|
15909
16031
|
ListRootsResultSchema
|
|
15910
16032
|
]);
|
|
15911
16033
|
unionType([
|
|
15912
16034
|
PingRequestSchema,
|
|
15913
16035
|
CreateMessageRequestSchema,
|
|
16036
|
+
ElicitRequestSchema,
|
|
15914
16037
|
ListRootsRequestSchema
|
|
15915
16038
|
]);
|
|
15916
16039
|
const ServerNotificationSchema = unionType([
|
|
@@ -16005,7 +16128,8 @@ const OAuthClientMetadataSchema = objectType({
|
|
|
16005
16128
|
jwks_uri: stringType().optional(),
|
|
16006
16129
|
jwks: anyType().optional(),
|
|
16007
16130
|
software_id: stringType().optional(),
|
|
16008
|
-
software_version: stringType().optional()
|
|
16131
|
+
software_version: stringType().optional(),
|
|
16132
|
+
software_statement: stringType().optional()
|
|
16009
16133
|
}).strip();
|
|
16010
16134
|
const OAuthClientInformationSchema = objectType({
|
|
16011
16135
|
client_id: stringType(),
|
|
@@ -16074,6 +16198,7 @@ const EMPTY_DEBUGGER_STATE = {
|
|
|
16074
16198
|
oauthMetadata: null,
|
|
16075
16199
|
resourceMetadata: null,
|
|
16076
16200
|
resourceMetadataError: null,
|
|
16201
|
+
resource: null,
|
|
16077
16202
|
authServerUrl: null,
|
|
16078
16203
|
oauthClientInfo: null,
|
|
16079
16204
|
authorizationUrl: null,
|
|
@@ -16227,21 +16352,40 @@ async function pkceChallenge(length) {
|
|
|
16227
16352
|
code_challenge: challenge
|
|
16228
16353
|
};
|
|
16229
16354
|
}
|
|
16355
|
+
function resourceUrlFromServerUrl(url) {
|
|
16356
|
+
const resourceURL = typeof url === "string" ? new URL(url) : new URL(url.href);
|
|
16357
|
+
resourceURL.hash = "";
|
|
16358
|
+
return resourceURL;
|
|
16359
|
+
}
|
|
16360
|
+
function checkResourceAllowed({ requestedResource, configuredResource }) {
|
|
16361
|
+
const requested = typeof requestedResource === "string" ? new URL(requestedResource) : new URL(requestedResource.href);
|
|
16362
|
+
const configured = typeof configuredResource === "string" ? new URL(configuredResource) : new URL(configuredResource.href);
|
|
16363
|
+
if (requested.origin !== configured.origin) {
|
|
16364
|
+
return false;
|
|
16365
|
+
}
|
|
16366
|
+
if (requested.pathname.length < configured.pathname.length) {
|
|
16367
|
+
return false;
|
|
16368
|
+
}
|
|
16369
|
+
const requestedPath = requested.pathname.endsWith("/") ? requested.pathname : requested.pathname + "/";
|
|
16370
|
+
const configuredPath = configured.pathname.endsWith("/") ? configured.pathname : configured.pathname + "/";
|
|
16371
|
+
return requestedPath.startsWith(configuredPath);
|
|
16372
|
+
}
|
|
16230
16373
|
class UnauthorizedError extends Error {
|
|
16231
16374
|
constructor(message) {
|
|
16232
16375
|
super(message !== null && message !== void 0 ? message : "Unauthorized");
|
|
16233
16376
|
}
|
|
16234
16377
|
}
|
|
16235
16378
|
async function auth(provider, { serverUrl, authorizationCode, scope, resourceMetadataUrl }) {
|
|
16379
|
+
let resourceMetadata;
|
|
16236
16380
|
let authorizationServerUrl = serverUrl;
|
|
16237
16381
|
try {
|
|
16238
|
-
|
|
16382
|
+
resourceMetadata = await discoverOAuthProtectedResourceMetadata(serverUrl, { resourceMetadataUrl });
|
|
16239
16383
|
if (resourceMetadata.authorization_servers && resourceMetadata.authorization_servers.length > 0) {
|
|
16240
16384
|
authorizationServerUrl = resourceMetadata.authorization_servers[0];
|
|
16241
16385
|
}
|
|
16242
|
-
} catch (
|
|
16243
|
-
console.warn("Could not load OAuth Protected Resource metadata, falling back to /.well-known/oauth-authorization-server", error);
|
|
16386
|
+
} catch (_a) {
|
|
16244
16387
|
}
|
|
16388
|
+
const resource = await selectResourceURL(serverUrl, provider, resourceMetadata);
|
|
16245
16389
|
const metadata = await discoverOAuthMetadata(authorizationServerUrl);
|
|
16246
16390
|
let clientInformation = await Promise.resolve(provider.clientInformation());
|
|
16247
16391
|
if (!clientInformation) {
|
|
@@ -16265,7 +16409,8 @@ async function auth(provider, { serverUrl, authorizationCode, scope, resourceMet
|
|
|
16265
16409
|
clientInformation,
|
|
16266
16410
|
authorizationCode,
|
|
16267
16411
|
codeVerifier: codeVerifier2,
|
|
16268
|
-
redirectUri: provider.redirectUrl
|
|
16412
|
+
redirectUri: provider.redirectUrl,
|
|
16413
|
+
resource
|
|
16269
16414
|
});
|
|
16270
16415
|
await provider.saveTokens(tokens2);
|
|
16271
16416
|
return "AUTHORIZED";
|
|
@@ -16276,12 +16421,12 @@ async function auth(provider, { serverUrl, authorizationCode, scope, resourceMet
|
|
|
16276
16421
|
const newTokens = await refreshAuthorization(authorizationServerUrl, {
|
|
16277
16422
|
metadata,
|
|
16278
16423
|
clientInformation,
|
|
16279
|
-
refreshToken: tokens.refresh_token
|
|
16424
|
+
refreshToken: tokens.refresh_token,
|
|
16425
|
+
resource
|
|
16280
16426
|
});
|
|
16281
16427
|
await provider.saveTokens(newTokens);
|
|
16282
16428
|
return "AUTHORIZED";
|
|
16283
|
-
} catch (
|
|
16284
|
-
console.error("Could not refresh OAuth tokens:", error);
|
|
16429
|
+
} catch (_b) {
|
|
16285
16430
|
}
|
|
16286
16431
|
}
|
|
16287
16432
|
const state = provider.state ? await provider.state() : void 0;
|
|
@@ -16290,12 +16435,26 @@ async function auth(provider, { serverUrl, authorizationCode, scope, resourceMet
|
|
|
16290
16435
|
clientInformation,
|
|
16291
16436
|
state,
|
|
16292
16437
|
redirectUrl: provider.redirectUrl,
|
|
16293
|
-
scope: scope || provider.clientMetadata.scope
|
|
16438
|
+
scope: scope || provider.clientMetadata.scope,
|
|
16439
|
+
resource
|
|
16294
16440
|
});
|
|
16295
16441
|
await provider.saveCodeVerifier(codeVerifier);
|
|
16296
16442
|
await provider.redirectToAuthorization(authorizationUrl);
|
|
16297
16443
|
return "REDIRECT";
|
|
16298
16444
|
}
|
|
16445
|
+
async function selectResourceURL(serverUrl, provider, resourceMetadata) {
|
|
16446
|
+
const defaultResource = resourceUrlFromServerUrl(serverUrl);
|
|
16447
|
+
if (provider.validateResourceURL) {
|
|
16448
|
+
return await provider.validateResourceURL(defaultResource, resourceMetadata === null || resourceMetadata === void 0 ? void 0 : resourceMetadata.resource);
|
|
16449
|
+
}
|
|
16450
|
+
if (!resourceMetadata) {
|
|
16451
|
+
return void 0;
|
|
16452
|
+
}
|
|
16453
|
+
if (!checkResourceAllowed({ requestedResource: defaultResource, configuredResource: resourceMetadata.resource })) {
|
|
16454
|
+
throw new Error(`Protected resource ${resourceMetadata.resource} does not match expected ${defaultResource} (or origin)`);
|
|
16455
|
+
}
|
|
16456
|
+
return new URL(resourceMetadata.resource);
|
|
16457
|
+
}
|
|
16299
16458
|
function extractResourceMetadataUrl(res) {
|
|
16300
16459
|
const authenticateHeader = res.headers.get("WWW-Authenticate");
|
|
16301
16460
|
if (!authenticateHeader) {
|
|
@@ -16303,7 +16462,6 @@ function extractResourceMetadataUrl(res) {
|
|
|
16303
16462
|
}
|
|
16304
16463
|
const [type2, scheme] = authenticateHeader.split(" ");
|
|
16305
16464
|
if (type2.toLowerCase() !== "bearer" || !scheme) {
|
|
16306
|
-
console.log("Invalid WWW-Authenticate header format, expected 'Bearer'");
|
|
16307
16465
|
return void 0;
|
|
16308
16466
|
}
|
|
16309
16467
|
const regex = /resource_metadata="([^"]*)"/;
|
|
@@ -16314,14 +16472,15 @@ function extractResourceMetadataUrl(res) {
|
|
|
16314
16472
|
try {
|
|
16315
16473
|
return new URL(match[1]);
|
|
16316
16474
|
} catch (_a) {
|
|
16317
|
-
console.log("Invalid resource metadata url: ", match[1]);
|
|
16318
16475
|
return void 0;
|
|
16319
16476
|
}
|
|
16320
16477
|
}
|
|
16321
16478
|
async function discoverOAuthProtectedResourceMetadata(serverUrl, opts) {
|
|
16322
16479
|
var _a;
|
|
16323
16480
|
let url;
|
|
16324
|
-
{
|
|
16481
|
+
if (opts === null || opts === void 0 ? void 0 : opts.resourceMetadataUrl) {
|
|
16482
|
+
url = new URL(opts === null || opts === void 0 ? void 0 : opts.resourceMetadataUrl);
|
|
16483
|
+
} else {
|
|
16325
16484
|
url = new URL("/.well-known/oauth-protected-resource", serverUrl);
|
|
16326
16485
|
}
|
|
16327
16486
|
let response;
|
|
@@ -16346,24 +16505,48 @@ async function discoverOAuthProtectedResourceMetadata(serverUrl, opts) {
|
|
|
16346
16505
|
}
|
|
16347
16506
|
return OAuthProtectedResourceMetadataSchema.parse(await response.json());
|
|
16348
16507
|
}
|
|
16349
|
-
async function
|
|
16350
|
-
var _a;
|
|
16351
|
-
const url = new URL("/.well-known/oauth-authorization-server", authorizationServerUrl);
|
|
16352
|
-
let response;
|
|
16508
|
+
async function fetchWithCorsRetry(url, headers) {
|
|
16353
16509
|
try {
|
|
16354
|
-
|
|
16355
|
-
headers: {
|
|
16356
|
-
"MCP-Protocol-Version": (_a = opts === null || opts === void 0 ? void 0 : opts.protocolVersion) !== null && _a !== void 0 ? _a : LATEST_PROTOCOL_VERSION
|
|
16357
|
-
}
|
|
16358
|
-
});
|
|
16510
|
+
return await fetch(url, { headers });
|
|
16359
16511
|
} catch (error) {
|
|
16360
16512
|
if (error instanceof TypeError) {
|
|
16361
|
-
|
|
16362
|
-
|
|
16363
|
-
|
|
16513
|
+
if (headers) {
|
|
16514
|
+
return fetchWithCorsRetry(url);
|
|
16515
|
+
} else {
|
|
16516
|
+
return void 0;
|
|
16517
|
+
}
|
|
16364
16518
|
}
|
|
16519
|
+
throw error;
|
|
16365
16520
|
}
|
|
16366
|
-
|
|
16521
|
+
}
|
|
16522
|
+
function buildWellKnownPath(pathname) {
|
|
16523
|
+
let wellKnownPath = `/.well-known/oauth-authorization-server${pathname}`;
|
|
16524
|
+
if (pathname.endsWith("/")) {
|
|
16525
|
+
wellKnownPath = wellKnownPath.slice(0, -1);
|
|
16526
|
+
}
|
|
16527
|
+
return wellKnownPath;
|
|
16528
|
+
}
|
|
16529
|
+
async function tryMetadataDiscovery(url, protocolVersion) {
|
|
16530
|
+
const headers = {
|
|
16531
|
+
"MCP-Protocol-Version": protocolVersion
|
|
16532
|
+
};
|
|
16533
|
+
return await fetchWithCorsRetry(url, headers);
|
|
16534
|
+
}
|
|
16535
|
+
function shouldAttemptFallback(response, pathname) {
|
|
16536
|
+
return !response || response.status === 404 && pathname !== "/";
|
|
16537
|
+
}
|
|
16538
|
+
async function discoverOAuthMetadata(authorizationServerUrl, opts) {
|
|
16539
|
+
var _a;
|
|
16540
|
+
const issuer = new URL(authorizationServerUrl);
|
|
16541
|
+
const protocolVersion = (_a = void 0) !== null && _a !== void 0 ? _a : LATEST_PROTOCOL_VERSION;
|
|
16542
|
+
const wellKnownPath = buildWellKnownPath(issuer.pathname);
|
|
16543
|
+
const pathAwareUrl = new URL(wellKnownPath, issuer);
|
|
16544
|
+
let response = await tryMetadataDiscovery(pathAwareUrl, protocolVersion);
|
|
16545
|
+
if (shouldAttemptFallback(response, issuer.pathname)) {
|
|
16546
|
+
const rootUrl = new URL("/.well-known/oauth-authorization-server", issuer);
|
|
16547
|
+
response = await tryMetadataDiscovery(rootUrl, protocolVersion);
|
|
16548
|
+
}
|
|
16549
|
+
if (!response || response.status === 404) {
|
|
16367
16550
|
return void 0;
|
|
16368
16551
|
}
|
|
16369
16552
|
if (!response.ok) {
|
|
@@ -16371,7 +16554,7 @@ async function discoverOAuthMetadata(authorizationServerUrl, opts) {
|
|
|
16371
16554
|
}
|
|
16372
16555
|
return OAuthMetadataSchema.parse(await response.json());
|
|
16373
16556
|
}
|
|
16374
|
-
async function startAuthorization(authorizationServerUrl, { metadata, clientInformation, redirectUrl, scope, state }) {
|
|
16557
|
+
async function startAuthorization(authorizationServerUrl, { metadata, clientInformation, redirectUrl, scope, state, resource }) {
|
|
16375
16558
|
const responseType = "code";
|
|
16376
16559
|
const codeChallengeMethod = "S256";
|
|
16377
16560
|
let authorizationUrl;
|
|
@@ -16400,9 +16583,12 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
|
|
|
16400
16583
|
if (scope) {
|
|
16401
16584
|
authorizationUrl.searchParams.set("scope", scope);
|
|
16402
16585
|
}
|
|
16586
|
+
if (resource) {
|
|
16587
|
+
authorizationUrl.searchParams.set("resource", resource.href);
|
|
16588
|
+
}
|
|
16403
16589
|
return { authorizationUrl, codeVerifier };
|
|
16404
16590
|
}
|
|
16405
|
-
async function exchangeAuthorization(authorizationServerUrl, { metadata, clientInformation, authorizationCode, codeVerifier, redirectUri }) {
|
|
16591
|
+
async function exchangeAuthorization(authorizationServerUrl, { metadata, clientInformation, authorizationCode, codeVerifier, redirectUri, resource }) {
|
|
16406
16592
|
const grantType = "authorization_code";
|
|
16407
16593
|
let tokenUrl;
|
|
16408
16594
|
if (metadata) {
|
|
@@ -16423,6 +16609,9 @@ async function exchangeAuthorization(authorizationServerUrl, { metadata, clientI
|
|
|
16423
16609
|
if (clientInformation.client_secret) {
|
|
16424
16610
|
params.set("client_secret", clientInformation.client_secret);
|
|
16425
16611
|
}
|
|
16612
|
+
if (resource) {
|
|
16613
|
+
params.set("resource", resource.href);
|
|
16614
|
+
}
|
|
16426
16615
|
const response = await fetch(tokenUrl, {
|
|
16427
16616
|
method: "POST",
|
|
16428
16617
|
headers: {
|
|
@@ -16435,7 +16624,7 @@ async function exchangeAuthorization(authorizationServerUrl, { metadata, clientI
|
|
|
16435
16624
|
}
|
|
16436
16625
|
return OAuthTokensSchema.parse(await response.json());
|
|
16437
16626
|
}
|
|
16438
|
-
async function refreshAuthorization(authorizationServerUrl, { metadata, clientInformation, refreshToken }) {
|
|
16627
|
+
async function refreshAuthorization(authorizationServerUrl, { metadata, clientInformation, refreshToken, resource }) {
|
|
16439
16628
|
const grantType = "refresh_token";
|
|
16440
16629
|
let tokenUrl;
|
|
16441
16630
|
if (metadata) {
|
|
@@ -16454,6 +16643,9 @@ async function refreshAuthorization(authorizationServerUrl, { metadata, clientIn
|
|
|
16454
16643
|
if (clientInformation.client_secret) {
|
|
16455
16644
|
params.set("client_secret", clientInformation.client_secret);
|
|
16456
16645
|
}
|
|
16646
|
+
if (resource) {
|
|
16647
|
+
params.set("resource", resource.href);
|
|
16648
|
+
}
|
|
16457
16649
|
const response = await fetch(tokenUrl, {
|
|
16458
16650
|
method: "POST",
|
|
16459
16651
|
headers: {
|
|
@@ -16493,14 +16685,14 @@ const oauthTransitions = {
|
|
|
16493
16685
|
canTransition: async () => true,
|
|
16494
16686
|
execute: async (context) => {
|
|
16495
16687
|
var _a;
|
|
16496
|
-
let authServerUrl = new URL(context.serverUrl);
|
|
16688
|
+
let authServerUrl = new URL("/", context.serverUrl);
|
|
16497
16689
|
let resourceMetadata = null;
|
|
16498
16690
|
let resourceMetadataError = null;
|
|
16499
16691
|
try {
|
|
16500
16692
|
resourceMetadata = await discoverOAuthProtectedResourceMetadata(
|
|
16501
16693
|
context.serverUrl
|
|
16502
16694
|
);
|
|
16503
|
-
if (
|
|
16695
|
+
if ((_a = resourceMetadata == null ? void 0 : resourceMetadata.authorization_servers) == null ? void 0 : _a.length) {
|
|
16504
16696
|
authServerUrl = new URL(resourceMetadata.authorization_servers[0]);
|
|
16505
16697
|
}
|
|
16506
16698
|
} catch (e) {
|
|
@@ -16510,6 +16702,12 @@ const oauthTransitions = {
|
|
|
16510
16702
|
resourceMetadataError = new Error(String(e));
|
|
16511
16703
|
}
|
|
16512
16704
|
}
|
|
16705
|
+
const resource = await selectResourceURL(
|
|
16706
|
+
context.serverUrl,
|
|
16707
|
+
context.provider,
|
|
16708
|
+
// we default to null, so swap it for undefined if not set
|
|
16709
|
+
resourceMetadata ?? void 0
|
|
16710
|
+
);
|
|
16513
16711
|
const metadata = await discoverOAuthMetadata(authServerUrl);
|
|
16514
16712
|
if (!metadata) {
|
|
16515
16713
|
throw new Error("Failed to discover OAuth metadata");
|
|
@@ -16518,6 +16716,7 @@ const oauthTransitions = {
|
|
|
16518
16716
|
context.provider.saveServerMetadata(parsedMetadata);
|
|
16519
16717
|
context.updateState({
|
|
16520
16718
|
resourceMetadata,
|
|
16719
|
+
resource,
|
|
16521
16720
|
resourceMetadataError,
|
|
16522
16721
|
authServerUrl,
|
|
16523
16722
|
oauthMetadata: parsedMetadata,
|
|
@@ -16561,7 +16760,8 @@ const oauthTransitions = {
|
|
|
16561
16760
|
metadata,
|
|
16562
16761
|
clientInformation,
|
|
16563
16762
|
redirectUrl: context.provider.redirectUrl,
|
|
16564
|
-
scope
|
|
16763
|
+
scope,
|
|
16764
|
+
resource: context.state.resource ?? void 0
|
|
16565
16765
|
}
|
|
16566
16766
|
);
|
|
16567
16767
|
context.provider.saveCodeVerifier(codeVerifier);
|
|
@@ -16599,7 +16799,8 @@ const oauthTransitions = {
|
|
|
16599
16799
|
clientInformation,
|
|
16600
16800
|
authorizationCode: context.state.authorizationCode,
|
|
16601
16801
|
codeVerifier,
|
|
16602
|
-
redirectUri: context.provider.redirectUrl
|
|
16802
|
+
redirectUri: context.provider.redirectUrl,
|
|
16803
|
+
resource: context.state.resource ?? void 0
|
|
16603
16804
|
});
|
|
16604
16805
|
context.provider.saveTokens(tokens);
|
|
16605
16806
|
context.updateState({
|
|
@@ -22710,38 +22911,44 @@ function validateToolOutput(toolName, structuredContent) {
|
|
|
22710
22911
|
function hasOutputSchema(toolName) {
|
|
22711
22912
|
return toolOutputValidators.has(toolName);
|
|
22712
22913
|
}
|
|
22713
|
-
function generateDefaultValue(schema) {
|
|
22714
|
-
if ("default" in schema) {
|
|
22914
|
+
function generateDefaultValue(schema, propertyName, parentSchema) {
|
|
22915
|
+
if ("default" in schema && schema.default !== void 0) {
|
|
22715
22916
|
return schema.default;
|
|
22716
22917
|
}
|
|
22717
|
-
|
|
22718
|
-
if (schema.type === "array") return [];
|
|
22719
|
-
if (schema.type === "object") return {};
|
|
22720
|
-
return void 0;
|
|
22721
|
-
}
|
|
22918
|
+
const isRequired = propertyName && parentSchema ? isPropertyRequired(propertyName, parentSchema) : false;
|
|
22722
22919
|
switch (schema.type) {
|
|
22723
22920
|
case "string":
|
|
22724
|
-
return "";
|
|
22921
|
+
return isRequired ? "" : void 0;
|
|
22725
22922
|
case "number":
|
|
22726
22923
|
case "integer":
|
|
22727
|
-
return 0;
|
|
22924
|
+
return isRequired ? 0 : void 0;
|
|
22728
22925
|
case "boolean":
|
|
22729
|
-
return false;
|
|
22926
|
+
return isRequired ? false : void 0;
|
|
22730
22927
|
case "array":
|
|
22731
22928
|
return [];
|
|
22732
22929
|
case "object": {
|
|
22733
22930
|
if (!schema.properties) return {};
|
|
22734
22931
|
const obj = {};
|
|
22735
|
-
Object.entries(schema.properties).
|
|
22736
|
-
|
|
22737
|
-
|
|
22932
|
+
Object.entries(schema.properties).forEach(([key, prop]) => {
|
|
22933
|
+
if (isPropertyRequired(key, schema)) {
|
|
22934
|
+
const value = generateDefaultValue(prop, key, schema);
|
|
22935
|
+
if (value !== void 0) {
|
|
22936
|
+
obj[key] = value;
|
|
22937
|
+
}
|
|
22938
|
+
}
|
|
22738
22939
|
});
|
|
22739
22940
|
return obj;
|
|
22740
22941
|
}
|
|
22741
|
-
|
|
22942
|
+
case "null":
|
|
22742
22943
|
return null;
|
|
22944
|
+
default:
|
|
22945
|
+
return void 0;
|
|
22743
22946
|
}
|
|
22744
22947
|
}
|
|
22948
|
+
function isPropertyRequired(propertyName, schema) {
|
|
22949
|
+
var _a;
|
|
22950
|
+
return ((_a = schema.required) == null ? void 0 : _a.includes(propertyName)) ?? false;
|
|
22951
|
+
}
|
|
22745
22952
|
const DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
22746
22953
|
class Protocol {
|
|
22747
22954
|
constructor(_options) {
|
|
@@ -22802,14 +23009,21 @@ class Protocol {
|
|
|
22802
23009
|
* The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
|
|
22803
23010
|
*/
|
|
22804
23011
|
async connect(transport) {
|
|
23012
|
+
var _a, _b, _c;
|
|
22805
23013
|
this._transport = transport;
|
|
23014
|
+
const _onclose = (_a = this.transport) === null || _a === void 0 ? void 0 : _a.onclose;
|
|
22806
23015
|
this._transport.onclose = () => {
|
|
23016
|
+
_onclose === null || _onclose === void 0 ? void 0 : _onclose();
|
|
22807
23017
|
this._onclose();
|
|
22808
23018
|
};
|
|
23019
|
+
const _onerror = (_b = this.transport) === null || _b === void 0 ? void 0 : _b.onerror;
|
|
22809
23020
|
this._transport.onerror = (error) => {
|
|
23021
|
+
_onerror === null || _onerror === void 0 ? void 0 : _onerror(error);
|
|
22810
23022
|
this._onerror(error);
|
|
22811
23023
|
};
|
|
23024
|
+
const _onmessage = (_c = this._transport) === null || _c === void 0 ? void 0 : _c.onmessage;
|
|
22812
23025
|
this._transport.onmessage = (message, extra) => {
|
|
23026
|
+
_onmessage === null || _onmessage === void 0 ? void 0 : _onmessage(message, extra);
|
|
22813
23027
|
if (isJSONRPCResponse(message) || isJSONRPCError(message)) {
|
|
22814
23028
|
this._onresponse(message);
|
|
22815
23029
|
} else if (isJSONRPCRequest(message)) {
|
|
@@ -22869,7 +23083,8 @@ class Protocol {
|
|
|
22869
23083
|
sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
|
|
22870
23084
|
sendRequest: (r2, resultSchema, options) => this.request(r2, resultSchema, { ...options, relatedRequestId: request.id }),
|
|
22871
23085
|
authInfo: extra === null || extra === void 0 ? void 0 : extra.authInfo,
|
|
22872
|
-
requestId: request.id
|
|
23086
|
+
requestId: request.id,
|
|
23087
|
+
requestInfo: extra === null || extra === void 0 ? void 0 : extra.requestInfo
|
|
22873
23088
|
};
|
|
22874
23089
|
Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
|
|
22875
23090
|
var _a2;
|
|
@@ -23137,6 +23352,9 @@ class Client extends Protocol {
|
|
|
23137
23352
|
}
|
|
23138
23353
|
this._serverCapabilities = result.capabilities;
|
|
23139
23354
|
this._serverVersion = result.serverInfo;
|
|
23355
|
+
if (transport.setProtocolVersion) {
|
|
23356
|
+
transport.setProtocolVersion(result.protocolVersion);
|
|
23357
|
+
}
|
|
23140
23358
|
this._instructions = result.instructions;
|
|
23141
23359
|
await this.notification({
|
|
23142
23360
|
method: "notifications/initialized"
|
|
@@ -23220,6 +23438,11 @@ class Client extends Protocol {
|
|
|
23220
23438
|
throw new Error(`Client does not support sampling capability (required for ${method})`);
|
|
23221
23439
|
}
|
|
23222
23440
|
break;
|
|
23441
|
+
case "elicitation/create":
|
|
23442
|
+
if (!this._capabilities.elicitation) {
|
|
23443
|
+
throw new Error(`Client does not support elicitation capability (required for ${method})`);
|
|
23444
|
+
}
|
|
23445
|
+
break;
|
|
23223
23446
|
case "roots/list":
|
|
23224
23447
|
if (!this._capabilities.roots) {
|
|
23225
23448
|
throw new Error(`Client does not support roots capability (required for ${method})`);
|
|
@@ -23287,8 +23510,7 @@ class Client extends Protocol {
|
|
|
23287
23510
|
try {
|
|
23288
23511
|
const validator = this._ajv.compile(tool.outputSchema);
|
|
23289
23512
|
this._cachedToolOutputValidators.set(tool.name, validator);
|
|
23290
|
-
} catch (
|
|
23291
|
-
console.warn(`Failed to compile output schema for tool ${tool.name}: ${error}`);
|
|
23513
|
+
} catch (_a) {
|
|
23292
23514
|
}
|
|
23293
23515
|
}
|
|
23294
23516
|
}
|
|
@@ -23687,6 +23909,7 @@ class SSEClientTransport {
|
|
|
23687
23909
|
this._eventSourceInit = opts === null || opts === void 0 ? void 0 : opts.eventSourceInit;
|
|
23688
23910
|
this._requestInit = opts === null || opts === void 0 ? void 0 : opts.requestInit;
|
|
23689
23911
|
this._authProvider = opts === null || opts === void 0 ? void 0 : opts.authProvider;
|
|
23912
|
+
this._fetch = opts === null || opts === void 0 ? void 0 : opts.fetch;
|
|
23690
23913
|
}
|
|
23691
23914
|
async _authThenStart() {
|
|
23692
23915
|
var _a;
|
|
@@ -23707,26 +23930,40 @@ class SSEClientTransport {
|
|
|
23707
23930
|
}
|
|
23708
23931
|
async _commonHeaders() {
|
|
23709
23932
|
var _a;
|
|
23710
|
-
const headers = {
|
|
23933
|
+
const headers = {
|
|
23934
|
+
...(_a = this._requestInit) === null || _a === void 0 ? void 0 : _a.headers
|
|
23935
|
+
};
|
|
23711
23936
|
if (this._authProvider) {
|
|
23712
23937
|
const tokens = await this._authProvider.tokens();
|
|
23713
23938
|
if (tokens) {
|
|
23714
23939
|
headers["Authorization"] = `Bearer ${tokens.access_token}`;
|
|
23715
23940
|
}
|
|
23716
23941
|
}
|
|
23942
|
+
if (this._protocolVersion) {
|
|
23943
|
+
headers["mcp-protocol-version"] = this._protocolVersion;
|
|
23944
|
+
}
|
|
23717
23945
|
return headers;
|
|
23718
23946
|
}
|
|
23719
23947
|
_startOrAuth() {
|
|
23948
|
+
var _a, _b, _c;
|
|
23949
|
+
const fetchImpl = (_c = (_b = (_a = this === null || this === void 0 ? void 0 : this._eventSourceInit) === null || _a === void 0 ? void 0 : _a.fetch) !== null && _b !== void 0 ? _b : this._fetch) !== null && _c !== void 0 ? _c : fetch;
|
|
23720
23950
|
return new Promise((resolve, reject) => {
|
|
23721
|
-
|
|
23722
|
-
|
|
23723
|
-
fetch: (url, init) =>
|
|
23724
|
-
|
|
23725
|
-
|
|
23726
|
-
...
|
|
23727
|
-
|
|
23951
|
+
this._eventSource = new EventSource(this._url.href, {
|
|
23952
|
+
...this._eventSourceInit,
|
|
23953
|
+
fetch: async (url, init) => {
|
|
23954
|
+
const headers = await this._commonHeaders();
|
|
23955
|
+
const response = await fetchImpl(url, {
|
|
23956
|
+
...init,
|
|
23957
|
+
headers: new Headers({
|
|
23958
|
+
...headers,
|
|
23959
|
+
Accept: "text/event-stream"
|
|
23960
|
+
})
|
|
23961
|
+
});
|
|
23962
|
+
if (response.status === 401 && response.headers.has("www-authenticate")) {
|
|
23963
|
+
this._resourceMetadataUrl = extractResourceMetadataUrl(response);
|
|
23728
23964
|
}
|
|
23729
|
-
|
|
23965
|
+
return response;
|
|
23966
|
+
}
|
|
23730
23967
|
});
|
|
23731
23968
|
this._abortController = new AbortController();
|
|
23732
23969
|
this._eventSource.onerror = (event) => {
|
|
@@ -23758,7 +23995,7 @@ class SSEClientTransport {
|
|
|
23758
23995
|
resolve();
|
|
23759
23996
|
});
|
|
23760
23997
|
this._eventSource.onmessage = (event) => {
|
|
23761
|
-
var _a2,
|
|
23998
|
+
var _a2, _b2;
|
|
23762
23999
|
const messageEvent = event;
|
|
23763
24000
|
let message;
|
|
23764
24001
|
try {
|
|
@@ -23767,7 +24004,7 @@ class SSEClientTransport {
|
|
|
23767
24004
|
(_a2 = this.onerror) === null || _a2 === void 0 ? void 0 : _a2.call(this, error);
|
|
23768
24005
|
return;
|
|
23769
24006
|
}
|
|
23770
|
-
(
|
|
24007
|
+
(_b2 = this.onmessage) === null || _b2 === void 0 ? void 0 : _b2.call(this, message);
|
|
23771
24008
|
};
|
|
23772
24009
|
});
|
|
23773
24010
|
}
|
|
@@ -23802,16 +24039,16 @@ class SSEClientTransport {
|
|
|
23802
24039
|
}
|
|
23803
24040
|
try {
|
|
23804
24041
|
const commonHeaders = await this._commonHeaders();
|
|
23805
|
-
const headers = new Headers(
|
|
24042
|
+
const headers = new Headers(commonHeaders);
|
|
23806
24043
|
headers.set("content-type", "application/json");
|
|
23807
24044
|
const init = {
|
|
23808
24045
|
...this._requestInit,
|
|
23809
24046
|
method: "POST",
|
|
23810
24047
|
headers,
|
|
23811
24048
|
body: JSON.stringify(message),
|
|
23812
|
-
signal: (
|
|
24049
|
+
signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal
|
|
23813
24050
|
};
|
|
23814
|
-
const response = await fetch(this._endpoint, init);
|
|
24051
|
+
const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._endpoint, init);
|
|
23815
24052
|
if (!response.ok) {
|
|
23816
24053
|
if (response.status === 401 && this._authProvider) {
|
|
23817
24054
|
this._resourceMetadataUrl = extractResourceMetadataUrl(response);
|
|
@@ -23829,6 +24066,9 @@ class SSEClientTransport {
|
|
|
23829
24066
|
throw error;
|
|
23830
24067
|
}
|
|
23831
24068
|
}
|
|
24069
|
+
setProtocolVersion(version2) {
|
|
24070
|
+
this._protocolVersion = version2;
|
|
24071
|
+
}
|
|
23832
24072
|
}
|
|
23833
24073
|
class EventSourceParserStream extends TransformStream {
|
|
23834
24074
|
constructor({ onError, onRetry, onComment } = {}) {
|
|
@@ -23871,6 +24111,7 @@ class StreamableHTTPClientTransport {
|
|
|
23871
24111
|
this._resourceMetadataUrl = void 0;
|
|
23872
24112
|
this._requestInit = opts === null || opts === void 0 ? void 0 : opts.requestInit;
|
|
23873
24113
|
this._authProvider = opts === null || opts === void 0 ? void 0 : opts.authProvider;
|
|
24114
|
+
this._fetch = opts === null || opts === void 0 ? void 0 : opts.fetch;
|
|
23874
24115
|
this._sessionId = opts === null || opts === void 0 ? void 0 : opts.sessionId;
|
|
23875
24116
|
this._reconnectionOptions = (_a = opts === null || opts === void 0 ? void 0 : opts.reconnectionOptions) !== null && _a !== void 0 ? _a : DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS;
|
|
23876
24117
|
}
|
|
@@ -23903,10 +24144,17 @@ class StreamableHTTPClientTransport {
|
|
|
23903
24144
|
if (this._sessionId) {
|
|
23904
24145
|
headers["mcp-session-id"] = this._sessionId;
|
|
23905
24146
|
}
|
|
23906
|
-
|
|
24147
|
+
if (this._protocolVersion) {
|
|
24148
|
+
headers["mcp-protocol-version"] = this._protocolVersion;
|
|
24149
|
+
}
|
|
24150
|
+
const extraHeaders = this._normalizeHeaders((_a = this._requestInit) === null || _a === void 0 ? void 0 : _a.headers);
|
|
24151
|
+
return new Headers({
|
|
24152
|
+
...headers,
|
|
24153
|
+
...extraHeaders
|
|
24154
|
+
});
|
|
23907
24155
|
}
|
|
23908
24156
|
async _startOrAuthSse(options) {
|
|
23909
|
-
var _a, _b;
|
|
24157
|
+
var _a, _b, _c;
|
|
23910
24158
|
const { resumptionToken } = options;
|
|
23911
24159
|
try {
|
|
23912
24160
|
const headers = await this._commonHeaders();
|
|
@@ -23914,10 +24162,10 @@ class StreamableHTTPClientTransport {
|
|
|
23914
24162
|
if (resumptionToken) {
|
|
23915
24163
|
headers.set("last-event-id", resumptionToken);
|
|
23916
24164
|
}
|
|
23917
|
-
const response = await fetch(this._url, {
|
|
24165
|
+
const response = await ((_a = this._fetch) !== null && _a !== void 0 ? _a : fetch)(this._url, {
|
|
23918
24166
|
method: "GET",
|
|
23919
24167
|
headers,
|
|
23920
|
-
signal: (
|
|
24168
|
+
signal: (_b = this._abortController) === null || _b === void 0 ? void 0 : _b.signal
|
|
23921
24169
|
});
|
|
23922
24170
|
if (!response.ok) {
|
|
23923
24171
|
if (response.status === 401 && this._authProvider) {
|
|
@@ -23930,7 +24178,7 @@ class StreamableHTTPClientTransport {
|
|
|
23930
24178
|
}
|
|
23931
24179
|
this._handleSseStream(response.body, options);
|
|
23932
24180
|
} catch (error) {
|
|
23933
|
-
(
|
|
24181
|
+
(_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);
|
|
23934
24182
|
throw error;
|
|
23935
24183
|
}
|
|
23936
24184
|
}
|
|
@@ -23946,6 +24194,17 @@ class StreamableHTTPClientTransport {
|
|
|
23946
24194
|
const maxDelay = this._reconnectionOptions.maxReconnectionDelay;
|
|
23947
24195
|
return Math.min(initialDelay * Math.pow(growFactor, attempt), maxDelay);
|
|
23948
24196
|
}
|
|
24197
|
+
_normalizeHeaders(headers) {
|
|
24198
|
+
if (!headers)
|
|
24199
|
+
return {};
|
|
24200
|
+
if (headers instanceof Headers) {
|
|
24201
|
+
return Object.fromEntries(headers.entries());
|
|
24202
|
+
}
|
|
24203
|
+
if (Array.isArray(headers)) {
|
|
24204
|
+
return Object.fromEntries(headers);
|
|
24205
|
+
}
|
|
24206
|
+
return { ...headers };
|
|
24207
|
+
}
|
|
23949
24208
|
/**
|
|
23950
24209
|
* Schedule a reconnection attempt with exponential backoff
|
|
23951
24210
|
*
|
|
@@ -24042,7 +24301,7 @@ class StreamableHTTPClientTransport {
|
|
|
24042
24301
|
(_b = this.onclose) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
24043
24302
|
}
|
|
24044
24303
|
async send(message, options) {
|
|
24045
|
-
var _a, _b, _c;
|
|
24304
|
+
var _a, _b, _c, _d;
|
|
24046
24305
|
try {
|
|
24047
24306
|
const { resumptionToken, onresumptiontoken } = options || {};
|
|
24048
24307
|
if (resumptionToken) {
|
|
@@ -24062,7 +24321,7 @@ class StreamableHTTPClientTransport {
|
|
|
24062
24321
|
body: JSON.stringify(message),
|
|
24063
24322
|
signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal
|
|
24064
24323
|
};
|
|
24065
|
-
const response = await fetch(this._url, init);
|
|
24324
|
+
const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);
|
|
24066
24325
|
const sessionId = response.headers.get("mcp-session-id");
|
|
24067
24326
|
if (sessionId) {
|
|
24068
24327
|
this._sessionId = sessionId;
|
|
@@ -24098,14 +24357,14 @@ class StreamableHTTPClientTransport {
|
|
|
24098
24357
|
const data2 = await response.json();
|
|
24099
24358
|
const responseMessages = Array.isArray(data2) ? data2.map((msg) => JSONRPCMessageSchema.parse(msg)) : [JSONRPCMessageSchema.parse(data2)];
|
|
24100
24359
|
for (const msg of responseMessages) {
|
|
24101
|
-
(
|
|
24360
|
+
(_c = this.onmessage) === null || _c === void 0 ? void 0 : _c.call(this, msg);
|
|
24102
24361
|
}
|
|
24103
24362
|
} else {
|
|
24104
24363
|
throw new StreamableHTTPError(-1, `Unexpected content type: ${contentType}`);
|
|
24105
24364
|
}
|
|
24106
24365
|
}
|
|
24107
24366
|
} catch (error) {
|
|
24108
|
-
(
|
|
24367
|
+
(_d = this.onerror) === null || _d === void 0 ? void 0 : _d.call(this, error);
|
|
24109
24368
|
throw error;
|
|
24110
24369
|
}
|
|
24111
24370
|
}
|
|
@@ -24124,7 +24383,7 @@ class StreamableHTTPClientTransport {
|
|
|
24124
24383
|
* the server does not allow clients to terminate sessions.
|
|
24125
24384
|
*/
|
|
24126
24385
|
async terminateSession() {
|
|
24127
|
-
var _a, _b;
|
|
24386
|
+
var _a, _b, _c;
|
|
24128
24387
|
if (!this._sessionId) {
|
|
24129
24388
|
return;
|
|
24130
24389
|
}
|
|
@@ -24136,16 +24395,22 @@ class StreamableHTTPClientTransport {
|
|
|
24136
24395
|
headers,
|
|
24137
24396
|
signal: (_a = this._abortController) === null || _a === void 0 ? void 0 : _a.signal
|
|
24138
24397
|
};
|
|
24139
|
-
const response = await fetch(this._url, init);
|
|
24398
|
+
const response = await ((_b = this._fetch) !== null && _b !== void 0 ? _b : fetch)(this._url, init);
|
|
24140
24399
|
if (!response.ok && response.status !== 405) {
|
|
24141
24400
|
throw new StreamableHTTPError(response.status, `Failed to terminate session: ${response.statusText}`);
|
|
24142
24401
|
}
|
|
24143
24402
|
this._sessionId = void 0;
|
|
24144
24403
|
} catch (error) {
|
|
24145
|
-
(
|
|
24404
|
+
(_c = this.onerror) === null || _c === void 0 ? void 0 : _c.call(this, error);
|
|
24146
24405
|
throw error;
|
|
24147
24406
|
}
|
|
24148
24407
|
}
|
|
24408
|
+
setProtocolVersion(version2) {
|
|
24409
|
+
this._protocolVersion = version2;
|
|
24410
|
+
}
|
|
24411
|
+
get protocolVersion() {
|
|
24412
|
+
return this._protocolVersion;
|
|
24413
|
+
}
|
|
24149
24414
|
}
|
|
24150
24415
|
const StdErrNotificationSchema = NotificationSchema.extend({
|
|
24151
24416
|
method: literalType("notifications/stderr"),
|
|
@@ -24156,16 +24421,26 @@ const StdErrNotificationSchema = NotificationSchema.extend({
|
|
|
24156
24421
|
ClientNotificationSchema.or(
|
|
24157
24422
|
StdErrNotificationSchema
|
|
24158
24423
|
).or(ServerNotificationSchema).or(NotificationSchema);
|
|
24159
|
-
const version$1 = "0.
|
|
24424
|
+
const version$1 = "0.16.0";
|
|
24160
24425
|
const packageJson = {
|
|
24161
24426
|
version: version$1
|
|
24162
24427
|
};
|
|
24428
|
+
const getSearchParam = (key) => {
|
|
24429
|
+
try {
|
|
24430
|
+
const url = new URL(window.location.href);
|
|
24431
|
+
return url.searchParams.get(key);
|
|
24432
|
+
} catch {
|
|
24433
|
+
return null;
|
|
24434
|
+
}
|
|
24435
|
+
};
|
|
24163
24436
|
const getMCPProxyAddress = (config) => {
|
|
24164
|
-
|
|
24437
|
+
let proxyFullAddress = config.MCP_PROXY_FULL_ADDRESS.value;
|
|
24165
24438
|
if (proxyFullAddress) {
|
|
24439
|
+
proxyFullAddress = proxyFullAddress.replace(/\/+$/, "");
|
|
24166
24440
|
return proxyFullAddress;
|
|
24167
24441
|
}
|
|
24168
|
-
|
|
24442
|
+
const proxyPort = getSearchParam("MCP_PROXY_PORT") || DEFAULT_MCP_PROXY_LISTEN_PORT;
|
|
24443
|
+
return `${window.location.protocol}//${window.location.hostname}:${proxyPort}`;
|
|
24169
24444
|
};
|
|
24170
24445
|
const getMCPServerRequestTimeout = (config) => {
|
|
24171
24446
|
return config.MCP_SERVER_REQUEST_TIMEOUT.value;
|
|
@@ -24182,14 +24457,6 @@ const getMCPProxyAuthToken = (config) => {
|
|
|
24182
24457
|
header: "X-MCP-Proxy-Auth"
|
|
24183
24458
|
};
|
|
24184
24459
|
};
|
|
24185
|
-
const getSearchParam = (key) => {
|
|
24186
|
-
try {
|
|
24187
|
-
const url = new URL(window.location.href);
|
|
24188
|
-
return url.searchParams.get(key);
|
|
24189
|
-
} catch {
|
|
24190
|
-
return null;
|
|
24191
|
-
}
|
|
24192
|
-
};
|
|
24193
24460
|
const getInitialTransportType = () => {
|
|
24194
24461
|
const param = getSearchParam("transport");
|
|
24195
24462
|
if (param === "stdio" || param === "sse" || param === "streamable-http") {
|
|
@@ -25220,17 +25487,32 @@ const Button = reactExports.forwardRef(
|
|
|
25220
25487
|
);
|
|
25221
25488
|
Button.displayName = "Button";
|
|
25222
25489
|
/**
|
|
25223
|
-
* @license lucide-react v0.
|
|
25490
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25224
25491
|
*
|
|
25225
25492
|
* This source code is licensed under the ISC license.
|
|
25226
25493
|
* See the LICENSE file in the root directory of this source tree.
|
|
25227
25494
|
*/
|
|
25228
25495
|
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
25496
|
+
const toCamelCase = (string) => string.replace(
|
|
25497
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
25498
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
25499
|
+
);
|
|
25500
|
+
const toPascalCase = (string) => {
|
|
25501
|
+
const camelCase = toCamelCase(string);
|
|
25502
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
25503
|
+
};
|
|
25229
25504
|
const mergeClasses = (...classes) => classes.filter((className, index2, array) => {
|
|
25230
|
-
return Boolean(className) && array.indexOf(className) === index2;
|
|
25231
|
-
}).join(" ");
|
|
25505
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
|
|
25506
|
+
}).join(" ").trim();
|
|
25507
|
+
const hasA11yProp = (props) => {
|
|
25508
|
+
for (const prop in props) {
|
|
25509
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
25510
|
+
return true;
|
|
25511
|
+
}
|
|
25512
|
+
}
|
|
25513
|
+
};
|
|
25232
25514
|
/**
|
|
25233
|
-
* @license lucide-react v0.
|
|
25515
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25234
25516
|
*
|
|
25235
25517
|
* This source code is licensed under the ISC license.
|
|
25236
25518
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -25247,7 +25529,7 @@ var defaultAttributes = {
|
|
|
25247
25529
|
strokeLinejoin: "round"
|
|
25248
25530
|
};
|
|
25249
25531
|
/**
|
|
25250
|
-
* @license lucide-react v0.
|
|
25532
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25251
25533
|
*
|
|
25252
25534
|
* This source code is licensed under the ISC license.
|
|
25253
25535
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -25262,28 +25544,27 @@ const Icon$1 = reactExports.forwardRef(
|
|
|
25262
25544
|
children,
|
|
25263
25545
|
iconNode,
|
|
25264
25546
|
...rest
|
|
25265
|
-
}, ref2) =>
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25270
|
-
|
|
25271
|
-
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
}
|
|
25547
|
+
}, ref2) => reactExports.createElement(
|
|
25548
|
+
"svg",
|
|
25549
|
+
{
|
|
25550
|
+
ref: ref2,
|
|
25551
|
+
...defaultAttributes,
|
|
25552
|
+
width: size2,
|
|
25553
|
+
height: size2,
|
|
25554
|
+
stroke: color,
|
|
25555
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size2) : strokeWidth,
|
|
25556
|
+
className: mergeClasses("lucide", className),
|
|
25557
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
25558
|
+
...rest
|
|
25559
|
+
},
|
|
25560
|
+
[
|
|
25561
|
+
...iconNode.map(([tag, attrs]) => reactExports.createElement(tag, attrs)),
|
|
25562
|
+
...Array.isArray(children) ? children : [children]
|
|
25563
|
+
]
|
|
25564
|
+
)
|
|
25284
25565
|
);
|
|
25285
25566
|
/**
|
|
25286
|
-
* @license lucide-react v0.
|
|
25567
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25287
25568
|
*
|
|
25288
25569
|
* This source code is licensed under the ISC license.
|
|
25289
25570
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -25293,30 +25574,41 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
25293
25574
|
({ className, ...props }, ref2) => reactExports.createElement(Icon$1, {
|
|
25294
25575
|
ref: ref2,
|
|
25295
25576
|
iconNode,
|
|
25296
|
-
className: mergeClasses(
|
|
25577
|
+
className: mergeClasses(
|
|
25578
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
25579
|
+
`lucide-${iconName}`,
|
|
25580
|
+
className
|
|
25581
|
+
),
|
|
25297
25582
|
...props
|
|
25298
25583
|
})
|
|
25299
25584
|
);
|
|
25300
|
-
Component.displayName =
|
|
25585
|
+
Component.displayName = toPascalCase(iconName);
|
|
25301
25586
|
return Component;
|
|
25302
25587
|
};
|
|
25303
25588
|
/**
|
|
25304
|
-
* @license lucide-react v0.
|
|
25589
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25305
25590
|
*
|
|
25306
25591
|
* This source code is licensed under the ISC license.
|
|
25307
25592
|
* See the LICENSE file in the root directory of this source tree.
|
|
25308
25593
|
*/
|
|
25309
|
-
const
|
|
25310
|
-
["path", { d: "
|
|
25311
|
-
[
|
|
25312
|
-
|
|
25594
|
+
const __iconNode$x = [
|
|
25595
|
+
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
|
|
25596
|
+
[
|
|
25597
|
+
"path",
|
|
25598
|
+
{
|
|
25599
|
+
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
|
|
25600
|
+
key: "11g9vi"
|
|
25601
|
+
}
|
|
25602
|
+
]
|
|
25603
|
+
];
|
|
25604
|
+
const Bell = createLucideIcon("bell", __iconNode$x);
|
|
25313
25605
|
/**
|
|
25314
|
-
* @license lucide-react v0.
|
|
25606
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25315
25607
|
*
|
|
25316
25608
|
* This source code is licensed under the ISC license.
|
|
25317
25609
|
* See the LICENSE file in the root directory of this source tree.
|
|
25318
25610
|
*/
|
|
25319
|
-
const
|
|
25611
|
+
const __iconNode$w = [
|
|
25320
25612
|
["path", { d: "m8 2 1.88 1.88", key: "fmnt4t" }],
|
|
25321
25613
|
["path", { d: "M14.12 3.88 16 2", key: "qol33r" }],
|
|
25322
25614
|
["path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1", key: "d7y7pr" }],
|
|
@@ -25334,128 +25626,135 @@ const Bug = createLucideIcon("Bug", [
|
|
|
25334
25626
|
["path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4", key: "18gb23" }],
|
|
25335
25627
|
["path", { d: "M22 13h-4", key: "1jl80f" }],
|
|
25336
25628
|
["path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4", key: "k3fwyw" }]
|
|
25337
|
-
]
|
|
25629
|
+
];
|
|
25630
|
+
const Bug = createLucideIcon("bug", __iconNode$w);
|
|
25338
25631
|
/**
|
|
25339
|
-
* @license lucide-react v0.
|
|
25632
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25340
25633
|
*
|
|
25341
25634
|
* This source code is licensed under the ISC license.
|
|
25342
25635
|
* See the LICENSE file in the root directory of this source tree.
|
|
25343
25636
|
*/
|
|
25344
|
-
const
|
|
25637
|
+
const __iconNode$v = [
|
|
25345
25638
|
["path", { d: "M18 6 7 17l-5-5", key: "116fxf" }],
|
|
25346
25639
|
["path", { d: "m22 10-7.5 7.5L13 16", key: "ke71qq" }]
|
|
25347
|
-
]
|
|
25640
|
+
];
|
|
25641
|
+
const CheckCheck = createLucideIcon("check-check", __iconNode$v);
|
|
25348
25642
|
/**
|
|
25349
|
-
* @license lucide-react v0.
|
|
25643
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25350
25644
|
*
|
|
25351
25645
|
* This source code is licensed under the ISC license.
|
|
25352
25646
|
* See the LICENSE file in the root directory of this source tree.
|
|
25353
25647
|
*/
|
|
25354
|
-
const
|
|
25648
|
+
const __iconNode$u = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
25649
|
+
const Check = createLucideIcon("check", __iconNode$u);
|
|
25355
25650
|
/**
|
|
25356
|
-
* @license lucide-react v0.
|
|
25651
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25357
25652
|
*
|
|
25358
25653
|
* This source code is licensed under the ISC license.
|
|
25359
25654
|
* See the LICENSE file in the root directory of this source tree.
|
|
25360
25655
|
*/
|
|
25361
|
-
const
|
|
25362
|
-
|
|
25363
|
-
]);
|
|
25656
|
+
const __iconNode$t = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
25657
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$t);
|
|
25364
25658
|
/**
|
|
25365
|
-
* @license lucide-react v0.
|
|
25659
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25366
25660
|
*
|
|
25367
25661
|
* This source code is licensed under the ISC license.
|
|
25368
25662
|
* See the LICENSE file in the root directory of this source tree.
|
|
25369
25663
|
*/
|
|
25370
|
-
const
|
|
25371
|
-
|
|
25372
|
-
]);
|
|
25664
|
+
const __iconNode$s = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
25665
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$s);
|
|
25373
25666
|
/**
|
|
25374
|
-
* @license lucide-react v0.
|
|
25667
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25375
25668
|
*
|
|
25376
25669
|
* This source code is licensed under the ISC license.
|
|
25377
25670
|
* See the LICENSE file in the root directory of this source tree.
|
|
25378
25671
|
*/
|
|
25379
|
-
const
|
|
25672
|
+
const __iconNode$r = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
25673
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$r);
|
|
25380
25674
|
/**
|
|
25381
|
-
* @license lucide-react v0.
|
|
25675
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25382
25676
|
*
|
|
25383
25677
|
* This source code is licensed under the ISC license.
|
|
25384
25678
|
* See the LICENSE file in the root directory of this source tree.
|
|
25385
25679
|
*/
|
|
25386
|
-
const
|
|
25680
|
+
const __iconNode$q = [
|
|
25387
25681
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
25388
25682
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
25389
|
-
]
|
|
25683
|
+
];
|
|
25684
|
+
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$q);
|
|
25390
25685
|
/**
|
|
25391
|
-
* @license lucide-react v0.
|
|
25686
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25392
25687
|
*
|
|
25393
25688
|
* This source code is licensed under the ISC license.
|
|
25394
25689
|
* See the LICENSE file in the root directory of this source tree.
|
|
25395
25690
|
*/
|
|
25396
|
-
const
|
|
25691
|
+
const __iconNode$p = [
|
|
25397
25692
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
25398
25693
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
25399
25694
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
25400
|
-
]
|
|
25695
|
+
];
|
|
25696
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$p);
|
|
25401
25697
|
/**
|
|
25402
|
-
* @license lucide-react v0.
|
|
25698
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25403
25699
|
*
|
|
25404
25700
|
* This source code is licensed under the ISC license.
|
|
25405
25701
|
* See the LICENSE file in the root directory of this source tree.
|
|
25406
25702
|
*/
|
|
25407
|
-
const
|
|
25703
|
+
const __iconNode$o = [
|
|
25408
25704
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
25409
25705
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
25410
|
-
]
|
|
25706
|
+
];
|
|
25707
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$o);
|
|
25411
25708
|
/**
|
|
25412
|
-
* @license lucide-react v0.
|
|
25709
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25413
25710
|
*
|
|
25414
25711
|
* This source code is licensed under the ISC license.
|
|
25415
25712
|
* See the LICENSE file in the root directory of this source tree.
|
|
25416
25713
|
*/
|
|
25417
|
-
const
|
|
25714
|
+
const __iconNode$n = [
|
|
25418
25715
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
25419
25716
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
25420
25717
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
25421
|
-
]
|
|
25718
|
+
];
|
|
25719
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$n);
|
|
25422
25720
|
/**
|
|
25423
|
-
* @license lucide-react v0.
|
|
25721
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25424
25722
|
*
|
|
25425
25723
|
* This source code is licensed under the ISC license.
|
|
25426
25724
|
* See the LICENSE file in the root directory of this source tree.
|
|
25427
25725
|
*/
|
|
25428
|
-
const
|
|
25429
|
-
|
|
25430
|
-
]);
|
|
25726
|
+
const __iconNode$m = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
25727
|
+
const Circle = createLucideIcon("circle", __iconNode$m);
|
|
25431
25728
|
/**
|
|
25432
|
-
* @license lucide-react v0.
|
|
25729
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25433
25730
|
*
|
|
25434
25731
|
* This source code is licensed under the ISC license.
|
|
25435
25732
|
* See the LICENSE file in the root directory of this source tree.
|
|
25436
25733
|
*/
|
|
25437
|
-
const
|
|
25734
|
+
const __iconNode$l = [
|
|
25438
25735
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
25439
25736
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
25440
|
-
]
|
|
25737
|
+
];
|
|
25738
|
+
const Copy = createLucideIcon("copy", __iconNode$l);
|
|
25441
25739
|
/**
|
|
25442
|
-
* @license lucide-react v0.
|
|
25740
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25443
25741
|
*
|
|
25444
25742
|
* This source code is licensed under the ISC license.
|
|
25445
25743
|
* See the LICENSE file in the root directory of this source tree.
|
|
25446
25744
|
*/
|
|
25447
|
-
const
|
|
25745
|
+
const __iconNode$k = [
|
|
25448
25746
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
25449
25747
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
25450
25748
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
25451
|
-
]
|
|
25749
|
+
];
|
|
25750
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$k);
|
|
25452
25751
|
/**
|
|
25453
|
-
* @license lucide-react v0.
|
|
25752
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25454
25753
|
*
|
|
25455
25754
|
* This source code is licensed under the ISC license.
|
|
25456
25755
|
* See the LICENSE file in the root directory of this source tree.
|
|
25457
25756
|
*/
|
|
25458
|
-
const
|
|
25757
|
+
const __iconNode$j = [
|
|
25459
25758
|
[
|
|
25460
25759
|
"path",
|
|
25461
25760
|
{
|
|
@@ -25472,14 +25771,15 @@ const EyeOff = createLucideIcon("EyeOff", [
|
|
|
25472
25771
|
}
|
|
25473
25772
|
],
|
|
25474
25773
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
25475
|
-
]
|
|
25774
|
+
];
|
|
25775
|
+
const EyeOff = createLucideIcon("eye-off", __iconNode$j);
|
|
25476
25776
|
/**
|
|
25477
|
-
* @license lucide-react v0.
|
|
25777
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25478
25778
|
*
|
|
25479
25779
|
* This source code is licensed under the ISC license.
|
|
25480
25780
|
* See the LICENSE file in the root directory of this source tree.
|
|
25481
25781
|
*/
|
|
25482
|
-
const
|
|
25782
|
+
const __iconNode$i = [
|
|
25483
25783
|
[
|
|
25484
25784
|
"path",
|
|
25485
25785
|
{
|
|
@@ -25488,38 +25788,41 @@ const Eye = createLucideIcon("Eye", [
|
|
|
25488
25788
|
}
|
|
25489
25789
|
],
|
|
25490
25790
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
25491
|
-
]
|
|
25791
|
+
];
|
|
25792
|
+
const Eye = createLucideIcon("eye", __iconNode$i);
|
|
25492
25793
|
/**
|
|
25493
|
-
* @license lucide-react v0.
|
|
25794
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25494
25795
|
*
|
|
25495
25796
|
* This source code is licensed under the ISC license.
|
|
25496
25797
|
* See the LICENSE file in the root directory of this source tree.
|
|
25497
25798
|
*/
|
|
25498
|
-
const
|
|
25799
|
+
const __iconNode$h = [
|
|
25499
25800
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
25500
25801
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
25501
25802
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
25502
25803
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
25503
25804
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
25504
|
-
]
|
|
25805
|
+
];
|
|
25806
|
+
const FileText = createLucideIcon("file-text", __iconNode$h);
|
|
25505
25807
|
/**
|
|
25506
|
-
* @license lucide-react v0.
|
|
25808
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25507
25809
|
*
|
|
25508
25810
|
* This source code is licensed under the ISC license.
|
|
25509
25811
|
* See the LICENSE file in the root directory of this source tree.
|
|
25510
25812
|
*/
|
|
25511
|
-
const
|
|
25813
|
+
const __iconNode$g = [
|
|
25512
25814
|
["path", { d: "M20 7h-3a2 2 0 0 1-2-2V2", key: "x099mo" }],
|
|
25513
25815
|
["path", { d: "M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z", key: "18t6ie" }],
|
|
25514
25816
|
["path", { d: "M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8", key: "1nja0z" }]
|
|
25515
|
-
]
|
|
25817
|
+
];
|
|
25818
|
+
const Files = createLucideIcon("files", __iconNode$g);
|
|
25516
25819
|
/**
|
|
25517
|
-
* @license lucide-react v0.
|
|
25820
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25518
25821
|
*
|
|
25519
25822
|
* This source code is licensed under the ISC license.
|
|
25520
25823
|
* See the LICENSE file in the root directory of this source tree.
|
|
25521
25824
|
*/
|
|
25522
|
-
const
|
|
25825
|
+
const __iconNode$f = [
|
|
25523
25826
|
[
|
|
25524
25827
|
"path",
|
|
25525
25828
|
{
|
|
@@ -25536,14 +25839,15 @@ const FolderTree = createLucideIcon("FolderTree", [
|
|
|
25536
25839
|
],
|
|
25537
25840
|
["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }],
|
|
25538
25841
|
["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
|
|
25539
|
-
]
|
|
25842
|
+
];
|
|
25843
|
+
const FolderTree = createLucideIcon("folder-tree", __iconNode$f);
|
|
25540
25844
|
/**
|
|
25541
|
-
* @license lucide-react v0.
|
|
25845
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25542
25846
|
*
|
|
25543
25847
|
* This source code is licensed under the ISC license.
|
|
25544
25848
|
* See the LICENSE file in the root directory of this source tree.
|
|
25545
25849
|
*/
|
|
25546
|
-
const
|
|
25850
|
+
const __iconNode$e = [
|
|
25547
25851
|
[
|
|
25548
25852
|
"path",
|
|
25549
25853
|
{
|
|
@@ -25552,14 +25856,15 @@ const Github = createLucideIcon("Github", [
|
|
|
25552
25856
|
}
|
|
25553
25857
|
],
|
|
25554
25858
|
["path", { d: "M9 18c-4.51 2-5-2-7-2", key: "9comsn" }]
|
|
25555
|
-
]
|
|
25859
|
+
];
|
|
25860
|
+
const Github = createLucideIcon("github", __iconNode$e);
|
|
25556
25861
|
/**
|
|
25557
|
-
* @license lucide-react v0.
|
|
25862
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25558
25863
|
*
|
|
25559
25864
|
* This source code is licensed under the ISC license.
|
|
25560
25865
|
* See the LICENSE file in the root directory of this source tree.
|
|
25561
25866
|
*/
|
|
25562
|
-
const
|
|
25867
|
+
const __iconNode$d = [
|
|
25563
25868
|
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
|
|
25564
25869
|
["path", { d: "m18 15 4-4", key: "16gjal" }],
|
|
25565
25870
|
[
|
|
@@ -25569,81 +25874,85 @@ const Hammer = createLucideIcon("Hammer", [
|
|
|
25569
25874
|
key: "b7pghm"
|
|
25570
25875
|
}
|
|
25571
25876
|
]
|
|
25572
|
-
]
|
|
25877
|
+
];
|
|
25878
|
+
const Hammer = createLucideIcon("hammer", __iconNode$d);
|
|
25573
25879
|
/**
|
|
25574
|
-
* @license lucide-react v0.
|
|
25880
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25575
25881
|
*
|
|
25576
25882
|
* This source code is licensed under the ISC license.
|
|
25577
25883
|
* See the LICENSE file in the root directory of this source tree.
|
|
25578
25884
|
*/
|
|
25579
|
-
const
|
|
25885
|
+
const __iconNode$c = [
|
|
25580
25886
|
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
25581
25887
|
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
25582
25888
|
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
25583
25889
|
["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
|
|
25584
|
-
]
|
|
25890
|
+
];
|
|
25891
|
+
const Hash = createLucideIcon("hash", __iconNode$c);
|
|
25585
25892
|
/**
|
|
25586
|
-
* @license lucide-react v0.
|
|
25893
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25587
25894
|
*
|
|
25588
25895
|
* This source code is licensed under the ISC license.
|
|
25589
25896
|
* See the LICENSE file in the root directory of this source tree.
|
|
25590
25897
|
*/
|
|
25591
|
-
const
|
|
25898
|
+
const __iconNode$b = [
|
|
25592
25899
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
25593
25900
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
25594
25901
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
25595
|
-
]
|
|
25902
|
+
];
|
|
25903
|
+
const Key = createLucideIcon("key", __iconNode$b);
|
|
25596
25904
|
/**
|
|
25597
|
-
* @license lucide-react v0.
|
|
25905
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25598
25906
|
*
|
|
25599
25907
|
* This source code is licensed under the ISC license.
|
|
25600
25908
|
* See the LICENSE file in the root directory of this source tree.
|
|
25601
25909
|
*/
|
|
25602
|
-
const
|
|
25603
|
-
|
|
25604
|
-
]);
|
|
25910
|
+
const __iconNode$a = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
25911
|
+
const LoaderCircle = createLucideIcon("loader-circle", __iconNode$a);
|
|
25605
25912
|
/**
|
|
25606
|
-
* @license lucide-react v0.
|
|
25913
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25607
25914
|
*
|
|
25608
25915
|
* This source code is licensed under the ISC license.
|
|
25609
25916
|
* See the LICENSE file in the root directory of this source tree.
|
|
25610
25917
|
*/
|
|
25611
|
-
const
|
|
25918
|
+
const __iconNode$9 = [
|
|
25612
25919
|
["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
|
|
25613
|
-
]
|
|
25920
|
+
];
|
|
25921
|
+
const MessageSquare = createLucideIcon("message-square", __iconNode$9);
|
|
25614
25922
|
/**
|
|
25615
|
-
* @license lucide-react v0.
|
|
25923
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25616
25924
|
*
|
|
25617
25925
|
* This source code is licensed under the ISC license.
|
|
25618
25926
|
* See the LICENSE file in the root directory of this source tree.
|
|
25619
25927
|
*/
|
|
25620
|
-
const
|
|
25928
|
+
const __iconNode$8 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
25929
|
+
const Minus = createLucideIcon("minus", __iconNode$8);
|
|
25621
25930
|
/**
|
|
25622
|
-
* @license lucide-react v0.
|
|
25931
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25623
25932
|
*
|
|
25624
25933
|
* This source code is licensed under the ISC license.
|
|
25625
25934
|
* See the LICENSE file in the root directory of this source tree.
|
|
25626
25935
|
*/
|
|
25627
|
-
const
|
|
25628
|
-
|
|
25629
|
-
]);
|
|
25936
|
+
const __iconNode$7 = [["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]];
|
|
25937
|
+
const Play = createLucideIcon("play", __iconNode$7);
|
|
25630
25938
|
/**
|
|
25631
|
-
* @license lucide-react v0.
|
|
25939
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25632
25940
|
*
|
|
25633
25941
|
* This source code is licensed under the ISC license.
|
|
25634
25942
|
* See the LICENSE file in the root directory of this source tree.
|
|
25635
25943
|
*/
|
|
25636
|
-
const
|
|
25944
|
+
const __iconNode$6 = [
|
|
25637
25945
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
25638
25946
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
25639
|
-
]
|
|
25947
|
+
];
|
|
25948
|
+
const Plus = createLucideIcon("plus", __iconNode$6);
|
|
25640
25949
|
/**
|
|
25641
|
-
* @license lucide-react v0.
|
|
25950
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25642
25951
|
*
|
|
25643
25952
|
* This source code is licensed under the ISC license.
|
|
25644
25953
|
* See the LICENSE file in the root directory of this source tree.
|
|
25645
25954
|
*/
|
|
25646
|
-
const
|
|
25955
|
+
const __iconNode$5 = [
|
|
25647
25956
|
["path", { d: "M21 8L18.74 5.74A9.75 9.75 0 0 0 12 3C11 3 10.03 3.16 9.13 3.47", key: "1krf6h" }],
|
|
25648
25957
|
["path", { d: "M8 16H3v5", key: "1cv678" }],
|
|
25649
25958
|
["path", { d: "M3 12C3 9.51 4 7.26 5.64 5.64", key: "ruvoct" }],
|
|
@@ -25651,36 +25960,39 @@ const RefreshCwOff = createLucideIcon("RefreshCwOff", [
|
|
|
25651
25960
|
["path", { d: "M21 12c0 1-.16 1.97-.47 2.87", key: "4w8emr" }],
|
|
25652
25961
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
25653
25962
|
["path", { d: "M22 22 2 2", key: "1r8tn9" }]
|
|
25654
|
-
]
|
|
25963
|
+
];
|
|
25964
|
+
const RefreshCwOff = createLucideIcon("refresh-cw-off", __iconNode$5);
|
|
25655
25965
|
/**
|
|
25656
|
-
* @license lucide-react v0.
|
|
25966
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25657
25967
|
*
|
|
25658
25968
|
* This source code is licensed under the ISC license.
|
|
25659
25969
|
* See the LICENSE file in the root directory of this source tree.
|
|
25660
25970
|
*/
|
|
25661
|
-
const
|
|
25971
|
+
const __iconNode$4 = [
|
|
25662
25972
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
25663
25973
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
25664
25974
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
25665
25975
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
25666
|
-
]
|
|
25976
|
+
];
|
|
25977
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$4);
|
|
25667
25978
|
/**
|
|
25668
|
-
* @license lucide-react v0.
|
|
25979
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25669
25980
|
*
|
|
25670
25981
|
* This source code is licensed under the ISC license.
|
|
25671
25982
|
* See the LICENSE file in the root directory of this source tree.
|
|
25672
25983
|
*/
|
|
25673
|
-
const
|
|
25984
|
+
const __iconNode$3 = [
|
|
25674
25985
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
25675
25986
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
25676
|
-
]
|
|
25987
|
+
];
|
|
25988
|
+
const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$3);
|
|
25677
25989
|
/**
|
|
25678
|
-
* @license lucide-react v0.
|
|
25990
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25679
25991
|
*
|
|
25680
25992
|
* This source code is licensed under the ISC license.
|
|
25681
25993
|
* See the LICENSE file in the root directory of this source tree.
|
|
25682
25994
|
*/
|
|
25683
|
-
const
|
|
25995
|
+
const __iconNode$2 = [
|
|
25684
25996
|
[
|
|
25685
25997
|
"path",
|
|
25686
25998
|
{
|
|
@@ -25690,14 +26002,15 @@ const Save = createLucideIcon("Save", [
|
|
|
25690
26002
|
],
|
|
25691
26003
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
25692
26004
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
25693
|
-
]
|
|
26005
|
+
];
|
|
26006
|
+
const Save = createLucideIcon("save", __iconNode$2);
|
|
25694
26007
|
/**
|
|
25695
|
-
* @license lucide-react v0.
|
|
26008
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25696
26009
|
*
|
|
25697
26010
|
* This source code is licensed under the ISC license.
|
|
25698
26011
|
* See the LICENSE file in the root directory of this source tree.
|
|
25699
26012
|
*/
|
|
25700
|
-
const
|
|
26013
|
+
const __iconNode$1 = [
|
|
25701
26014
|
[
|
|
25702
26015
|
"path",
|
|
25703
26016
|
{
|
|
@@ -25706,14 +26019,15 @@ const Send = createLucideIcon("Send", [
|
|
|
25706
26019
|
}
|
|
25707
26020
|
],
|
|
25708
26021
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
25709
|
-
]
|
|
26022
|
+
];
|
|
26023
|
+
const Send = createLucideIcon("send", __iconNode$1);
|
|
25710
26024
|
/**
|
|
25711
|
-
* @license lucide-react v0.
|
|
26025
|
+
* @license lucide-react v0.523.0 - ISC
|
|
25712
26026
|
*
|
|
25713
26027
|
* This source code is licensed under the ISC license.
|
|
25714
26028
|
* See the LICENSE file in the root directory of this source tree.
|
|
25715
26029
|
*/
|
|
25716
|
-
const
|
|
26030
|
+
const __iconNode = [
|
|
25717
26031
|
[
|
|
25718
26032
|
"path",
|
|
25719
26033
|
{
|
|
@@ -25722,7 +26036,8 @@ const Settings = createLucideIcon("Settings", [
|
|
|
25722
26036
|
}
|
|
25723
26037
|
],
|
|
25724
26038
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
25725
|
-
]
|
|
26039
|
+
];
|
|
26040
|
+
const Settings = createLucideIcon("settings", __iconNode);
|
|
25726
26041
|
const OAuthStepDetails = ({
|
|
25727
26042
|
label,
|
|
25728
26043
|
isComplete,
|
|
@@ -25828,7 +26143,7 @@ const OAuthFlowProgress = ({
|
|
|
25828
26143
|
] }),
|
|
25829
26144
|
authState.resourceMetadataError && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 p-3 border border-blue-300 bg-blue-50 rounded-md", children: [
|
|
25830
26145
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm font-medium text-blue-700", children: [
|
|
25831
|
-
"ℹ️
|
|
26146
|
+
"ℹ️ Problem with resource metadata from",
|
|
25832
26147
|
" ",
|
|
25833
26148
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
25834
26149
|
"a",
|
|
@@ -26577,7 +26892,9 @@ const HistoryAndNotifications = ({
|
|
|
26577
26892
|
"div",
|
|
26578
26893
|
{
|
|
26579
26894
|
className: "flex justify-between items-center cursor-pointer",
|
|
26580
|
-
onClick: () => toggleNotificationExpansion(
|
|
26895
|
+
onClick: () => toggleNotificationExpansion(
|
|
26896
|
+
serverNotifications.length - 1 - index2
|
|
26897
|
+
),
|
|
26581
26898
|
children: [
|
|
26582
26899
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono", children: [
|
|
26583
26900
|
serverNotifications.length - index2,
|
|
@@ -26585,11 +26902,11 @@ const HistoryAndNotifications = ({
|
|
|
26585
26902
|
" ",
|
|
26586
26903
|
notification.method
|
|
26587
26904
|
] }),
|
|
26588
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: expandedNotifications[index2] ? "▼" : "▶" })
|
|
26905
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: expandedNotifications[serverNotifications.length - 1 - index2] ? "▼" : "▶" })
|
|
26589
26906
|
]
|
|
26590
26907
|
}
|
|
26591
26908
|
),
|
|
26592
|
-
expandedNotifications[index2] && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2", children: [
|
|
26909
|
+
expandedNotifications[serverNotifications.length - 1 - index2] && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2", children: [
|
|
26593
26910
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-between items-center mb-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-semibold text-purple-600", children: "Details:" }) }),
|
|
26594
26911
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
26595
26912
|
JsonView,
|
|
@@ -28439,8 +28756,9 @@ function getOppositeAxis(axis) {
|
|
|
28439
28756
|
function getAxisLength(axis) {
|
|
28440
28757
|
return axis === "y" ? "height" : "width";
|
|
28441
28758
|
}
|
|
28759
|
+
const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
28442
28760
|
function getSideAxis(placement) {
|
|
28443
|
-
return
|
|
28761
|
+
return yAxisSides.has(getSide(placement)) ? "y" : "x";
|
|
28444
28762
|
}
|
|
28445
28763
|
function getAlignmentAxis(placement) {
|
|
28446
28764
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -28465,19 +28783,19 @@ function getExpandedPlacements(placement) {
|
|
|
28465
28783
|
function getOppositeAlignmentPlacement(placement) {
|
|
28466
28784
|
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
28467
28785
|
}
|
|
28786
|
+
const lrPlacement = ["left", "right"];
|
|
28787
|
+
const rlPlacement = ["right", "left"];
|
|
28788
|
+
const tbPlacement = ["top", "bottom"];
|
|
28789
|
+
const btPlacement = ["bottom", "top"];
|
|
28468
28790
|
function getSideList(side, isStart, rtl) {
|
|
28469
|
-
const lr = ["left", "right"];
|
|
28470
|
-
const rl = ["right", "left"];
|
|
28471
|
-
const tb = ["top", "bottom"];
|
|
28472
|
-
const bt = ["bottom", "top"];
|
|
28473
28791
|
switch (side) {
|
|
28474
28792
|
case "top":
|
|
28475
28793
|
case "bottom":
|
|
28476
|
-
if (rtl) return isStart ?
|
|
28477
|
-
return isStart ?
|
|
28794
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
28795
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
28478
28796
|
case "left":
|
|
28479
28797
|
case "right":
|
|
28480
|
-
return isStart ?
|
|
28798
|
+
return isStart ? tbPlacement : btPlacement;
|
|
28481
28799
|
default:
|
|
28482
28800
|
return [];
|
|
28483
28801
|
}
|
|
@@ -28956,6 +29274,7 @@ const hide$2 = function(options) {
|
|
|
28956
29274
|
}
|
|
28957
29275
|
};
|
|
28958
29276
|
};
|
|
29277
|
+
const originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
28959
29278
|
async function convertValueToCoords(state, options) {
|
|
28960
29279
|
const {
|
|
28961
29280
|
placement,
|
|
@@ -28966,7 +29285,7 @@ async function convertValueToCoords(state, options) {
|
|
|
28966
29285
|
const side = getSide(placement);
|
|
28967
29286
|
const alignment = getAlignment(placement);
|
|
28968
29287
|
const isVertical = getSideAxis(placement) === "y";
|
|
28969
|
-
const mainAxisMulti =
|
|
29288
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
28970
29289
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
28971
29290
|
const rawValue = evaluate(options, state);
|
|
28972
29291
|
let {
|
|
@@ -29144,7 +29463,7 @@ const limitShift$2 = function(options) {
|
|
|
29144
29463
|
if (checkCrossAxis) {
|
|
29145
29464
|
var _middlewareData$offse, _middlewareData$offse2;
|
|
29146
29465
|
const len = mainAxis === "y" ? "width" : "height";
|
|
29147
|
-
const isOriginSide =
|
|
29466
|
+
const isOriginSide = originSides.has(getSide(placement));
|
|
29148
29467
|
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
29149
29468
|
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
29150
29469
|
if (crossAxisCoord < limitMin) {
|
|
@@ -29279,6 +29598,7 @@ function isShadowRoot(value) {
|
|
|
29279
29598
|
}
|
|
29280
29599
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
29281
29600
|
}
|
|
29601
|
+
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
29282
29602
|
function isOverflowElement(element) {
|
|
29283
29603
|
const {
|
|
29284
29604
|
overflow,
|
|
@@ -29286,24 +29606,29 @@ function isOverflowElement(element) {
|
|
|
29286
29606
|
overflowY,
|
|
29287
29607
|
display
|
|
29288
29608
|
} = getComputedStyle$1(element);
|
|
29289
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !
|
|
29609
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
29290
29610
|
}
|
|
29611
|
+
const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
29291
29612
|
function isTableElement(element) {
|
|
29292
|
-
return
|
|
29613
|
+
return tableElements.has(getNodeName(element));
|
|
29293
29614
|
}
|
|
29615
|
+
const topLayerSelectors = [":popover-open", ":modal"];
|
|
29294
29616
|
function isTopLayer(element) {
|
|
29295
|
-
return
|
|
29617
|
+
return topLayerSelectors.some((selector) => {
|
|
29296
29618
|
try {
|
|
29297
29619
|
return element.matches(selector);
|
|
29298
|
-
} catch (
|
|
29620
|
+
} catch (_e2) {
|
|
29299
29621
|
return false;
|
|
29300
29622
|
}
|
|
29301
29623
|
});
|
|
29302
29624
|
}
|
|
29625
|
+
const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
|
|
29626
|
+
const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
|
|
29627
|
+
const containValues = ["paint", "layout", "strict", "content"];
|
|
29303
29628
|
function isContainingBlock(elementOrCss) {
|
|
29304
29629
|
const webkit = isWebKit();
|
|
29305
29630
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
29306
|
-
return
|
|
29631
|
+
return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
|
|
29307
29632
|
}
|
|
29308
29633
|
function getContainingBlock(element) {
|
|
29309
29634
|
let currentNode = getParentNode(element);
|
|
@@ -29321,8 +29646,9 @@ function isWebKit() {
|
|
|
29321
29646
|
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
29322
29647
|
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
29323
29648
|
}
|
|
29649
|
+
const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
29324
29650
|
function isLastTraversableNode(node) {
|
|
29325
|
-
return
|
|
29651
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
29326
29652
|
}
|
|
29327
29653
|
function getComputedStyle$1(element) {
|
|
29328
29654
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -29605,6 +29931,7 @@ function getViewportRect(element, strategy) {
|
|
|
29605
29931
|
y
|
|
29606
29932
|
};
|
|
29607
29933
|
}
|
|
29934
|
+
const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
29608
29935
|
function getInnerBoundingClientRect(element, strategy) {
|
|
29609
29936
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
29610
29937
|
const top = clientRect.top + element.clientTop;
|
|
@@ -29662,7 +29989,7 @@ function getClippingElementAncestors(element, cache2) {
|
|
|
29662
29989
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
29663
29990
|
currentContainingBlockComputedStyle = null;
|
|
29664
29991
|
}
|
|
29665
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle &&
|
|
29992
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
29666
29993
|
if (shouldDropCurrentNode) {
|
|
29667
29994
|
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
29668
29995
|
} else {
|
|
@@ -31158,9 +31485,9 @@ const PromptsTab = ({
|
|
|
31158
31485
|
setSelectedPrompt(prompt);
|
|
31159
31486
|
setPromptArgs({});
|
|
31160
31487
|
},
|
|
31161
|
-
renderItem: (prompt) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31488
|
+
renderItem: (prompt) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-start", children: [
|
|
31162
31489
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1", children: prompt.name }),
|
|
31163
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-500", children: prompt.description })
|
|
31490
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-500 text-left", children: prompt.description })
|
|
31164
31491
|
] }),
|
|
31165
31492
|
title: "Prompts",
|
|
31166
31493
|
buttonText: nextCursor ? "List More Prompts" : "List Prompts",
|
|
@@ -33619,10 +33946,37 @@ const JsonEditor = ({
|
|
|
33619
33946
|
const isSimpleObject = (schema) => {
|
|
33620
33947
|
const supportedTypes = ["string", "number", "integer", "boolean", "null"];
|
|
33621
33948
|
if (supportedTypes.includes(schema.type)) return true;
|
|
33622
|
-
if (schema.type
|
|
33623
|
-
|
|
33624
|
-
|
|
33625
|
-
|
|
33949
|
+
if (schema.type === "object") {
|
|
33950
|
+
return Object.values(schema.properties ?? {}).every(
|
|
33951
|
+
(prop) => supportedTypes.includes(prop.type)
|
|
33952
|
+
);
|
|
33953
|
+
}
|
|
33954
|
+
if (schema.type === "array") {
|
|
33955
|
+
return !!schema.items && isSimpleObject(schema.items);
|
|
33956
|
+
}
|
|
33957
|
+
return false;
|
|
33958
|
+
};
|
|
33959
|
+
const getArrayItemDefault = (schema) => {
|
|
33960
|
+
if ("default" in schema && schema.default !== void 0) {
|
|
33961
|
+
return schema.default;
|
|
33962
|
+
}
|
|
33963
|
+
switch (schema.type) {
|
|
33964
|
+
case "string":
|
|
33965
|
+
return "";
|
|
33966
|
+
case "number":
|
|
33967
|
+
case "integer":
|
|
33968
|
+
return 0;
|
|
33969
|
+
case "boolean":
|
|
33970
|
+
return false;
|
|
33971
|
+
case "array":
|
|
33972
|
+
return [];
|
|
33973
|
+
case "object":
|
|
33974
|
+
return {};
|
|
33975
|
+
case "null":
|
|
33976
|
+
return null;
|
|
33977
|
+
default:
|
|
33978
|
+
return null;
|
|
33979
|
+
}
|
|
33626
33980
|
};
|
|
33627
33981
|
const DynamicJsonForm = ({
|
|
33628
33982
|
schema,
|
|
@@ -33633,6 +33987,8 @@ const DynamicJsonForm = ({
|
|
|
33633
33987
|
const isOnlyJSON = !isSimpleObject(schema);
|
|
33634
33988
|
const [isJsonMode, setIsJsonMode] = reactExports.useState(isOnlyJSON);
|
|
33635
33989
|
const [jsonError, setJsonError] = reactExports.useState();
|
|
33990
|
+
const [copiedJson, setCopiedJson] = reactExports.useState(false);
|
|
33991
|
+
const { toast: toast2 } = useToast();
|
|
33636
33992
|
const [rawJsonValue, setRawJsonValue] = reactExports.useState(
|
|
33637
33993
|
JSON.stringify(value ?? generateDefaultValue(schema), null, 2)
|
|
33638
33994
|
);
|
|
@@ -33690,13 +34046,14 @@ const DynamicJsonForm = ({
|
|
|
33690
34046
|
setJsonError(err instanceof Error ? err.message : "Invalid JSON");
|
|
33691
34047
|
}
|
|
33692
34048
|
};
|
|
33693
|
-
const renderFormFields = (propSchema, currentValue, path = [], depth = 0) => {
|
|
34049
|
+
const renderFormFields = (propSchema, currentValue, path = [], depth = 0, parentSchema, propertyName) => {
|
|
34050
|
+
var _a, _b, _c;
|
|
33694
34051
|
if (depth >= maxDepth && (propSchema.type === "object" || propSchema.type === "array")) {
|
|
33695
34052
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33696
34053
|
JsonEditor,
|
|
33697
34054
|
{
|
|
33698
34055
|
value: JSON.stringify(
|
|
33699
|
-
currentValue ?? generateDefaultValue(propSchema),
|
|
34056
|
+
currentValue ?? generateDefaultValue(propSchema, propertyName, parentSchema),
|
|
33700
34057
|
null,
|
|
33701
34058
|
2
|
|
33702
34059
|
),
|
|
@@ -33713,6 +34070,7 @@ const DynamicJsonForm = ({
|
|
|
33713
34070
|
}
|
|
33714
34071
|
);
|
|
33715
34072
|
}
|
|
34073
|
+
const isRequired = ((_a = parentSchema == null ? void 0 : parentSchema.required) == null ? void 0 : _a.includes(propertyName || "")) ?? false;
|
|
33716
34074
|
switch (propSchema.type) {
|
|
33717
34075
|
case "string":
|
|
33718
34076
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -33722,14 +34080,10 @@ const DynamicJsonForm = ({
|
|
|
33722
34080
|
value: currentValue ?? "",
|
|
33723
34081
|
onChange: (e) => {
|
|
33724
34082
|
const val = e.target.value;
|
|
33725
|
-
|
|
33726
|
-
handleFieldChange(path, void 0);
|
|
33727
|
-
} else {
|
|
33728
|
-
handleFieldChange(path, val);
|
|
33729
|
-
}
|
|
34083
|
+
handleFieldChange(path, val);
|
|
33730
34084
|
},
|
|
33731
34085
|
placeholder: propSchema.description,
|
|
33732
|
-
required:
|
|
34086
|
+
required: isRequired
|
|
33733
34087
|
}
|
|
33734
34088
|
);
|
|
33735
34089
|
case "number":
|
|
@@ -33740,7 +34094,7 @@ const DynamicJsonForm = ({
|
|
|
33740
34094
|
value: (currentValue == null ? void 0 : currentValue.toString()) ?? "",
|
|
33741
34095
|
onChange: (e) => {
|
|
33742
34096
|
const val = e.target.value;
|
|
33743
|
-
if (!val && !
|
|
34097
|
+
if (!val && !isRequired) {
|
|
33744
34098
|
handleFieldChange(path, void 0);
|
|
33745
34099
|
} else {
|
|
33746
34100
|
const num = Number(val);
|
|
@@ -33750,7 +34104,7 @@ const DynamicJsonForm = ({
|
|
|
33750
34104
|
}
|
|
33751
34105
|
},
|
|
33752
34106
|
placeholder: propSchema.description,
|
|
33753
|
-
required:
|
|
34107
|
+
required: isRequired
|
|
33754
34108
|
}
|
|
33755
34109
|
);
|
|
33756
34110
|
case "integer":
|
|
@@ -33762,7 +34116,7 @@ const DynamicJsonForm = ({
|
|
|
33762
34116
|
value: (currentValue == null ? void 0 : currentValue.toString()) ?? "",
|
|
33763
34117
|
onChange: (e) => {
|
|
33764
34118
|
const val = e.target.value;
|
|
33765
|
-
if (!val && !
|
|
34119
|
+
if (!val && !isRequired) {
|
|
33766
34120
|
handleFieldChange(path, void 0);
|
|
33767
34121
|
} else {
|
|
33768
34122
|
const num = Number(val);
|
|
@@ -33772,7 +34126,7 @@ const DynamicJsonForm = ({
|
|
|
33772
34126
|
}
|
|
33773
34127
|
},
|
|
33774
34128
|
placeholder: propSchema.description,
|
|
33775
|
-
required:
|
|
34129
|
+
required: isRequired
|
|
33776
34130
|
}
|
|
33777
34131
|
);
|
|
33778
34132
|
case "boolean":
|
|
@@ -33783,9 +34137,116 @@ const DynamicJsonForm = ({
|
|
|
33783
34137
|
checked: currentValue ?? false,
|
|
33784
34138
|
onChange: (e) => handleFieldChange(path, e.target.checked),
|
|
33785
34139
|
className: "w-4 h-4",
|
|
33786
|
-
required:
|
|
34140
|
+
required: isRequired
|
|
34141
|
+
}
|
|
34142
|
+
);
|
|
34143
|
+
case "object":
|
|
34144
|
+
if (!propSchema.properties) {
|
|
34145
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34146
|
+
JsonEditor,
|
|
34147
|
+
{
|
|
34148
|
+
value: JSON.stringify(currentValue ?? {}, null, 2),
|
|
34149
|
+
onChange: (newValue) => {
|
|
34150
|
+
try {
|
|
34151
|
+
const parsed = JSON.parse(newValue);
|
|
34152
|
+
handleFieldChange(path, parsed);
|
|
34153
|
+
setJsonError(void 0);
|
|
34154
|
+
} catch (err) {
|
|
34155
|
+
setJsonError(
|
|
34156
|
+
err instanceof Error ? err.message : "Invalid JSON"
|
|
34157
|
+
);
|
|
34158
|
+
}
|
|
34159
|
+
},
|
|
34160
|
+
error: jsonError
|
|
34161
|
+
}
|
|
34162
|
+
);
|
|
34163
|
+
}
|
|
34164
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2 border rounded p-3", children: Object.entries(propSchema.properties).map(([key, subSchema]) => {
|
|
34165
|
+
var _a2;
|
|
34166
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
34167
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "block text-sm font-medium mb-1", children: [
|
|
34168
|
+
key,
|
|
34169
|
+
((_a2 = propSchema.required) == null ? void 0 : _a2.includes(key)) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500 ml-1", children: "*" })
|
|
34170
|
+
] }),
|
|
34171
|
+
renderFormFields(
|
|
34172
|
+
subSchema,
|
|
34173
|
+
currentValue == null ? void 0 : currentValue[key],
|
|
34174
|
+
[...path, key],
|
|
34175
|
+
depth + 1,
|
|
34176
|
+
propSchema,
|
|
34177
|
+
key
|
|
34178
|
+
)
|
|
34179
|
+
] }, key);
|
|
34180
|
+
}) });
|
|
34181
|
+
case "array": {
|
|
34182
|
+
const arrayValue = Array.isArray(currentValue) ? currentValue : [];
|
|
34183
|
+
if (!propSchema.items) return null;
|
|
34184
|
+
if (isSimpleObject(propSchema.items)) {
|
|
34185
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
34186
|
+
propSchema.description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-600", children: propSchema.description }),
|
|
34187
|
+
((_b = propSchema.items) == null ? void 0 : _b.description) && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-gray-500", children: [
|
|
34188
|
+
"Items: ",
|
|
34189
|
+
propSchema.items.description
|
|
34190
|
+
] }),
|
|
34191
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
34192
|
+
arrayValue.map((item, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
34193
|
+
renderFormFields(
|
|
34194
|
+
propSchema.items,
|
|
34195
|
+
item,
|
|
34196
|
+
[...path, index2.toString()],
|
|
34197
|
+
depth + 1
|
|
34198
|
+
),
|
|
34199
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34200
|
+
Button,
|
|
34201
|
+
{
|
|
34202
|
+
variant: "outline",
|
|
34203
|
+
size: "sm",
|
|
34204
|
+
onClick: () => {
|
|
34205
|
+
const newArray = [...arrayValue];
|
|
34206
|
+
newArray.splice(index2, 1);
|
|
34207
|
+
handleFieldChange(path, newArray);
|
|
34208
|
+
},
|
|
34209
|
+
children: "Remove"
|
|
34210
|
+
}
|
|
34211
|
+
)
|
|
34212
|
+
] }, index2)),
|
|
34213
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34214
|
+
Button,
|
|
34215
|
+
{
|
|
34216
|
+
variant: "outline",
|
|
34217
|
+
size: "sm",
|
|
34218
|
+
onClick: () => {
|
|
34219
|
+
const defaultValue = getArrayItemDefault(
|
|
34220
|
+
propSchema.items
|
|
34221
|
+
);
|
|
34222
|
+
handleFieldChange(path, [...arrayValue, defaultValue]);
|
|
34223
|
+
},
|
|
34224
|
+
title: ((_c = propSchema.items) == null ? void 0 : _c.description) ? `Add new ${propSchema.items.description}` : "Add new item",
|
|
34225
|
+
children: "Add Item"
|
|
34226
|
+
}
|
|
34227
|
+
)
|
|
34228
|
+
] })
|
|
34229
|
+
] });
|
|
34230
|
+
}
|
|
34231
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34232
|
+
JsonEditor,
|
|
34233
|
+
{
|
|
34234
|
+
value: JSON.stringify(currentValue ?? [], null, 2),
|
|
34235
|
+
onChange: (newValue) => {
|
|
34236
|
+
try {
|
|
34237
|
+
const parsed = JSON.parse(newValue);
|
|
34238
|
+
handleFieldChange(path, parsed);
|
|
34239
|
+
setJsonError(void 0);
|
|
34240
|
+
} catch (err) {
|
|
34241
|
+
setJsonError(
|
|
34242
|
+
err instanceof Error ? err.message : "Invalid JSON"
|
|
34243
|
+
);
|
|
34244
|
+
}
|
|
34245
|
+
},
|
|
34246
|
+
error: jsonError
|
|
33787
34247
|
}
|
|
33788
34248
|
);
|
|
34249
|
+
}
|
|
33789
34250
|
default:
|
|
33790
34251
|
return null;
|
|
33791
34252
|
}
|
|
@@ -33809,18 +34270,57 @@ const DynamicJsonForm = ({
|
|
|
33809
34270
|
setIsJsonMode(true);
|
|
33810
34271
|
}
|
|
33811
34272
|
}, [shouldUseJsonMode, isJsonMode]);
|
|
34273
|
+
const handleCopyJson = reactExports.useCallback(() => {
|
|
34274
|
+
const copyToClipboard = async () => {
|
|
34275
|
+
try {
|
|
34276
|
+
await navigator.clipboard.writeText(
|
|
34277
|
+
JSON.stringify(value, null, 2) ?? "[]"
|
|
34278
|
+
);
|
|
34279
|
+
setCopiedJson(true);
|
|
34280
|
+
toast2({
|
|
34281
|
+
title: "JSON copied",
|
|
34282
|
+
description: "The JSON data has been successfully copied to your clipboard."
|
|
34283
|
+
});
|
|
34284
|
+
setTimeout(() => {
|
|
34285
|
+
setCopiedJson(false);
|
|
34286
|
+
}, 2e3);
|
|
34287
|
+
} catch (error) {
|
|
34288
|
+
toast2({
|
|
34289
|
+
title: "Error",
|
|
34290
|
+
description: `Failed to copy JSON: ${error instanceof Error ? error.message : String(error)}`,
|
|
34291
|
+
variant: "destructive"
|
|
34292
|
+
});
|
|
34293
|
+
}
|
|
34294
|
+
};
|
|
34295
|
+
copyToClipboard();
|
|
34296
|
+
}, [toast2, value]);
|
|
33812
34297
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
|
|
33813
34298
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end space-x-2", children: [
|
|
33814
|
-
isJsonMode && /* @__PURE__ */ jsxRuntimeExports.
|
|
33815
|
-
|
|
33816
|
-
|
|
33817
|
-
|
|
33818
|
-
|
|
33819
|
-
|
|
33820
|
-
|
|
33821
|
-
|
|
33822
|
-
|
|
33823
|
-
|
|
34299
|
+
isJsonMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
34300
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
34301
|
+
Button,
|
|
34302
|
+
{
|
|
34303
|
+
type: "button",
|
|
34304
|
+
variant: "outline",
|
|
34305
|
+
size: "sm",
|
|
34306
|
+
onClick: handleCopyJson,
|
|
34307
|
+
children: [
|
|
34308
|
+
copiedJson ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckCheck, { className: "h-4 w-4 mr-2" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "h-4 w-4 mr-2" }),
|
|
34309
|
+
"Copy JSON"
|
|
34310
|
+
]
|
|
34311
|
+
}
|
|
34312
|
+
),
|
|
34313
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
34314
|
+
Button,
|
|
34315
|
+
{
|
|
34316
|
+
type: "button",
|
|
34317
|
+
variant: "outline",
|
|
34318
|
+
size: "sm",
|
|
34319
|
+
onClick: formatJson,
|
|
34320
|
+
children: "Format JSON"
|
|
34321
|
+
}
|
|
34322
|
+
)
|
|
34323
|
+
] }),
|
|
33824
34324
|
!isOnlyJSON && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", size: "sm", onClick: handleSwitchToFormMode, children: isJsonMode ? "Switch to Form" : "Switch to JSON" })
|
|
33825
34325
|
] }),
|
|
33826
34326
|
isJsonMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -35298,7 +35798,7 @@ const useTheme = () => {
|
|
|
35298
35798
|
[theme, setThemeWithSideEffect]
|
|
35299
35799
|
);
|
|
35300
35800
|
};
|
|
35301
|
-
const version = "0.
|
|
35801
|
+
const version = "0.16.0";
|
|
35302
35802
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
35303
35803
|
createPopperScope
|
|
35304
35804
|
]);
|
|
@@ -36226,7 +36726,7 @@ const Sidebar = ({
|
|
|
36226
36726
|
}
|
|
36227
36727
|
),
|
|
36228
36728
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
36229
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36729
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { className: "h-4 w-4 text-muted-foreground" }) }),
|
|
36230
36730
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: configItem.description })
|
|
36231
36731
|
] })
|
|
36232
36732
|
] }),
|
|
@@ -36419,7 +36919,7 @@ const Sidebar = ({
|
|
|
36419
36919
|
href: "https://modelcontextprotocol.io/docs/tools/inspector",
|
|
36420
36920
|
target: "_blank",
|
|
36421
36921
|
rel: "noopener noreferrer",
|
|
36422
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36922
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircleQuestionMark, { className: "w-4 h-4 text-foreground" })
|
|
36423
36923
|
}
|
|
36424
36924
|
) }),
|
|
36425
36925
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "ghost", title: "Debugging Guide", asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -36907,7 +37407,11 @@ const ToolsTab = ({
|
|
|
36907
37407
|
(selectedTool == null ? void 0 : selectedTool.inputSchema.properties) ?? []
|
|
36908
37408
|
).map(([key, value]) => [
|
|
36909
37409
|
key,
|
|
36910
|
-
generateDefaultValue(
|
|
37410
|
+
generateDefaultValue(
|
|
37411
|
+
value,
|
|
37412
|
+
key,
|
|
37413
|
+
selectedTool == null ? void 0 : selectedTool.inputSchema
|
|
37414
|
+
)
|
|
36911
37415
|
]);
|
|
36912
37416
|
setParams(Object.fromEntries(params2));
|
|
36913
37417
|
}, [selectedTool]);
|
|
@@ -36938,13 +37442,18 @@ const ToolsTab = ({
|
|
|
36938
37442
|
Object.entries(selectedTool.inputSchema.properties ?? []).map(
|
|
36939
37443
|
([key, value]) => {
|
|
36940
37444
|
const prop = value;
|
|
37445
|
+
const inputSchema = selectedTool.inputSchema;
|
|
37446
|
+
const required2 = isPropertyRequired(key, inputSchema);
|
|
36941
37447
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
36942
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
37448
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
36943
37449
|
Label$1,
|
|
36944
37450
|
{
|
|
36945
37451
|
htmlFor: key,
|
|
36946
37452
|
className: "block text-sm font-medium text-gray-700 dark:text-gray-300",
|
|
36947
|
-
children:
|
|
37453
|
+
children: [
|
|
37454
|
+
key,
|
|
37455
|
+
required2 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500 ml-1", children: "*" })
|
|
37456
|
+
]
|
|
36948
37457
|
}
|
|
36949
37458
|
),
|
|
36950
37459
|
prop.type === "boolean" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2 mt-2", children: [
|
|
@@ -37006,10 +37515,13 @@ const ToolsTab = ({
|
|
|
37006
37515
|
name: key,
|
|
37007
37516
|
placeholder: prop.description,
|
|
37008
37517
|
value: params[key] ?? "",
|
|
37009
|
-
onChange: (e) =>
|
|
37010
|
-
|
|
37011
|
-
|
|
37012
|
-
|
|
37518
|
+
onChange: (e) => {
|
|
37519
|
+
const value2 = e.target.value;
|
|
37520
|
+
setParams({
|
|
37521
|
+
...params,
|
|
37522
|
+
[key]: value2 === "" ? "" : Number(value2)
|
|
37523
|
+
});
|
|
37524
|
+
},
|
|
37013
37525
|
className: "mt-1"
|
|
37014
37526
|
}
|
|
37015
37527
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -37519,13 +38031,13 @@ const App = () => {
|
|
|
37519
38031
|
) });
|
|
37520
38032
|
if (window.location.pathname === "/oauth/callback") {
|
|
37521
38033
|
const OAuthCallback = React.lazy(
|
|
37522
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
38034
|
+
() => __vitePreload(() => import("./OAuthCallback-DMQy4ibj.js"), true ? __vite__mapDeps([0,1]) : void 0)
|
|
37523
38035
|
);
|
|
37524
38036
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
|
|
37525
38037
|
}
|
|
37526
38038
|
if (window.location.pathname === "/oauth/callback/debug") {
|
|
37527
38039
|
const OAuthDebugCallback = React.lazy(
|
|
37528
|
-
() => __vitePreload(() => import("./OAuthDebugCallback-
|
|
38040
|
+
() => __vitePreload(() => import("./OAuthDebugCallback-9JxBAysc.js"), true ? __vite__mapDeps([2,1]) : void 0)
|
|
37529
38041
|
);
|
|
37530
38042
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
|
|
37531
38043
|
}
|