@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/browser.js
CHANGED
|
@@ -2579,69 +2579,136 @@ var mcpAuthTypes = [
|
|
|
2579
2579
|
"authorization_code"
|
|
2580
2580
|
];
|
|
2581
2581
|
var mcpAuthConfigSchema = {
|
|
2582
|
-
|
|
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
|
-
|
|
2582
|
+
properties: {
|
|
2583
|
+
auth_type: {
|
|
2584
|
+
type: "string",
|
|
2585
|
+
enum: mcpAuthTypes,
|
|
2586
|
+
title: "Auth Type",
|
|
2587
|
+
description: "Authentication method for connecting to the MCP server",
|
|
2588
|
+
default: "none"
|
|
2589
|
+
},
|
|
2590
|
+
auth_token: {
|
|
2591
|
+
type: "string",
|
|
2592
|
+
format: "credential",
|
|
2593
|
+
title: "Bearer Token",
|
|
2594
|
+
description: "Static bearer token or API key (for bearer auth)"
|
|
2595
|
+
},
|
|
2596
|
+
auth_client_id: {
|
|
2597
|
+
type: "string",
|
|
2598
|
+
title: "Client ID",
|
|
2599
|
+
description: "OAuth client ID (for OAuth auth types)"
|
|
2600
|
+
},
|
|
2601
|
+
auth_client_secret: {
|
|
2602
|
+
type: "string",
|
|
2603
|
+
format: "credential",
|
|
2604
|
+
title: "Client Secret",
|
|
2605
|
+
description: "OAuth client secret (for client_credentials auth)"
|
|
2606
|
+
},
|
|
2607
|
+
auth_private_key: {
|
|
2608
|
+
type: "string",
|
|
2609
|
+
format: "credential",
|
|
2610
|
+
title: "Private Key",
|
|
2611
|
+
description: "PEM or JWK private key (for private_key_jwt auth)"
|
|
2612
|
+
},
|
|
2613
|
+
auth_algorithm: {
|
|
2614
|
+
type: "string",
|
|
2615
|
+
title: "Algorithm",
|
|
2616
|
+
description: "JWT signing algorithm, e.g. RS256, ES256 (for private_key_jwt auth)"
|
|
2617
|
+
},
|
|
2618
|
+
auth_jwt_bearer_assertion: {
|
|
2619
|
+
type: "string",
|
|
2620
|
+
format: "credential",
|
|
2621
|
+
title: "JWT Assertion",
|
|
2622
|
+
description: "Pre-built JWT assertion (for static_private_key_jwt auth)"
|
|
2623
|
+
},
|
|
2624
|
+
auth_redirect_url: {
|
|
2625
|
+
type: "string",
|
|
2626
|
+
format: "uri",
|
|
2627
|
+
title: "Redirect URL",
|
|
2628
|
+
description: "OAuth redirect URL (for authorization_code auth)"
|
|
2629
|
+
},
|
|
2630
|
+
auth_scope: {
|
|
2631
|
+
type: "string",
|
|
2632
|
+
title: "Scope",
|
|
2633
|
+
description: "OAuth scope (space-separated)"
|
|
2634
|
+
},
|
|
2635
|
+
auth_client_name: {
|
|
2636
|
+
type: "string",
|
|
2637
|
+
title: "Client Name",
|
|
2638
|
+
description: "Optional OAuth client display name"
|
|
2639
|
+
},
|
|
2640
|
+
auth_jwt_lifetime_seconds: {
|
|
2641
|
+
type: "number",
|
|
2642
|
+
title: "JWT Lifetime",
|
|
2643
|
+
description: "JWT lifetime in seconds (default: 300)",
|
|
2644
|
+
minimum: 1
|
|
2645
|
+
}
|
|
2638
2646
|
},
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2647
|
+
allOf: [
|
|
2648
|
+
{
|
|
2649
|
+
if: { properties: { auth_type: { const: "bearer" } }, required: ["auth_type"] },
|
|
2650
|
+
then: {
|
|
2651
|
+
required: ["auth_token"],
|
|
2652
|
+
properties: { auth_token: true }
|
|
2653
|
+
}
|
|
2654
|
+
},
|
|
2655
|
+
{
|
|
2656
|
+
if: {
|
|
2657
|
+
properties: { auth_type: { const: "client_credentials" } },
|
|
2658
|
+
required: ["auth_type"]
|
|
2659
|
+
},
|
|
2660
|
+
then: {
|
|
2661
|
+
required: ["auth_client_id", "auth_client_secret"],
|
|
2662
|
+
properties: {
|
|
2663
|
+
auth_client_id: true,
|
|
2664
|
+
auth_client_secret: true,
|
|
2665
|
+
auth_client_name: true,
|
|
2666
|
+
auth_scope: true
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
if: { properties: { auth_type: { const: "private_key_jwt" } }, required: ["auth_type"] },
|
|
2672
|
+
then: {
|
|
2673
|
+
required: ["auth_client_id", "auth_private_key", "auth_algorithm"],
|
|
2674
|
+
properties: {
|
|
2675
|
+
auth_client_id: true,
|
|
2676
|
+
auth_private_key: true,
|
|
2677
|
+
auth_algorithm: true,
|
|
2678
|
+
auth_client_name: true,
|
|
2679
|
+
auth_jwt_lifetime_seconds: true,
|
|
2680
|
+
auth_scope: true
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
if: {
|
|
2686
|
+
properties: { auth_type: { const: "static_private_key_jwt" } },
|
|
2687
|
+
required: ["auth_type"]
|
|
2688
|
+
},
|
|
2689
|
+
then: {
|
|
2690
|
+
required: ["auth_client_id", "auth_jwt_bearer_assertion"],
|
|
2691
|
+
properties: {
|
|
2692
|
+
auth_client_id: true,
|
|
2693
|
+
auth_jwt_bearer_assertion: true,
|
|
2694
|
+
auth_client_name: true,
|
|
2695
|
+
auth_scope: true
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
},
|
|
2699
|
+
{
|
|
2700
|
+
if: { properties: { auth_type: { const: "authorization_code" } }, required: ["auth_type"] },
|
|
2701
|
+
then: {
|
|
2702
|
+
required: ["auth_client_id", "auth_redirect_url"],
|
|
2703
|
+
properties: {
|
|
2704
|
+
auth_client_id: true,
|
|
2705
|
+
auth_client_secret: true,
|
|
2706
|
+
auth_redirect_url: true,
|
|
2707
|
+
auth_scope: true
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
]
|
|
2645
2712
|
};
|
|
2646
2713
|
function isMcpAuthType(value) {
|
|
2647
2714
|
return typeof value === "string" && mcpAuthTypes.includes(value);
|
|
@@ -3184,19 +3251,22 @@ import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
|
3184
3251
|
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3185
3252
|
var mcpTransportTypes = ["streamable-http", "sse"];
|
|
3186
3253
|
var mcpServerConfigSchema = {
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3254
|
+
properties: {
|
|
3255
|
+
transport: {
|
|
3256
|
+
type: "string",
|
|
3257
|
+
enum: mcpTransportTypes,
|
|
3258
|
+
title: "Transport",
|
|
3259
|
+
description: "The transport type to use for connecting to the MCP server"
|
|
3260
|
+
},
|
|
3261
|
+
server_url: {
|
|
3262
|
+
type: "string",
|
|
3263
|
+
format: "uri",
|
|
3264
|
+
title: "Server URL",
|
|
3265
|
+
description: "The URL of the MCP server (for streamable-http transport)"
|
|
3266
|
+
},
|
|
3267
|
+
...mcpAuthConfigSchema.properties
|
|
3198
3268
|
},
|
|
3199
|
-
|
|
3269
|
+
allOf: mcpAuthConfigSchema.allOf
|
|
3200
3270
|
};
|
|
3201
3271
|
async function createMcpClient(config, signal) {
|
|
3202
3272
|
let transport;
|
|
@@ -3416,4 +3486,4 @@ export {
|
|
|
3416
3486
|
BaseError
|
|
3417
3487
|
};
|
|
3418
3488
|
|
|
3419
|
-
//# debugId=
|
|
3489
|
+
//# debugId=050A4B47EBAAA46164756E2164756E21
|