agental 0.51.0 → 0.52.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.
Files changed (2) hide show
  1. package/dist/cli.js +29 -4
  2. 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.51.0" : "dev";
7414
+ var CLI_VERSION = true ? "0.52.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}`;
@@ -13274,9 +13274,17 @@ async function snapshot(client, positionals, options) {
13274
13274
  }
13275
13275
  }
13276
13276
 
13277
+ // ../sdk/typescript/src/errors.ts
13278
+ var AgentalError = class extends Error {
13279
+ constructor(message, options) {
13280
+ super(message, options);
13281
+ this.name = new.target.name;
13282
+ }
13283
+ };
13284
+
13277
13285
  // ../sdk/typescript/src/sealed.ts
13278
13286
  var SEALED_SUITE = "x25519-hkdf-sha256-aes256gcm";
13279
- var ROOT_PUBLIC_KEYS = [];
13287
+ var ROOT_PUBLIC_KEYS = ["jNdFf3FKdbFQ5J-1e_NE7ZzuaNPRdci-mzlGj384Rmw"];
13280
13288
  var SEALED_PURPOSES = ["variable", "tailscale-oauth"];
13281
13289
  var KEM_ID = 32;
13282
13290
  var KDF_ID = 1;
@@ -13284,8 +13292,7 @@ var AEAD_ID = 2;
13284
13292
  var INFO = "agental sealed secret v1";
13285
13293
  var AAD_LABEL = "agental sealed secret aad v1";
13286
13294
  var KEY_MESSAGE_LABEL = "agental sealing key v1";
13287
- var SealingError = class extends Error {
13288
- name = "SealingError";
13295
+ var SealingError = class extends AgentalError {
13289
13296
  };
13290
13297
  async function seal(key2, secret2, roots = ROOT_PUBLIC_KEYS) {
13291
13298
  await verifySealingKey(key2, roots);
@@ -16996,6 +17003,15 @@ async function ci(positionals, options) {
16996
17003
  process.stdout.write(` job ${job2.jobId} waiting since ${job2.since}: ${job2.message}
16997
17004
  `);
16998
17005
  }
17006
+ if (item.waits && item.waits.waited > 0) {
17007
+ const reasons = item.waits.byReason.map((each) => `${ciWaitWords(each.reason)} ${each.jobs} for ${ciHours(each.seconds)}`).join(", ");
17008
+ 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}
17009
+ `);
17010
+ if (item.waits.byReason[0]?.reason === "pool_full") {
17011
+ process.stdout.write(` a bigger pool would have started most of them at once: agental ci set ${item.repository} --pool <n>
17012
+ `);
17013
+ }
17014
+ }
16999
17015
  }
17000
17016
  return;
17001
17017
  }
@@ -17035,6 +17051,15 @@ async function ci(positionals, options) {
17035
17051
  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
17052
  `);
17037
17053
  }
17054
+ function ciWaitWords(reason2) {
17055
+ if (reason2 === null) return "starting its sandbox";
17056
+ if (reason2 === "pool_full") return "pool full";
17057
+ if (reason2 === "no_room") return "our servers full";
17058
+ return reason2.replaceAll("_", " ");
17059
+ }
17060
+ function ciHours(seconds2) {
17061
+ return seconds2 >= 3600 ? `${(seconds2 / 3600).toFixed(1)} h` : `${Math.round(seconds2 / 60)} min`;
17062
+ }
17038
17063
  async function ciJobs(repo, limit, asJson) {
17039
17064
  if (repo !== void 0 && !/^[^/\s]+\/[^/\s]+$/.test(repo)) {
17040
17065
  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.51.0",
3
+ "version": "0.52.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",