@workglow/util 0.0.117 → 0.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +145 -75
- package/dist/browser.js.map +4 -4
- package/dist/bun.js +162 -92
- package/dist/bun.js.map +4 -4
- package/dist/json-schema/JsonSchema.d.ts +1 -0
- package/dist/json-schema/JsonSchema.d.ts.map +1 -1
- package/dist/mcp/McpAuthTypes.d.ts +154 -62
- package/dist/mcp/McpAuthTypes.d.ts.map +1 -1
- package/dist/mcp/McpClientUtil.browser.d.ts +166 -74
- package/dist/mcp/McpClientUtil.browser.d.ts.map +1 -1
- package/dist/mcp/McpClientUtil.node.d.ts +183 -91
- package/dist/mcp/McpClientUtil.node.d.ts.map +1 -1
- package/dist/node.js +162 -92
- package/dist/node.js.map +4 -4
- package/package.json +1 -1
package/dist/bun.js
CHANGED
|
@@ -2580,69 +2580,136 @@ var mcpAuthTypes = [
|
|
|
2580
2580
|
"authorization_code"
|
|
2581
2581
|
];
|
|
2582
2582
|
var mcpAuthConfigSchema = {
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2583
|
+
properties: {
|
|
2584
|
+
auth_type: {
|
|
2585
|
+
type: "string",
|
|
2586
|
+
enum: mcpAuthTypes,
|
|
2587
|
+
title: "Auth Type",
|
|
2588
|
+
description: "Authentication method for connecting to the MCP server",
|
|
2589
|
+
default: "none"
|
|
2590
|
+
},
|
|
2591
|
+
auth_token: {
|
|
2592
|
+
type: "string",
|
|
2593
|
+
format: "credential",
|
|
2594
|
+
title: "Bearer Token",
|
|
2595
|
+
description: "Static bearer token or API key (for bearer auth)"
|
|
2596
|
+
},
|
|
2597
|
+
auth_client_id: {
|
|
2598
|
+
type: "string",
|
|
2599
|
+
title: "Client ID",
|
|
2600
|
+
description: "OAuth client ID (for OAuth auth types)"
|
|
2601
|
+
},
|
|
2602
|
+
auth_client_secret: {
|
|
2603
|
+
type: "string",
|
|
2604
|
+
format: "credential",
|
|
2605
|
+
title: "Client Secret",
|
|
2606
|
+
description: "OAuth client secret (for client_credentials auth)"
|
|
2607
|
+
},
|
|
2608
|
+
auth_private_key: {
|
|
2609
|
+
type: "string",
|
|
2610
|
+
format: "credential",
|
|
2611
|
+
title: "Private Key",
|
|
2612
|
+
description: "PEM or JWK private key (for private_key_jwt auth)"
|
|
2613
|
+
},
|
|
2614
|
+
auth_algorithm: {
|
|
2615
|
+
type: "string",
|
|
2616
|
+
title: "Algorithm",
|
|
2617
|
+
description: "JWT signing algorithm, e.g. RS256, ES256 (for private_key_jwt auth)"
|
|
2618
|
+
},
|
|
2619
|
+
auth_jwt_bearer_assertion: {
|
|
2620
|
+
type: "string",
|
|
2621
|
+
format: "credential",
|
|
2622
|
+
title: "JWT Assertion",
|
|
2623
|
+
description: "Pre-built JWT assertion (for static_private_key_jwt auth)"
|
|
2624
|
+
},
|
|
2625
|
+
auth_redirect_url: {
|
|
2626
|
+
type: "string",
|
|
2627
|
+
format: "uri",
|
|
2628
|
+
title: "Redirect URL",
|
|
2629
|
+
description: "OAuth redirect URL (for authorization_code auth)"
|
|
2630
|
+
},
|
|
2631
|
+
auth_scope: {
|
|
2632
|
+
type: "string",
|
|
2633
|
+
title: "Scope",
|
|
2634
|
+
description: "OAuth scope (space-separated)"
|
|
2635
|
+
},
|
|
2636
|
+
auth_client_name: {
|
|
2637
|
+
type: "string",
|
|
2638
|
+
title: "Client Name",
|
|
2639
|
+
description: "Optional OAuth client display name"
|
|
2640
|
+
},
|
|
2641
|
+
auth_jwt_lifetime_seconds: {
|
|
2642
|
+
type: "number",
|
|
2643
|
+
title: "JWT Lifetime",
|
|
2644
|
+
description: "JWT lifetime in seconds (default: 300)",
|
|
2645
|
+
minimum: 1
|
|
2646
|
+
}
|
|
2639
2647
|
},
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2648
|
+
allOf: [
|
|
2649
|
+
{
|
|
2650
|
+
if: { properties: { auth_type: { const: "bearer" } }, required: ["auth_type"] },
|
|
2651
|
+
then: {
|
|
2652
|
+
required: ["auth_token"],
|
|
2653
|
+
properties: { auth_token: true }
|
|
2654
|
+
}
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
if: {
|
|
2658
|
+
properties: { auth_type: { const: "client_credentials" } },
|
|
2659
|
+
required: ["auth_type"]
|
|
2660
|
+
},
|
|
2661
|
+
then: {
|
|
2662
|
+
required: ["auth_client_id", "auth_client_secret"],
|
|
2663
|
+
properties: {
|
|
2664
|
+
auth_client_id: true,
|
|
2665
|
+
auth_client_secret: true,
|
|
2666
|
+
auth_client_name: true,
|
|
2667
|
+
auth_scope: true
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
if: { properties: { auth_type: { const: "private_key_jwt" } }, required: ["auth_type"] },
|
|
2673
|
+
then: {
|
|
2674
|
+
required: ["auth_client_id", "auth_private_key", "auth_algorithm"],
|
|
2675
|
+
properties: {
|
|
2676
|
+
auth_client_id: true,
|
|
2677
|
+
auth_private_key: true,
|
|
2678
|
+
auth_algorithm: true,
|
|
2679
|
+
auth_client_name: true,
|
|
2680
|
+
auth_jwt_lifetime_seconds: true,
|
|
2681
|
+
auth_scope: true
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
if: {
|
|
2687
|
+
properties: { auth_type: { const: "static_private_key_jwt" } },
|
|
2688
|
+
required: ["auth_type"]
|
|
2689
|
+
},
|
|
2690
|
+
then: {
|
|
2691
|
+
required: ["auth_client_id", "auth_jwt_bearer_assertion"],
|
|
2692
|
+
properties: {
|
|
2693
|
+
auth_client_id: true,
|
|
2694
|
+
auth_jwt_bearer_assertion: true,
|
|
2695
|
+
auth_client_name: true,
|
|
2696
|
+
auth_scope: true
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
if: { properties: { auth_type: { const: "authorization_code" } }, required: ["auth_type"] },
|
|
2702
|
+
then: {
|
|
2703
|
+
required: ["auth_client_id", "auth_redirect_url"],
|
|
2704
|
+
properties: {
|
|
2705
|
+
auth_client_id: true,
|
|
2706
|
+
auth_client_secret: true,
|
|
2707
|
+
auth_redirect_url: true,
|
|
2708
|
+
auth_scope: true
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
]
|
|
2646
2713
|
};
|
|
2647
2714
|
function isMcpAuthType(value) {
|
|
2648
2715
|
return typeof value === "string" && mcpAuthTypes.includes(value);
|
|
@@ -3193,36 +3260,39 @@ import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
|
3193
3260
|
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3194
3261
|
var mcpTransportTypes = ["stdio", "sse", "streamable-http"];
|
|
3195
3262
|
var mcpServerConfigSchema = {
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3263
|
+
properties: {
|
|
3264
|
+
transport: {
|
|
3265
|
+
type: "string",
|
|
3266
|
+
enum: mcpTransportTypes,
|
|
3267
|
+
title: "Transport",
|
|
3268
|
+
description: "The transport type to use for connecting to the MCP server"
|
|
3269
|
+
},
|
|
3270
|
+
server_url: {
|
|
3271
|
+
type: "string",
|
|
3272
|
+
format: "string:uri",
|
|
3273
|
+
title: "Server URL",
|
|
3274
|
+
description: "The URL of the MCP server (for sse and streamable-http transports)"
|
|
3275
|
+
},
|
|
3276
|
+
command: {
|
|
3277
|
+
type: "string",
|
|
3278
|
+
title: "Command",
|
|
3279
|
+
description: "The command to run (for stdio transport)"
|
|
3280
|
+
},
|
|
3281
|
+
args: {
|
|
3282
|
+
type: "array",
|
|
3283
|
+
items: { type: "string" },
|
|
3284
|
+
title: "Arguments",
|
|
3285
|
+
description: "Command arguments (for stdio transport)"
|
|
3286
|
+
},
|
|
3287
|
+
env: {
|
|
3288
|
+
type: "object",
|
|
3289
|
+
additionalProperties: { type: "string" },
|
|
3290
|
+
title: "Environment",
|
|
3291
|
+
description: "Environment variables (for stdio transport)"
|
|
3292
|
+
},
|
|
3293
|
+
...mcpAuthConfigSchema.properties
|
|
3224
3294
|
},
|
|
3225
|
-
|
|
3295
|
+
allOf: mcpAuthConfigSchema.allOf
|
|
3226
3296
|
};
|
|
3227
3297
|
async function createMcpClient(config, signal) {
|
|
3228
3298
|
let transport;
|
|
@@ -3414,4 +3484,4 @@ export {
|
|
|
3414
3484
|
BaseError
|
|
3415
3485
|
};
|
|
3416
3486
|
|
|
3417
|
-
//# debugId=
|
|
3487
|
+
//# debugId=9B459DAB6A69C21764756E2164756E21
|