computesdk 2.5.1 → 2.5.3

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/index.d.mts CHANGED
@@ -3853,7 +3853,10 @@ declare const PROVIDER_AUTH: {
3853
3853
  readonly hopx: readonly [readonly ["HOPX_API_KEY"]];
3854
3854
  readonly beam: readonly [readonly ["BEAM_TOKEN", "BEAM_WORKSPACE_ID"]];
3855
3855
  readonly sprites: readonly [readonly ["SPRITES_TOKEN"]];
3856
+ readonly freestyle: readonly [readonly ["FREESTYLE_API_KEY"]];
3857
+ readonly upstash: readonly [readonly ["UPSTASH_BOX_API_KEY"]];
3856
3858
  readonly 'just-bash': readonly [readonly []];
3859
+ readonly 'secure-exec': readonly [readonly []];
3857
3860
  };
3858
3861
  /**
3859
3862
  * All supported provider names (excluding gateway which is special)
@@ -3989,7 +3992,14 @@ interface ExplicitComputeConfig {
3989
3992
  sprites?: {
3990
3993
  apiKey?: string;
3991
3994
  };
3995
+ freestyle?: {
3996
+ apiKey?: string;
3997
+ };
3998
+ upstash?: {
3999
+ apiKey?: string;
4000
+ };
3992
4001
  'just-bash'?: {};
4002
+ 'secure-exec'?: {};
3993
4003
  }
3994
4004
  /**
3995
4005
  * Options for creating a sandbox via the gateway
@@ -4238,7 +4248,7 @@ declare const TRIBUTARY_URL = "https://tributary.edge.computesdk.com";
4238
4248
  * Provider detection priority order
4239
4249
  * When multiple provider credentials are detected, use the first one in this list
4240
4250
  */
4241
- declare const PROVIDER_PRIORITY: readonly ["e2b", "railway", "render", "daytona", "modal", "runloop", "vercel", "cloudflare", "codesandbox", "blaxel", "namespace", "hopx", "beam", "sprites"];
4251
+ declare const PROVIDER_PRIORITY: readonly ["e2b", "railway", "render", "daytona", "modal", "runloop", "vercel", "cloudflare", "codesandbox", "blaxel", "namespace", "hopx", "beam", "sprites", "freestyle", "upstash", "secure-exec"];
4242
4252
  /**
4243
4253
  * Required environment variables for each provider
4244
4254
  * @deprecated Use PROVIDER_AUTH from provider-config instead
@@ -4258,7 +4268,10 @@ declare const PROVIDER_ENV_VARS: {
4258
4268
  readonly hopx: readonly ["HOPX_API_KEY"];
4259
4269
  readonly beam: readonly ["BEAM_TOKEN", "BEAM_WORKSPACE_ID"];
4260
4270
  readonly sprites: readonly ["SPRITES_TOKEN"];
4271
+ readonly freestyle: readonly ["FREESTYLE_API_KEY"];
4272
+ readonly upstash: readonly ["UPSTASH_BOX_API_KEY"];
4261
4273
  readonly 'just-bash': readonly [];
4274
+ readonly 'secure-exec': readonly [];
4262
4275
  };
4263
4276
 
4264
4277
  export { type CallableCompute, type CodeResult$1 as CodeResult, CommandExitError, type CommandResult$1 as CommandResult, type CreateSandboxOptions$1 as CreateSandboxOptions, type ExplicitComputeConfig, type FileEntry, FileWatcher, Sandbox as GatewaySandbox, MessageType, PROVIDER_AUTH, PROVIDER_DASHBOARD_URLS, PROVIDER_ENV_MAP, PROVIDER_ENV_VARS, PROVIDER_HEADERS, PROVIDER_NAMES, PROVIDER_PRIORITY, type ProviderName, type ProviderSandboxInfo, type RunCommandOptions, type Runtime, Sandbox, type SandboxFileSystem, type SandboxInfo$1 as SandboxInfo, type Sandbox$1 as SandboxInterface, type SandboxStatus, type SetupOverlayConfig, type SetupPayload, SignalService, type Snapshot, TRIBUTARY_URL, TerminalInstance, type WebSocketConstructor, autoConfigureCompute, buildProviderHeaders, buildSetupPayload, compute, decodeBinaryMessage, detectProvider, encodeBinaryMessage, encodeSetupPayload, getMissingEnvVars, getProviderConfigFromEnv, getProviderHeaders, isCommandExitError, isGatewayModeEnabled, isProviderAuthComplete, isValidProvider };
package/dist/index.d.ts CHANGED
@@ -3853,7 +3853,10 @@ declare const PROVIDER_AUTH: {
3853
3853
  readonly hopx: readonly [readonly ["HOPX_API_KEY"]];
3854
3854
  readonly beam: readonly [readonly ["BEAM_TOKEN", "BEAM_WORKSPACE_ID"]];
3855
3855
  readonly sprites: readonly [readonly ["SPRITES_TOKEN"]];
3856
+ readonly freestyle: readonly [readonly ["FREESTYLE_API_KEY"]];
3857
+ readonly upstash: readonly [readonly ["UPSTASH_BOX_API_KEY"]];
3856
3858
  readonly 'just-bash': readonly [readonly []];
3859
+ readonly 'secure-exec': readonly [readonly []];
3857
3860
  };
3858
3861
  /**
3859
3862
  * All supported provider names (excluding gateway which is special)
@@ -3989,7 +3992,14 @@ interface ExplicitComputeConfig {
3989
3992
  sprites?: {
3990
3993
  apiKey?: string;
3991
3994
  };
3995
+ freestyle?: {
3996
+ apiKey?: string;
3997
+ };
3998
+ upstash?: {
3999
+ apiKey?: string;
4000
+ };
3992
4001
  'just-bash'?: {};
4002
+ 'secure-exec'?: {};
3993
4003
  }
3994
4004
  /**
3995
4005
  * Options for creating a sandbox via the gateway
@@ -4238,7 +4248,7 @@ declare const TRIBUTARY_URL = "https://tributary.edge.computesdk.com";
4238
4248
  * Provider detection priority order
4239
4249
  * When multiple provider credentials are detected, use the first one in this list
4240
4250
  */
