@agentrun/sdk 0.0.3-test.21470120979 → 0.0.3-test.21472892602
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.cjs +41 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +41 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4995,16 +4995,28 @@ var init_sandbox = __esm({
|
|
|
4995
4995
|
return new SandboxClient2();
|
|
4996
4996
|
}
|
|
4997
4997
|
static async create(arg1, arg2) {
|
|
4998
|
+
if (typeof arg1 === "object" && arg1 !== null && "input" in arg1) {
|
|
4999
|
+
return await _Sandbox.getClient().createSandbox(arg1);
|
|
5000
|
+
}
|
|
5001
|
+
logger.warn(
|
|
5002
|
+
"Deprecated: Sandbox.create(input, config) is deprecated. Use Sandbox.create({ input, config }) instead."
|
|
5003
|
+
);
|
|
4998
5004
|
return await _Sandbox.getClient().createSandbox(arg1, arg2);
|
|
4999
5005
|
}
|
|
5000
5006
|
static async delete(arg1, arg2) {
|
|
5001
5007
|
if (typeof arg1 === "string") {
|
|
5008
|
+
logger.warn(
|
|
5009
|
+
"Sandbox.delete(id, config) is deprecated. Use Sandbox.delete({ id, config }) instead."
|
|
5010
|
+
);
|
|
5002
5011
|
return await _Sandbox.getClient().deleteSandbox(arg1, arg2);
|
|
5003
5012
|
}
|
|
5004
5013
|
return await _Sandbox.getClient().deleteSandbox(arg1);
|
|
5005
5014
|
}
|
|
5006
5015
|
static async stop(arg1, arg2) {
|
|
5007
5016
|
if (typeof arg1 === "string") {
|
|
5017
|
+
logger.warn(
|
|
5018
|
+
"Sandbox.stop(id, config) is deprecated. Use Sandbox.stop({ id, config }) instead."
|
|
5019
|
+
);
|
|
5008
5020
|
return await _Sandbox.getClient().stopSandbox(arg1, arg2);
|
|
5009
5021
|
}
|
|
5010
5022
|
return await _Sandbox.getClient().stopSandbox(arg1);
|
|
@@ -5080,7 +5092,10 @@ var init_sandbox = __esm({
|
|
|
5080
5092
|
}
|
|
5081
5093
|
}
|
|
5082
5094
|
static async list(arg1, arg2) {
|
|
5083
|
-
if (arg2 !== void 0 || arg1 && ("maxResults" in arg1 || "nextToken" in arg1 || "status" in arg1 || "templateName" in arg1)) {
|
|
5095
|
+
if (arg2 !== void 0 || arg1 && ("maxResults" in arg1 || "nextToken" in arg1 || "status" in arg1 || "templateName" in arg1 || "templateType" in arg1)) {
|
|
5096
|
+
logger.warn(
|
|
5097
|
+
"Deprecated: Sandbox.list(input, config) is deprecated. Use Sandbox.list({ input, config }) instead."
|
|
5098
|
+
);
|
|
5084
5099
|
return await _Sandbox.getClient().listSandboxes(
|
|
5085
5100
|
arg1,
|
|
5086
5101
|
arg2
|
|
@@ -5692,12 +5707,16 @@ var init_template = __esm({
|
|
|
5692
5707
|
}
|
|
5693
5708
|
return void 0;
|
|
5694
5709
|
};
|
|
5695
|
-
this.sandboxIdleTimeoutInSeconds = toNumber(
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
this.
|
|
5699
|
-
this.
|
|
5700
|
-
|
|
5710
|
+
this.sandboxIdleTimeoutInSeconds = toNumber(
|
|
5711
|
+
this.sandboxIdleTimeoutInSeconds
|
|
5712
|
+
);
|
|
5713
|
+
this.sandboxTtlInSeconds = toNumber(this.sandboxTtlInSeconds);
|
|
5714
|
+
this.shareConcurrencyLimitPerSandbox = toNumber(
|
|
5715
|
+
this.shareConcurrencyLimitPerSandbox
|
|
5716
|
+
);
|
|
5717
|
+
this.cpu = toNumber(this.cpu);
|
|
5718
|
+
this.memory = toNumber(this.memory);
|
|
5719
|
+
this.diskSize = toNumber(this.diskSize);
|
|
5701
5720
|
}
|
|
5702
5721
|
};
|
|
5703
5722
|
}
|
|
@@ -5900,17 +5919,17 @@ var init_client3 = __esm({
|
|
|
5900
5919
|
let input;
|
|
5901
5920
|
let templateType;
|
|
5902
5921
|
let config2;
|
|
5903
|
-
if ("
|
|
5922
|
+
if ("input" in arg1) {
|
|
5923
|
+
const params = arg1;
|
|
5924
|
+
input = params.input;
|
|
5925
|
+
templateType = params.templateType;
|
|
5926
|
+
config2 = params.config;
|
|
5927
|
+
} else {
|
|
5904
5928
|
logger.warn(
|
|
5905
5929
|
"Deprecated: createSandbox(input, config) is deprecated. Use createSandbox({ input, config }) instead."
|
|
5906
5930
|
);
|
|
5907
5931
|
input = arg1;
|
|
5908
5932
|
config2 = arg2;
|
|
5909
|
-
} else {
|
|
5910
|
-
const params = arg1;
|
|
5911
|
-
input = params.input;
|
|
5912
|
-
templateType = params.templateType;
|
|
5913
|
-
config2 = params.config;
|
|
5914
5933
|
}
|
|
5915
5934
|
const cfg = exports.Config.withConfigs(this.config, config2);
|
|
5916
5935
|
try {
|
|
@@ -5995,15 +6014,19 @@ var init_client3 = __esm({
|
|
|
5995
6014
|
/**
|
|
5996
6015
|
* Stop a Sandbox
|
|
5997
6016
|
*/
|
|
5998
|
-
stopSandbox = async (
|
|
5999
|
-
let
|
|
6000
|
-
|
|
6017
|
+
stopSandbox = async (arg1, arg2) => {
|
|
6018
|
+
let id;
|
|
6019
|
+
let config2;
|
|
6020
|
+
if (typeof arg1 === "string") {
|
|
6001
6021
|
logger.warn(
|
|
6002
6022
|
"Deprecated: stopSandbox(id, config) is deprecated. Use stopSandbox({ id, config }) instead."
|
|
6003
6023
|
);
|
|
6004
|
-
|
|
6024
|
+
id = arg1;
|
|
6025
|
+
config2 = arg2;
|
|
6026
|
+
} else {
|
|
6027
|
+
id = arg1.id;
|
|
6028
|
+
config2 = arg1.config;
|
|
6005
6029
|
}
|
|
6006
|
-
const { id, config: config2 } = params;
|
|
6007
6030
|
const cfg = exports.Config.withConfigs(this.config, config2);
|
|
6008
6031
|
try {
|
|
6009
6032
|
const result = await this.controlApi.stopSandbox({
|