agental 0.50.0 → 0.51.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 -3
- 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.51.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}`;
|
|
@@ -7905,6 +7905,8 @@ var KEY_ACTIONS = [
|
|
|
7905
7905
|
"network.write",
|
|
7906
7906
|
"secret.read",
|
|
7907
7907
|
"secret.write",
|
|
7908
|
+
"tailscale.read",
|
|
7909
|
+
"tailscale.write",
|
|
7908
7910
|
"email.read",
|
|
7909
7911
|
"email.send",
|
|
7910
7912
|
"email.manage",
|
|
@@ -13275,6 +13277,7 @@ async function snapshot(client, positionals, options) {
|
|
|
13275
13277
|
// ../sdk/typescript/src/sealed.ts
|
|
13276
13278
|
var SEALED_SUITE = "x25519-hkdf-sha256-aes256gcm";
|
|
13277
13279
|
var ROOT_PUBLIC_KEYS = [];
|
|
13280
|
+
var SEALED_PURPOSES = ["variable", "tailscale-oauth"];
|
|
13278
13281
|
var KEM_ID = 32;
|
|
13279
13282
|
var KDF_ID = 1;
|
|
13280
13283
|
var AEAD_ID = 2;
|
|
@@ -13329,7 +13332,14 @@ async function sealWith(key2, secret2, ephemeral) {
|
|
|
13329
13332
|
const sharedSecret = await kemSharedSecret(dh, enc, fromBase64url(key2.publicKey));
|
|
13330
13333
|
const { aeadKey, baseNonce } = await keySchedule(sharedSecret, utf8(INFO));
|
|
13331
13334
|
const plaintext = utf8(
|
|
13332
|
-
JSON.stringify({
|
|
13335
|
+
JSON.stringify({
|
|
13336
|
+
value: secret2.value,
|
|
13337
|
+
hosts: secret2.hosts,
|
|
13338
|
+
org: secret2.org,
|
|
13339
|
+
name: secret2.name,
|
|
13340
|
+
purpose: secret2.purpose ?? "variable",
|
|
13341
|
+
sealedAt: secret2.sealedAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
13342
|
+
})
|
|
13333
13343
|
);
|
|
13334
13344
|
const aes = await subtle().importKey("raw", aeadKey, { name: "AES-GCM" }, false, ["encrypt"]);
|
|
13335
13345
|
const ct = new Uint8Array(
|
|
@@ -13342,6 +13352,9 @@ function checkSecret(key2, secret2) {
|
|
|
13342
13352
|
throw new SealingError(`sealing key ${key2.kid} holds ${key2.owner}'s secrets, not ${secret2.org}'s`);
|
|
13343
13353
|
}
|
|
13344
13354
|
if (!secret2.org || !secret2.name) throw new SealingError("a secret needs its organization and its name");
|
|
13355
|
+
if (secret2.purpose !== void 0 && !SEALED_PURPOSES.includes(secret2.purpose)) {
|
|
13356
|
+
throw new SealingError(`a secret is sealed for one of ${SEALED_PURPOSES.join(", ")}, not ${String(secret2.purpose)}`);
|
|
13357
|
+
}
|
|
13345
13358
|
if (secret2.org.includes("\0") || secret2.name.includes("\0")) throw new SealingError("an organization or a name cannot hold a NUL");
|
|
13346
13359
|
if (!Array.isArray(secret2.hosts) || secret2.hosts.length === 0) throw new SealingError("a secret needs at least one host it may be sent to");
|
|
13347
13360
|
if (secret2.hosts.some((host) => typeof host !== "string" || host === "")) throw new SealingError("a host cannot be empty");
|
|
@@ -13575,7 +13588,7 @@ async function sealFor(client, name, value, hosts) {
|
|
|
13575
13588
|
for (const key2 of mine) {
|
|
13576
13589
|
await verifySealingKey(key2, client.roots ?? ROOT_KEYS);
|
|
13577
13590
|
}
|
|
13578
|
-
const sealed = await Promise.all(mine.map((key2) => seal(key2, { value, hosts, org: org2, name }, client.roots ?? ROOT_KEYS)));
|
|
13591
|
+
const sealed = await Promise.all(mine.map((key2) => seal(key2, { value, hosts, org: org2, name, purpose: "variable" }, client.roots ?? ROOT_KEYS)));
|
|
13579
13592
|
return { sealed, org: org2 };
|
|
13580
13593
|
}
|
|
13581
13594
|
function nameOf2(given, verb) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agental",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.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",
|