agental 0.44.1 → 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 +16 -1
- 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}`;
|
|
@@ -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 {
|
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",
|