agental 0.51.0 → 0.53.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 +31 -5
- 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.53.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}`;
|
|
@@ -12642,7 +12642,8 @@ var HEADROOM_EVENTS = [
|
|
|
12642
12642
|
"limits.budget_reached"
|
|
12643
12643
|
];
|
|
12644
12644
|
var JOB_EVENTS = ["job.created", "job.updated", "job.deleted", "job.run_started", "job.run_finished", "job.run_failed", "job.recovered", "job.paused"];
|
|
12645
|
-
var
|
|
12645
|
+
var TAILSCALE_EVENTS = ["tailscale.node_down", "tailscale.disconnected"];
|
|
12646
|
+
var WEBHOOK_KINDS = [...WEBHOOK_EVENTS, ...EMAIL_EVENTS, ...MEMBER_EVENTS, ...TEMPLATE_EVENTS, ...HEADROOM_EVENTS, ...JOB_EVENTS, ...TAILSCALE_EVENTS];
|
|
12646
12647
|
var WEBHOOK_GROUPS = [...new Set(WEBHOOK_KINDS.map((kind) => kind.slice(0, kind.indexOf("."))))];
|
|
12647
12648
|
function closestEvent(asked2) {
|
|
12648
12649
|
if (asked2.length > 64) {
|
|
@@ -13274,9 +13275,17 @@ async function snapshot(client, positionals, options) {
|
|
|
13274
13275
|
}
|
|
13275
13276
|
}
|
|
13276
13277
|
|
|
13278
|
+
// ../sdk/typescript/src/errors.ts
|
|
13279
|
+
var AgentalError = class extends Error {
|
|
13280
|
+
constructor(message, options) {
|
|
13281
|
+
super(message, options);
|
|
13282
|
+
this.name = new.target.name;
|
|
13283
|
+
}
|
|
13284
|
+
};
|
|
13285
|
+
|
|
13277
13286
|
// ../sdk/typescript/src/sealed.ts
|
|
13278
13287
|
var SEALED_SUITE = "x25519-hkdf-sha256-aes256gcm";
|
|
13279
|
-
var ROOT_PUBLIC_KEYS = [];
|
|
13288
|
+
var ROOT_PUBLIC_KEYS = ["jNdFf3FKdbFQ5J-1e_NE7ZzuaNPRdci-mzlGj384Rmw"];
|
|
13280
13289
|
var SEALED_PURPOSES = ["variable", "tailscale-oauth"];
|
|
13281
13290
|
var KEM_ID = 32;
|
|
13282
13291
|
var KDF_ID = 1;
|
|
@@ -13284,8 +13293,7 @@ var AEAD_ID = 2;
|
|
|
13284
13293
|
var INFO = "agental sealed secret v1";
|
|
13285
13294
|
var AAD_LABEL = "agental sealed secret aad v1";
|
|
13286
13295
|
var KEY_MESSAGE_LABEL = "agental sealing key v1";
|
|
13287
|
-
var SealingError = class extends
|
|
13288
|
-
name = "SealingError";
|
|
13296
|
+
var SealingError = class extends AgentalError {
|
|
13289
13297
|
};
|
|
13290
13298
|
async function seal(key2, secret2, roots = ROOT_PUBLIC_KEYS) {
|
|
13291
13299
|
await verifySealingKey(key2, roots);
|
|
@@ -16996,6 +17004,15 @@ async function ci(positionals, options) {
|
|
|
16996
17004
|
process.stdout.write(` job ${job2.jobId} waiting since ${job2.since}: ${job2.message}
|
|
16997
17005
|
`);
|
|
16998
17006
|
}
|
|
17007
|
+
if (item.waits && item.waits.waited > 0) {
|
|
17008
|
+
const reasons = item.waits.byReason.map((each) => `${ciWaitWords(each.reason)} ${each.jobs} for ${ciHours(each.seconds)}`).join(", ");
|
|
17009
|
+
process.stdout.write(` since ${item.waits.since.slice(0, 10)} ${item.waits.waited} of ${item.waits.jobs} jobs waited over a minute, ${ciHours(item.waits.waitedSeconds)} in all: ${reasons}
|
|
17010
|
+
`);
|
|
17011
|
+
if (item.waits.byReason[0]?.reason === "pool_full") {
|
|
17012
|
+
process.stdout.write(` a bigger pool would have started most of them at once: agental ci set ${item.repository} --pool <n>
|
|
17013
|
+
`);
|
|
17014
|
+
}
|
|
17015
|
+
}
|
|
16999
17016
|
}
|
|
17000
17017
|
return;
|
|
17001
17018
|
}
|
|
@@ -17035,6 +17052,15 @@ async function ci(positionals, options) {
|
|
|
17035
17052
|
process.stdout.write(`${repo}: pool ${poolMax ?? "default"}, template ${templateId ?? "runs-on (empty)"}. Sandboxes made from now on take it; a fork's job always gets the empty template.
|
|
17036
17053
|
`);
|
|
17037
17054
|
}
|
|
17055
|
+
function ciWaitWords(reason2) {
|
|
17056
|
+
if (reason2 === null) return "starting its sandbox";
|
|
17057
|
+
if (reason2 === "pool_full") return "pool full";
|
|
17058
|
+
if (reason2 === "no_room") return "our servers full";
|
|
17059
|
+
return reason2.replaceAll("_", " ");
|
|
17060
|
+
}
|
|
17061
|
+
function ciHours(seconds2) {
|
|
17062
|
+
return seconds2 >= 3600 ? `${(seconds2 / 3600).toFixed(1)} h` : `${Math.round(seconds2 / 60)} min`;
|
|
17063
|
+
}
|
|
17038
17064
|
async function ciJobs(repo, limit, asJson) {
|
|
17039
17065
|
if (repo !== void 0 && !/^[^/\s]+\/[^/\s]+$/.test(repo)) {
|
|
17040
17066
|
throw new Error("ci jobs takes a repository as owner/name, as agental ci jobs acme/app");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agental",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.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",
|