@workglow/util 0.0.116 → 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 CHANGED
@@ -2579,69 +2579,136 @@ var mcpAuthTypes = [
2579
2579
  "authorization_code"
2580
2580
  ];
2581
2581
  var mcpAuthConfigSchema = {
2582
- auth_type: {
2583
- type: "string",
2584
- enum: mcpAuthTypes,
2585
- title: "Auth Type",
2586
- description: "Authentication method for connecting to the MCP server",
2587
- default: "none"
2588
- },
2589
- auth_token: {
2590
- type: "string",
2591
- format: "credential",
2592
- title: "Bearer Token",
2593
- description: "Static bearer token or API key (for bearer auth)"
2594
- },
2595
- auth_client_id: {
2596
- type: "string",
2597
- title: "Client ID",
2598
- description: "OAuth client ID (for OAuth auth types)"
2599
- },
2600
- auth_client_secret: {
2601
- type: "string",
2602
- format: "credential",
2603
- title: "Client Secret",
2604
- description: "OAuth client secret (for client_credentials auth)"
2605
- },
2606
- auth_private_key: {
2607
- type: "string",
2608
- format: "credential",
2609
- title: "Private Key",
2610
- description: "PEM or JWK private key (for private_key_jwt auth)"
2611
- },
2612
- auth_algorithm: {
2613
- type: "string",
2614
- title: "Algorithm",
2615
- description: "JWT signing algorithm, e.g. RS256, ES256 (for private_key_jwt auth)"
2616
- },
2617
- auth_jwt_bearer_assertion: {
2618
- type: "string",
2619
- format: "credential",
2620
- title: "JWT Assertion",
2621
- description: "Pre-built JWT assertion (for static_private_key_jwt auth)"
2622
- },
2623
- auth_redirect_url: {
2624
- type: "string",
2625
- format: "uri",
2626
- title: "Redirect URL",
2627
- description: "OAuth redirect URL (for authorization_code auth)"
2628
- },
2629
- auth_scope: {
2630
- type: "string",
2631
- title: "Scope",
2632
- description: "OAuth scope (space-separated)"
2633
- },
2634
- auth_client_name: {
2635
- type: "string",
2636
- title: "Client Name",
2637
- description: "Optional OAuth client display name"
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
- auth_jwt_lifetime_seconds: {
2640
- type: "number",
2641
- title: "JWT Lifetime",
2642
- description: "JWT lifetime in seconds (default: 300)",
2643
- minimum: 1
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);
@@ -3152,7 +3219,7 @@ function createDefaultTelemetryProvider() {
3152
3219
  if (getEnv2("TELEMETRY")?.toLowerCase() === "console") {
3153
3220
  return new ConsoleTelemetryProvider;
3154
3221
  }
3155
- if (isTruthy2(getEnv2("DEV"))) {
3222
+ if (isTruthy2(getEnv2("DEV")) && getEnv2("NODE_ENV") !== "test" && !isTruthy2(getEnv2("VITEST")) && !isTruthy2(getEnv2("CI"))) {
3156
3223
  return new ConsoleTelemetryProvider;
3157
3224
  }
3158
3225
  return new NoopTelemetryProvider;
@@ -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
- transport: {
3188
- type: "string",
3189
- enum: mcpTransportTypes,
3190
- title: "Transport",
3191
- description: "The transport type to use for connecting to the MCP server"
3192
- },
3193
- server_url: {
3194
- type: "string",
3195
- format: "uri",
3196
- title: "Server URL",
3197
- description: "The URL of the MCP server (for streamable-http transport)"
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
- ...mcpAuthConfigSchema
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=67AE0E6DF0DBC76064756E2164756E21
3489
+ //# debugId=050A4B47EBAAA46164756E2164756E21