agental 0.44.0 → 0.45.0
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/cli.js +23 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7411,7 +7411,7 @@ import { parseArgs } from "node:util";
|
|
|
7411
7411
|
|
|
7412
7412
|
// ../src/cli-build.ts
|
|
7413
7413
|
var PUBLISHED = true;
|
|
7414
|
-
var CLI_VERSION = true ? "0.
|
|
7414
|
+
var CLI_VERSION = true ? "0.45.0" : "dev";
|
|
7415
7415
|
var DEFAULT_API_URL = true ? "https://agental.io" : "http://127.0.0.1:8741";
|
|
7416
7416
|
var PACKAGE_NAME = "agental";
|
|
7417
7417
|
var USER_AGENT = `agental-cli/${CLI_VERSION}`;
|
|
@@ -15726,10 +15726,10 @@ async function template(positionals, values) {
|
|
|
15726
15726
|
}
|
|
15727
15727
|
const listed = listedIn(addresses);
|
|
15728
15728
|
if (mode !== "allowlist" && addresses.length > 0) {
|
|
15729
|
-
throw new Error(`Addresses are for allowlist. With ${mode}, leave them out.`);
|
|
15729
|
+
throw new Error(`Addresses and names are for allowlist. With ${mode}, leave them out.`);
|
|
15730
15730
|
}
|
|
15731
15731
|
if (mode === "allowlist" && listed.length === 0) {
|
|
15732
|
-
throw new Error(`allowlist needs at least one address, as agental template network ${first ?? ""} allowlist 203.0.113.7
|
|
15732
|
+
throw new Error(`allowlist needs at least one address or name, as agental template network ${first ?? ""} allowlist github.com 203.0.113.7`);
|
|
15733
15733
|
}
|
|
15734
15734
|
rule = await call2(path6, { method: "PUT", body: JSON.stringify(mode === "allowlist" ? { outbound: mode, allow: listed } : { outbound: mode }) });
|
|
15735
15735
|
}
|
|
@@ -16141,7 +16141,7 @@ async function ci(positionals, options) {
|
|
|
16141
16141
|
return;
|
|
16142
16142
|
}
|
|
16143
16143
|
if (body.repositories.length === 0) {
|
|
16144
|
-
process.stdout.write(`No repository has a pool yet. Connect GitHub in the console (
|
|
16144
|
+
process.stdout.write(`No repository has a pool yet. Connect GitHub in the console (CI runners), then ask for runs-on: agental (its template's size, medium with none) or agental-<size> in a workflow. Each pool keeps ${body.defaultPoolMax} sandboxes of each size.
|
|
16145
16145
|
`);
|
|
16146
16146
|
return;
|
|
16147
16147
|
}
|
|
@@ -17036,7 +17036,22 @@ function apiKey() {
|
|
|
17036
17036
|
}
|
|
17037
17037
|
return key2;
|
|
17038
17038
|
}
|
|
17039
|
+
var LARGE_BODY_TRIES = 4;
|
|
17039
17040
|
async function request(pathname, init) {
|
|
17041
|
+
for (let tries = 1; ; tries += 1) {
|
|
17042
|
+
const response = await requestOnce(pathname, init);
|
|
17043
|
+
if (response.status !== 429 && response.status !== 503 || tries >= LARGE_BODY_TRIES) {
|
|
17044
|
+
return response;
|
|
17045
|
+
}
|
|
17046
|
+
const body = await readBody(response.clone());
|
|
17047
|
+
if (!isApiError(body) || body.error.code !== "too_many_uploads" && body.error.code !== "uploads_busy") {
|
|
17048
|
+
return response;
|
|
17049
|
+
}
|
|
17050
|
+
const seconds2 = typeof body.error.retryAfterSeconds === "number" ? body.error.retryAfterSeconds : 5;
|
|
17051
|
+
await new Promise((resolve) => setTimeout(resolve, seconds2 * 1e3));
|
|
17052
|
+
}
|
|
17053
|
+
}
|
|
17054
|
+
async function requestOnce(pathname, init) {
|
|
17040
17055
|
const base = apiBase();
|
|
17041
17056
|
const key2 = apiKey();
|
|
17042
17057
|
try {
|
|
@@ -17159,7 +17174,7 @@ Usage
|
|
|
17159
17174
|
agental resize <sandbox-id> tiny|small|medium|large [--now] [--max-burst-fee <dollars>] [--json]
|
|
17160
17175
|
agental resize <sandbox-id> --cancel [--json] a size that waits for its next start, taken away
|
|
17161
17176
|
agental auto-stop <sandbox-id> [--in <time> | --at <date-time> | --never] [--json]
|
|
17162
|
-
agental network <sandbox-id> [--allow <address>[,<address>...] | --none] [--json]
|
|
17177
|
+
agental network <sandbox-id> [--allow <address-or-name>[,<address-or-name>...] | --none] [--json]
|
|
17163
17178
|
agental egress <sandbox-id> [box | residential <country> [sticky | rotating]] [--json]
|
|
17164
17179
|
agental spot <sandbox-id> [off] [--on-reclaim delete|stop] [--warn-at <chance>] [--json]
|
|
17165
17180
|
agental templates [--json]
|
|
@@ -17168,7 +17183,7 @@ Usage
|
|
|
17168
17183
|
agental template rename <template> <new-name>
|
|
17169
17184
|
agental template delete <template> [--pause-jobs]
|
|
17170
17185
|
agental template start <template> [--size tiny|small|medium|large] [--snapshot <snapshot-id> | --new-machine] [--ttl <time> | --ttl default]
|
|
17171
|
-
agental template network <template> [open | blocked | allowlist <address>...] [--json]
|
|
17186
|
+
agental template network <template> [open | blocked | allowlist <address-or-name>...] [--json]
|
|
17172
17187
|
agental template egress <template> [box | residential <country> [sticky | rotating]] [--json]
|
|
17173
17188
|
agental template ssh <template> [on | off] [--json]
|
|
17174
17189
|
agental template ssh-keys <template> [<public-key-or-file>... | --remove <key-id>] [--json]
|
|
@@ -17335,7 +17350,8 @@ hint and not a promise, and with --warn-at sets the chance at which sandbox.recl
|
|
|
17335
17350
|
(0.5 when left out); agental spot <sandbox-id> off turns off spot: a standard sandbox from then on.
|
|
17336
17351
|
${operator ? operator.OPERATOR_HELP : ""}template network says what a sandbox on a template may reach outside itself, and with open,
|
|
17337
17352
|
blocked or allowlist sets it: everything, nothing, or only the addresses that follow, which are
|
|
17338
|
-
IPv4 addresses and ranges such as 203.0.113.7 and 198.51.100.0/24
|
|
17353
|
+
IPv4 addresses and ranges such as 203.0.113.7 and 198.51.100.0/24, over any protocol and port,
|
|
17354
|
+
and names such as github.com and *.pythonhosted.org, over HTTPS on port 443 alone. The rule that is given takes
|
|
17339
17355
|
the place of the one it had, so an allowlist names every address each time. A sandbox on the
|
|
17340
17356
|
template takes it when it next starts, or now when template apply names it, and one made from
|
|
17341
17357
|
it is held to it from its first boot. network says what a sandbox is held to, its template's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agental",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "The agental command: Linux sandboxes for your agents, from the terminal. npx agental@latest signs you in and installs the agent skills.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VERTIXER LTD",
|