4241
- declare const PROVIDER_PRIORITY: readonly ["e2b", "railway", "render", "daytona", "modal", "runloop", "vercel", "cloudflare", "codesandbox", "blaxel", "namespace", "hopx", "beam", "sprites"];
4251
+ declare const PROVIDER_PRIORITY: readonly ["e2b", "railway", "render", "daytona", "modal", "runloop", "vercel", "cloudflare", "codesandbox", "blaxel", "namespace", "hopx", "beam", "sprites", "freestyle", "upstash", "secure-exec"];
4242
4252
  /**
4243
4253
  * Required environment variables for each provider
4244
4254
  * @deprecated Use PROVIDER_AUTH from provider-config instead
@@ -4258,7 +4268,10 @@ declare const PROVIDER_ENV_VARS: {
4258
4268
  readonly hopx: readonly ["HOPX_API_KEY"];
4259
4269
  readonly beam: readonly ["BEAM_TOKEN", "BEAM_WORKSPACE_ID"];
4260
4270
  readonly sprites: readonly ["SPRITES_TOKEN"];
4271
+ readonly freestyle: readonly ["FREESTYLE_API_KEY"];
4272
+ readonly upstash: readonly ["UPSTASH_BOX_API_KEY"];
4261
4273
  readonly 'just-bash': readonly [];
4274
+ readonly 'secure-exec': readonly [];
4262
4275
  };
4263
4276
 
4264
4277
  export { type CallableCompute, type CodeResult$1 as CodeResult, CommandExitError, type CommandResult$1 as CommandResult, type CreateSandboxOptions$1 as CreateSandboxOptions, type ExplicitComputeConfig, type FileEntry, FileWatcher, Sandbox as GatewaySandbox, MessageType, PROVIDER_AUTH, PROVIDER_DASHBOARD_URLS, PROVIDER_ENV_MAP, PROVIDER_ENV_VARS, PROVIDER_HEADERS, PROVIDER_NAMES, PROVIDER_PRIORITY, type ProviderName, type ProviderSandboxInfo, type RunCommandOptions, type Runtime, Sandbox, type SandboxFileSystem, type SandboxInfo$1 as SandboxInfo, type Sandbox$1 as SandboxInterface, type SandboxStatus, type SetupOverlayConfig, type SetupPayload, SignalService, type Snapshot, TRIBUTARY_URL, TerminalInstance, type WebSocketConstructor, autoConfigureCompute, buildProviderHeaders, buildSetupPayload, compute, decodeBinaryMessage, detectProvider, encodeBinaryMessage, encodeSetupPayload, getMissingEnvVars, getProviderConfigFromEnv, getProviderHeaders, isCommandExitError, isGatewayModeEnabled, isProviderAuthComplete, isValidProvider };
package/dist/index.js CHANGED
@@ -3651,7 +3651,10 @@ var PROVIDER_AUTH = {
3651
3651
  hopx: [["HOPX_API_KEY"]],
3652
3652
  beam: [["BEAM_TOKEN", "BEAM_WORKSPACE_ID"]],
3653
3653
  sprites: [["SPRITES_TOKEN"]],
3654
- "just-bash": [[]]
3654
+ freestyle: [["FREESTYLE_API_KEY"]],
3655
+ upstash: [["UPSTASH_BOX_API_KEY"]],
3656
+ "just-bash": [[]],
3657
+ "secure-exec": [[]]
3655
3658
  };
3656
3659
  var PROVIDER_NAMES = Object.keys(PROVIDER_AUTH);
3657
3660
  var PROVIDER_HEADERS = {
@@ -3709,7 +3712,14 @@ var PROVIDER_HEADERS = {
3709
3712
  sprites: {
3710
3713
  apiKey: "X-Sprites-Token"
3711
3714
  },
3712
- "just-bash": {}
3715
+ freestyle: {
3716
+ apiKey: "X-Freestyle-API-Key"
3717
+ },
3718
+ upstash: {
3719
+ apiKey: "X-Upstash-Box-API-Key"
3720
+ },
3721
+ "just-bash": {},
3722
+ "secure-exec": {}
3713
3723
  };
3714
3724
  var PROVIDER_ENV_MAP = {
3715
3725
  e2b: {
@@ -3767,7 +3777,14 @@ var PROVIDER_ENV_MAP = {
3767
3777
  sprites: {
3768
3778
  SPRITES_TOKEN: "apiKey"
3769
3779
  },
3770
- "just-bash": {}
3780
+ freestyle: {
3781
+ FREESTYLE_API_KEY: "apiKey"
3782
+ },
3783
+ upstash: {
3784
+ UPSTASH_BOX_API_KEY: "apiKey"
3785
+ },
3786
+ "just-bash": {},
3787
+ "secure-exec": {}
3771
3788
  };
3772
3789
  var PROVIDER_DASHBOARD_URLS = {
3773
3790
  e2b: "https://e2b.dev/dashboard",
@@ -3784,7 +3801,10 @@ var PROVIDER_DASHBOARD_URLS = {
3784
3801
  hopx: "https://hopx.ai/dashboard",
3785
3802
  beam: "https://app.beam.cloud",
3786
3803
  sprites: "https://sprites.dev",
3787
- "just-bash": "https://github.com/vercel-labs/just-bash"
3804
+ freestyle: "https://dash.freestyle.sh",
3805
+ upstash: "https://console.upstash.com",
3806
+ "just-bash": "https://github.com/vercel-labs/just-bash",
3807
+ "secure-exec": "https://github.com/anomalyco/secure-exec"
3788
3808
  };
3789
3809
  function isValidProvider(name) {
3790
3810
  return name in PROVIDER_AUTH;
@@ -3856,7 +3876,10 @@ var PROVIDER_PRIORITY = [
3856
3876
  "namespace",
3857
3877
  "hopx",
3858
3878
  "beam",
3859
- "sprites"
3879
+ "sprites",
3880
+ "freestyle",
3881
+ "upstash",
3882
+ "secure-exec"
3860
3883
  ];
3861
3884
  var PROVIDER_ENV_VARS = {
3862
3885
  e2b: ["E2B_API_KEY"],
@@ -3873,7 +3896,10 @@ var PROVIDER_ENV_VARS = {
3873
3896
  hopx: ["HOPX_API_KEY"],
3874
3897
  beam: ["BEAM_TOKEN", "BEAM_WORKSPACE_ID"],
3875
3898
  sprites: ["SPRITES_TOKEN"],
3876
- "just-bash": []
3899
+ freestyle: ["FREESTYLE_API_KEY"],
3900
+ upstash: ["UPSTASH_BOX_API_KEY"],
3901
+ "just-bash": [],
3902
+ "secure-exec": []
3877
3903
  };
3878
3904
 
3879
3905
  // src/auto-detect.ts
@@ -3883,7 +3909,7 @@ function isGatewayModeEnabled() {
3883
3909
  function hasProviderEnv(provider) {
3884
3910
  if (typeof process === "undefined") return false;
3885
3911
  const requiredVars = PROVIDER_ENV_VARS[provider];
3886
- if (!requiredVars) return false;
3912
+ if (!requiredVars || requiredVars.length === 0) return false;
3887
3913
  return requiredVars.every((varName) => !!process.env?.[varName]);
3888
3914
  }
3889
3915
  function getProviderEnvStatus(provider) {
@@ -4023,6 +4049,13 @@ function getProviderHeaders(provider) {
4023
4049
  break;
4024
4050
  case "just-bash":
4025
4051
  break;
4052
+ case "secure-exec":
4053
+ break;
4054
+ case "upstash":
4055
+ if (process.env.UPSTASH_BOX_API_KEY) {
4056
+ headers["X-Upstash-Box-API-Key"] = process.env.UPSTASH_BOX_API_KEY;
4057
+ }
4058
+ break;
4026
4059
  }
4027
4060
  return headers;
4028
4061
  }
@@ -4064,7 +4097,9 @@ To fix this, set one of the following:
4064
4097
  Render: export RENDER_API_KEY=xxx RENDER_OWNER_ID=xxx
4065
4098
  Beam: export BEAM_TOKEN=xxx BEAM_WORKSPACE_ID=xxx
4066
4099
  Sprites: export SPRITES_TOKEN=xxx
4100
+ Upstash: export UPSTASH_BOX_API_KEY=xxx
4067
4101
  just-bash: (no credentials needed - local sandbox)
4102
+ secure-exec: (no credentials needed - local sandbox)
4068
4103
 
4069
4104
  Or set COMPUTESDK_PROVIDER to specify explicitly:
4070
4105
  export COMPUTESDK_PROVIDER=<provider>