@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/bun.js CHANGED
@@ -2580,69 +2580,136 @@ var mcpAuthTypes = [
2580
2580
  "authorization_code"
2581
2581
  ];
2582
2582
  var mcpAuthConfigSchema = {
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"
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
- auth_jwt_lifetime_seconds: {
2641
- type: "number",
2642
- title: "JWT Lifetime",
2643
- description: "JWT lifetime in seconds (default: 300)",
2644
- minimum: 1
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
- transport: {
3197
- type: "string",
3198
- enum: mcpTransportTypes,
3199
- title: "Transport",
3200
- description: "The transport type to use for connecting to the MCP server"
3201
- },
3202
- server_url: {
3203
- type: "string",
3204
- format: "string:uri",
3205
- title: "Server URL",
3206
- description: "The URL of the MCP server (for sse and streamable-http transports)"
3207
- },
3208
- command: {
3209
- type: "string",
3210
- title: "Command",
3211
- description: "The command to run (for stdio transport)"
3212
- },
3213
- args: {
3214
- type: "array",
3215
- items: { type: "string" },
3216
- title: "Arguments",
3217
- description: "Command arguments (for stdio transport)"
3218
- },
3219
- env: {
3220
- type: "object",
3221
- additionalProperties: { type: "string" },
3222
- title: "Environment",
3223
- description: "Environment variables (for stdio transport)"
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
- ...mcpAuthConfigSchema
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=8521DA6A86167CBD64756E2164756E21
3487
+ //# debugId=9B459DAB6A69C21764756E2164756E21