@agentgates/cli 0.85.0 → 0.87.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.mjs +100 -25
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3163,7 +3163,7 @@ var init_constants = __esm({
|
|
|
3163
3163
|
trim = (v) => v ? v.replace(/\/$/, "") : "";
|
|
3164
3164
|
CLI_API_ORIGIN = trim(process.env.BOUNTY_API_ORIGIN) || "https://cli.agentgates.ai";
|
|
3165
3165
|
CREATORS_ORIGIN = trim(process.env.BOUNTY_CREATORS_ORIGIN) || "https://agentgates.ai";
|
|
3166
|
-
CLI_VERSION = "0.
|
|
3166
|
+
CLI_VERSION = "0.87.0";
|
|
3167
3167
|
CLI_USER_AGENT = `agentgates-cli/${CLI_VERSION}`;
|
|
3168
3168
|
AI_DIRECTIVE = "\n[AI: present the above verbatim inside a markdown code block. Do not reformat, summarize, or omit rows.]";
|
|
3169
3169
|
}
|
|
@@ -65162,17 +65162,32 @@ function parseEnvPairs(pairs) {
|
|
|
65162
65162
|
}
|
|
65163
65163
|
return out;
|
|
65164
65164
|
}
|
|
65165
|
+
var QUARTER_HOUR_MINUTES = [15, 30, 45];
|
|
65166
|
+
function quarterMinutes(value) {
|
|
65167
|
+
const n2 = typeof value === "number" ? value : Number(String(value ?? "").trim());
|
|
65168
|
+
if (!QUARTER_HOUR_MINUTES.includes(n2)) {
|
|
65169
|
+
throw new Error("--minutes takes 15, 30 or 45; for an hour or more use --hours");
|
|
65170
|
+
}
|
|
65171
|
+
return n2;
|
|
65172
|
+
}
|
|
65173
|
+
function timeBody(input) {
|
|
65174
|
+
if (input.minutes !== void 0) {
|
|
65175
|
+
if (input.hours !== void 0) throw new Error("send --hours or --minutes, not both");
|
|
65176
|
+
return { minutes: quarterMinutes(input.minutes) };
|
|
65177
|
+
}
|
|
65178
|
+
return { hours: positiveInt(input.hours, "--hours") };
|
|
65179
|
+
}
|
|
65165
65180
|
function createBody(input) {
|
|
65166
65181
|
const plan = (input.plan ?? "").trim();
|
|
65167
65182
|
if (!plan) throw new Error("say which plan: --plan <id> (agentgates compute plans lists them)");
|
|
65168
|
-
const
|
|
65183
|
+
const time = timeBody(input);
|
|
65169
65184
|
const image = input.image?.trim();
|
|
65170
65185
|
const compose = input.compose;
|
|
65171
65186
|
if (image && compose !== void 0) throw new Error("send --image or --compose, not both");
|
|
65172
65187
|
if (!image && (compose === void 0 || !compose.trim())) {
|
|
65173
65188
|
throw new Error("say what runs: --image <image> (one container) or --compose <file> (a docker-compose.yml)");
|
|
65174
65189
|
}
|
|
65175
|
-
const body = { plan,
|
|
65190
|
+
const body = { plan, ...time };
|
|
65176
65191
|
if (image) {
|
|
65177
65192
|
body.image = image;
|
|
65178
65193
|
if (input.port !== void 0) {
|
|
@@ -65187,6 +65202,12 @@ function createBody(input) {
|
|
|
65187
65202
|
if (input.env && Object.keys(input.env).length > 0) body.env = input.env;
|
|
65188
65203
|
const name = input.name?.trim();
|
|
65189
65204
|
if (name) body.name = name;
|
|
65205
|
+
const region = input.region?.trim();
|
|
65206
|
+
if (region) {
|
|
65207
|
+
if (!/^[a-z0-9-]{1,32}$/.test(region)) throw new Error("--region takes a region id: agentgates compute plans lists a plan's regions");
|
|
65208
|
+
body.region = region;
|
|
65209
|
+
}
|
|
65210
|
+
if (input.aiUsd !== void 0) body.ai = { usd: positiveInt(input.aiUsd, "--ai-usd") };
|
|
65190
65211
|
return body;
|
|
65191
65212
|
}
|
|
65192
65213
|
function legsOn(body, network) {
|
|
@@ -65300,6 +65321,7 @@ async function waitUntilRunning(args) {
|
|
|
65300
65321
|
}
|
|
65301
65322
|
|
|
65302
65323
|
// src/commands/compute.ts
|
|
65324
|
+
var regionsOf = (p) => (p.regions ?? []).filter((r) => typeof r.id === "string" && r.id !== "");
|
|
65303
65325
|
var money = (v) => `$${String(v).replace(/(\.\d\d\d?)0+$/, "$1")}`;
|
|
65304
65326
|
var jsonMode = (opts) => Boolean(opts.json) || !process.stdout.isTTY;
|
|
65305
65327
|
var sink = null;
|
|
@@ -65364,27 +65386,70 @@ async function computePlans(opts) {
|
|
|
65364
65386
|
`);
|
|
65365
65387
|
return;
|
|
65366
65388
|
}
|
|
65367
|
-
|
|
65368
|
-
|
|
65389
|
+
const confidential = plans.filter((p) => p.proof !== "none");
|
|
65390
|
+
const plain = plans.filter((p) => p.proof === "none");
|
|
65391
|
+
const sections = [
|
|
65392
|
+
["CONFIDENTIAL VIRTUAL MACHINES", "memory encrypted in use", confidential],
|
|
65393
|
+
["PLAIN VIRTUAL MACHINES", "no proof: the host can read them", plain]
|
|
65394
|
+
];
|
|
65395
|
+
for (const [title, words7, list] of sections) {
|
|
65396
|
+
if (list.length === 0) continue;
|
|
65397
|
+
say(`
|
|
65398
|
+
${import_picocolors3.default.bold(title)} ${import_picocolors3.default.dim(words7)}
|
|
65369
65399
|
|
|
65370
65400
|
`);
|
|
65371
|
-
|
|
65372
|
-
|
|
65373
|
-
|
|
65401
|
+
for (const p of list) {
|
|
65402
|
+
const spec = `${p.vcpu} vCPU \xB7 ${Math.round(p.memoryMb / 1024)} GB \xB7 ${p.diskGb}GB disk`;
|
|
65403
|
+
say(` ${import_picocolors3.default.bold(p.name.padEnd(10))} ${import_picocolors3.default.cyan(money(p.priceUsdPerHour))}${import_picocolors3.default.dim("/hour")} ${import_picocolors3.default.dim(spec)}
|
|
65404
|
+
`);
|
|
65405
|
+
const data4 = typeof p.dataIncludedGbPerHour === "number" ? `${p.dataIncludedGbPerHour} GB data per hour bought` : `${p.egressQuotaGb} GB traffic`;
|
|
65406
|
+
say(` ${import_picocolors3.default.dim(p.id.padEnd(10))} ${import_picocolors3.default.dim(data4)}
|
|
65407
|
+
`);
|
|
65408
|
+
const ladder = p.pricing.map((r) => `${r.hoursPerPayment}h ${money(r.totalUsd)}`).join(" ");
|
|
65409
|
+
if (ladder) say(` ${import_picocolors3.default.dim(ladder)}
|
|
65374
65410
|
`);
|
|
65375
|
-
|
|
65411
|
+
const quarter = (p.minutesPricing ?? []).filter((r) => r.totalUsd).map((r) => `${r.minutesPerPayment}m ${money(String(r.totalUsd))}`).join(" ");
|
|
65412
|
+
if (quarter) say(` ${import_picocolors3.default.dim(quarter)}
|
|
65376
65413
|
`);
|
|
65377
|
-
|
|
65378
|
-
|
|
65414
|
+
const regions = regionsOf(p);
|
|
65415
|
+
if (regions.length > 0) {
|
|
65416
|
+
say(` ${import_picocolors3.default.dim(`regions: ${regions.map((r) => r.fromUsdPerHour ? `${r.id} ${money(r.fromUsdPerHour)}/hour` : String(r.id)).join(", ")}`)}
|
|
65379
65417
|
`);
|
|
65380
|
-
|
|
65418
|
+
const reach = [
|
|
65419
|
+
p.address === "own" ? "its own fixed address" : null,
|
|
65420
|
+
p.ports === "any" ? `any port${p.closedPorts?.length ? ` but ${p.closedPorts.join(" and ")}` : ""}` : null,
|
|
65421
|
+
p.protocols?.length ? p.protocols.map((x) => String(x).toUpperCase()).join(" or ") : null
|
|
65422
|
+
].filter((x) => x !== null);
|
|
65423
|
+
if (reach.length > 0) say(` ${import_picocolors3.default.dim(reach.join(", "))}
|
|
65424
|
+
`);
|
|
65425
|
+
}
|
|
65426
|
+
if (p.proof === "none") {
|
|
65427
|
+
const reach = [
|
|
65428
|
+
p.address === "own" ? "its own address" : null,
|
|
65429
|
+
p.ports === "any" ? "any port" : null,
|
|
65430
|
+
p.protocols?.length ? p.protocols.map((x) => String(x).toUpperCase()).join(" or ") : null,
|
|
65431
|
+
(p.runsIn ?? []).length > 0 ? `in ${(p.runsIn ?? []).map((r) => r.name ?? r.id).join(", ")}` : null
|
|
65432
|
+
].filter((x) => x !== null);
|
|
65433
|
+
if (reach.length > 0) say(` ${import_picocolors3.default.dim(reach.join(", "))}
|
|
65434
|
+
`);
|
|
65435
|
+
if (typeof p.usePolicyUrl === "string" && /^https:\/\/\S+$/.test(p.usePolicyUrl)) {
|
|
65436
|
+
say(` ${import_picocolors3.default.dim(`no mining, scanning, attacks or spam; its use policy: ${p.usePolicyUrl}`)}
|
|
65437
|
+
`);
|
|
65438
|
+
}
|
|
65439
|
+
}
|
|
65440
|
+
say("\n");
|
|
65441
|
+
}
|
|
65381
65442
|
}
|
|
65382
65443
|
const nets = body.payment?.networks ?? [];
|
|
65383
65444
|
if (nets.length) say(` ${import_picocolors3.default.dim(`USDC on ${nets.join(", ")}`)}
|
|
65384
65445
|
`);
|
|
65385
65446
|
say(` ${import_picocolors3.default.dim("rent one: agentgates compute buy --plan <id> --hours 1 --image <image> (--quote prices it, signs nothing)")}
|
|
65386
|
-
|
|
65387
65447
|
`);
|
|
65448
|
+
if (body.quarterHours) say(` ${import_picocolors3.default.dim("or by the quarter-hour: --minutes 15 (30, 45) in place of --hours")}
|
|
65449
|
+
`);
|
|
65450
|
+
if (plans.some((p) => regionsOf(p).length > 0)) say(` ${import_picocolors3.default.dim("a plan that lists regions runs in the one you name: --region <id>")}
|
|
65451
|
+
`);
|
|
65452
|
+
say("\n");
|
|
65388
65453
|
}
|
|
65389
65454
|
async function readCompose(file) {
|
|
65390
65455
|
if (file === "-") {
|
|
@@ -65426,30 +65491,36 @@ async function computeBuy(opts) {
|
|
|
65426
65491
|
body = createBody({
|
|
65427
65492
|
plan: opts.plan,
|
|
65428
65493
|
hours: opts.hours,
|
|
65494
|
+
minutes: opts.minutes,
|
|
65429
65495
|
image: opts.image,
|
|
65430
65496
|
port: opts.port,
|
|
65431
65497
|
compose,
|
|
65432
65498
|
env: parseEnvPairs(opts.env),
|
|
65433
|
-
name: opts.name
|
|
65499
|
+
name: opts.name,
|
|
65500
|
+
region: opts.region,
|
|
65501
|
+
aiUsd: opts.aiUsd
|
|
65434
65502
|
});
|
|
65435
65503
|
} catch (err) {
|
|
65436
65504
|
fail(opts, err.message, "bad_input");
|
|
65437
65505
|
return;
|
|
65438
65506
|
}
|
|
65439
|
-
const
|
|
65507
|
+
const time = body.minutes !== void 0 ? `${String(body.minutes)} min` : `${String(body.hours)} h`;
|
|
65508
|
+
const ai = body.ai;
|
|
65509
|
+
const what = `${String(body.plan)}${typeof body.region === "string" ? ` in ${body.region}` : ""}, ${time}, ${typeof body.image === "string" ? body.image : "your compose"}${ai ? `, plus $${ai.usd} of AI` : ""}`;
|
|
65440
65510
|
await payFor(opts, { url: `${computeOrigin()}${DEPLOYMENTS_PATH}`, body, what, action: "buy" });
|
|
65441
65511
|
}
|
|
65442
65512
|
async function computeRenew(id2, opts) {
|
|
65443
65513
|
let path8;
|
|
65444
|
-
let
|
|
65514
|
+
let time;
|
|
65445
65515
|
try {
|
|
65446
65516
|
path8 = deploymentPath(id2, "renew");
|
|
65447
|
-
|
|
65517
|
+
time = timeBody({ hours: opts.hours, minutes: opts.minutes });
|
|
65448
65518
|
} catch (err) {
|
|
65449
65519
|
fail(opts, err.message, "bad_input");
|
|
65450
65520
|
return;
|
|
65451
65521
|
}
|
|
65452
|
-
|
|
65522
|
+
const what = "minutes" in time ? `${time.minutes} more min on ${id2}` : `${time.hours} more h on ${id2}`;
|
|
65523
|
+
await payFor(opts, { url: `${computeOrigin()}${path8}`, body: time, what, action: "renew" });
|
|
65453
65524
|
}
|
|
65454
65525
|
async function payFor(opts, args) {
|
|
65455
65526
|
let quote;
|
|
@@ -65795,6 +65866,10 @@ function emitMachine(opts, machine, extra) {
|
|
|
65795
65866
|
`);
|
|
65796
65867
|
say(`${machineLines(machine)}
|
|
65797
65868
|
|
|
65869
|
+
`);
|
|
65870
|
+
const ai = machine.ai;
|
|
65871
|
+
if (ai && typeof ai.next === "string") say(` ${import_picocolors3.default.dim(ai.next)}
|
|
65872
|
+
|
|
65798
65873
|
`);
|
|
65799
65874
|
if (extra.next && machine.deploymentId && machine.status !== "running") {
|
|
65800
65875
|
say(` ${import_picocolors3.default.dim(`wait for it: agentgates compute wait ${machine.deploymentId}`)}
|
|
@@ -73580,7 +73655,7 @@ function printNext(put) {
|
|
|
73580
73655
|
`);
|
|
73581
73656
|
put(` ${import_picocolors12.default.dim("agentgates browser balance")} ${import_picocolors12.default.dim("\xB7 your balance and the address that tops it up")}
|
|
73582
73657
|
`);
|
|
73583
|
-
put(` ${import_picocolors12.default.dim("agentgates compute plans")} ${import_picocolors12.default.dim("\xB7
|
|
73658
|
+
put(` ${import_picocolors12.default.dim("agentgates compute plans")} ${import_picocolors12.default.dim("\xB7 confidential computers for AI swarms")}
|
|
73584
73659
|
`);
|
|
73585
73660
|
put(` ${import_picocolors12.default.dim("agentgates inference models")} ${import_picocolors12.default.dim("\xB7 models by the token")}
|
|
73586
73661
|
`);
|
|
@@ -83140,16 +83215,16 @@ desk.command("sell").description("Sell desk coin credit back to the curve (sessi
|
|
|
83140
83215
|
program2.command("onboard").description("Welcome screen: look at what is for sale, or pair your wallet. Run by the installer.").option("--profile <name>", "named profile (default: 'default')").option("--lane <lane>", "which lane leads the menu: compute | inference | phone | email | passwords").action(async (opts) => {
|
|
83141
83216
|
await onboard(opts);
|
|
83142
83217
|
});
|
|
83143
|
-
var compute = program2.command("compute").description("Confidential
|
|
83218
|
+
var compute = program2.command("compute").description("Confidential computers for AI swarms, by the hour, USDC per payment");
|
|
83144
83219
|
compute.command("plans").description("Live plans and the price ladder. Public read: no key, no account, no payment.").option("--json", "machine-readable output (the raw catalog)").action(async (opts) => {
|
|
83145
83220
|
await computePlans(opts);
|
|
83146
83221
|
});
|
|
83147
83222
|
compute.command("buy").description(
|
|
83148
83223
|
"Rent a machine: asks the price (free), signs the 402 with this machine's key (USDC on an EVM network, no gas), resends that same payment until the API answers, and prints the machine. The key that pays owns it."
|
|
83149
|
-
).option("--plan <id>", "a plan id (agentgates compute plans)").option("--hours <n>", "prepaid hours; the clock starts when the machine runs").option("--image <image>", "one container image, served on host port 8080").option("--port <n>", "with --image: the container port behind 8080 (default 80)").option("--compose <file>", "a docker-compose.yml that publishes a port (- reads stdin)").option("--env <KEY=VALUE>", "an env value, sealed to the machine and never stored; repeatable", (v, prev) => prev.concat(v), []).option("--name <name>", "a label for the machine").option("--network <name>", "pay on this network only; default: the cheapest one this key holds the USDC for").option("--max-usd <dollars>", "refuse to sign above this price").option("--quote", "print the price on every network and stop: nothing is signed").option("--yes", "pay without the prompt (needed when stdout is not a TTY)").option("--wait", "after paying, wait until the machine runs and print its endpoint").option("--timeout <minutes>", "with --wait: how long to wait (default 15)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
83224
|
+
).option("--plan <id>", "a plan id (agentgates compute plans)").option("--region <id>", "for a plan that lists regions: the region to run in (agentgates compute plans lists them)").option("--hours <n>", "prepaid hours; the clock starts when the machine runs").option("--minutes <n>", "a quarter-hour in place of --hours: 15, 30 or 45 (when the API sells them)").option("--image <image>", "one container image, served on host port 8080").option("--port <n>", "with --image: the container port behind 8080 (default 80)").option("--compose <file>", "a docker-compose.yml that publishes a port (- reads stdin)").option("--env <KEY=VALUE>", "an env value, sealed to the machine and never stored; repeatable", (v, prev) => prev.concat(v), []).option("--name <name>", "a label for the machine").option("--ai-usd <dollars>", "also buy an AI balance in the same payment (1, 5, 25 or 100); a key on it arrives in the machine's env as AGENTGATES_API_KEY").option("--network <name>", "pay on this network only; default: the cheapest one this key holds the USDC for").option("--max-usd <dollars>", "refuse to sign above this price").option("--quote", "print the price on every network and stop: nothing is signed").option("--yes", "pay without the prompt (needed when stdout is not a TTY)").option("--wait", "after paying, wait until the machine runs and print its endpoint").option("--timeout <minutes>", "with --wait: how long to wait (default 15)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
83150
83225
|
await computeBuy(opts);
|
|
83151
83226
|
});
|
|
83152
|
-
compute.command("renew <id>").description("Add paid hours to a machine: same price ask, same signature, same resend. Any wallet may pay; the owner stays the owner.").option("--hours <n>", "hours to add to the end of its clock").option("--network <name>", "pay on this network only").option("--max-usd <dollars>", "refuse to sign above this price").option("--quote", "print the price and stop: nothing is signed").option("--yes", "pay without the prompt (needed when stdout is not a TTY)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (id2, opts) => {
|
|
83227
|
+
compute.command("renew <id>").description("Add paid hours to a machine: same price ask, same signature, same resend. Any wallet may pay; the owner stays the owner.").option("--hours <n>", "hours to add to the end of its clock").option("--minutes <n>", "a quarter-hour in place of --hours: 15, 30 or 45 (when the API sells them)").option("--network <name>", "pay on this network only").option("--max-usd <dollars>", "refuse to sign above this price").option("--quote", "print the price and stop: nothing is signed").option("--yes", "pay without the prompt (needed when stdout is not a TTY)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (id2, opts) => {
|
|
83153
83228
|
await computeRenew(id2, opts);
|
|
83154
83229
|
});
|
|
83155
83230
|
compute.command("list").description("The machines this machine's key paid for (an owner read it signs).").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
@@ -83227,13 +83302,13 @@ passwords.command("init").description(
|
|
|
83227
83302
|
).option("--seed <twelve words>", "bring the phrase (quote it)").option("--reveal-seed", "print this key's words again").option("--import <hex>", "bring a bare 32-byte secp256k1 private key (64 hex chars) instead of words").option("--replace", "with --seed or --import: overwrite what is already here (the old key is the only thing that opens the rows it sealed)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
83228
83303
|
await passwordsInit(opts);
|
|
83229
83304
|
});
|
|
83230
|
-
passwords.command("add").alias("store").description("Store a login: sealed on this machine to this key's own signature and to the CVM's published key, then posted. The server holds ciphertext it cannot open. Free at every tier.").requiredOption("--label <name>", "what to call it (48 chars)").option("--host <hostname>", "a site it may be used on, repeatable (1 to 8; app.example.com, no wildcards)", (v, prev) => [...prev, v], []).option("--hosts <a,b>", "the same, comma separated").option("--username <u>", "login rows: the username; mailbox rows: the address the codes arrive at").option("--password <p>", "the password (visible to ps for the length of the call; --password-stdin avoids that)").option("--password-stdin", "read the password from stdin instead").option("--kind <kind>", "login | api_key | totp | raw | mailbox (default login); mailbox = your own mailbox, read by the box for the codes sites email (--username the address, --password the app password, --host the mail server; Gmail's is known). An address leased here (agentgates passwords inbox lease) needs no app password: --password -").option("--totp-seed <base32>", "the authenticator seed (login rows may carry one beside the password; totp rows need it)").option("--api-key <value>", "api_key rows").option("--raw <value>", "raw rows").option("--notes <text>", "owner-only, sealed").option("--backup-codes <codes|@file>", "login rows: the account's own backup codes, comma separated or one per line in a file; the CVM spends one when the site asks for a code and a permit lists codes").option("--device-json <json|@file>", "login rows: a device credential your own browser holds for the account (rpId, credentialId, privateKey, userHandle, signCount); agentgates passwords device provisions one through the CVM instead").option("--through <row>", "a site that signs in through another site's account (
|
|
83305
|
+
passwords.command("add").alias("store").description("Store a login: sealed on this machine to this key's own signature and to the CVM's published key, then posted. The server holds ciphertext it cannot open. Free at every tier.").requiredOption("--label <name>", "what to call it (48 chars)").option("--host <hostname>", "a site it may be used on, repeatable (1 to 8; app.example.com, no wildcards)", (v, prev) => [...prev, v], []).option("--hosts <a,b>", "the same, comma separated").option("--username <u>", "login rows: the username; mailbox rows: the address the codes arrive at").option("--password <p>", "the password (visible to ps for the length of the call; --password-stdin avoids that)").option("--password-stdin", "read the password from stdin instead").option("--kind <kind>", "login | api_key | totp | raw | mailbox (default login); mailbox = your own mailbox, read by the box for the codes sites email (--username the address, --password the app password, --host the mail server; Gmail's is known). An address leased here (agentgates passwords inbox lease) needs no app password: --password -").option("--totp-seed <base32>", "the authenticator seed (login rows may carry one beside the password; totp rows need it)").option("--api-key <value>", "api_key rows").option("--raw <value>", "raw rows").option("--notes <text>", "owner-only, sealed").option("--backup-codes <codes|@file>", "login rows: the account's own backup codes, comma separated or one per line in a file; the CVM spends one when the site asks for a code and a permit lists codes").option("--device-json <json|@file>", "login rows: a device credential your own browser holds for the account (rpId, credentialId, privateKey, userHandle, signCount); agentgates passwords device provisions one through the CVM instead").option("--through <row>", "a site that signs in through another site's account (a site's Continue with GitHub): the new login holds no password of its own; its uses name that login row (passwords use --as-row) and the CVM types it on that row's own sites").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
83231
83306
|
await passwordsAdd(opts);
|
|
83232
83307
|
});
|
|
83233
83308
|
passwords.command("allow").description("Sign a permit: which agent may use which rows on which sites, how many times a day, until when. Default: yourself, every row, every use, 30 days.").option("--agent <address>", "the key that will sign uses (default: this key)").option("--rows <id,id|*>", "row ids, or * for every row this key holds (default *)").option("--hosts <a,b>", "narrow to these hostnames (default: the rows' own)").option("--uses <login,totp,header>", "which uses (default all three)").option("--gets <session|password>", "what the agent gets: session = the site's cookies after the CVM logs in (default); password = the secret itself; cvm = the acting uses alone, for an agent that works inside the CVM over the API").option("--per-day <n>", "hard daily cap; 0 = the plan allowance (default 0)").option("--days <n>", "how long, 1 to 366 (default 30)").option("--ask-me", "every use waits for the owner's signature on their board (the brake)").option("--factors <device,codes,mail,sms>", "the account's sign-in verification step the agent may complete: device = the stored device credential answers the site's device step; codes = one of the stored backup codes is spent; mail = a code the site emails is read from your mailbox row or an inbox this key holds (allow the mailbox row too); sms = a code the site texts is read from a number this key holds").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
83234
83309
|
await passwordsAllow(opts);
|
|
83235
83310
|
});
|
|
83236
|
-
passwords.command("use").description("Log in through the CVM with a stored login and get the page's digest back, never the password. Pass --row, or just --url and the matching row is picked, or --workflow to run a task the owner taught the CVM. A parked use (the owner has to approve, or type a code) is waited on until it answers.").option("--row <id>", "the row to use (default: the one whose hosts cover --url)").option("--url <https://site/login>", "the page the use targets").option("--use <login|header|totp|session|reveal>", "which use (default login); session hands this key the site's cookies, reveal the secret, when the permit says so").option("--cookies-out <file>", "session only: write the cookies to this file (Playwright addCookies / Puppeteer setCookie shape)").option("--steps-json <json>", "login only: steps the CVM runs inside the session after the login lands (goto, fill, click, wait, read, press; a click may name the control's text instead of a selector; key reads the key a site shows once, {kind: key, label|selector, prefix?}, and keeps it in the row for {apiKey})").option("--workflow <name>", "login only: run a workflow the owner taught the CVM on the row, by its name (passwords list shows them); --url may be left out").option("--input <name=value>", "a value the workflow takes, by its name; repeat for each (a value you leave out types what the owner typed)", (v, prev = []) => [...prev, v]).option("--code-steps-json <json>", "login only: the clicks that reach a code field the site keeps behind a 'try another way' menu (at most 4, click and wait), run before the code is typed").option("--enroll-device", "login only, your own key: provision a device credential for the account on this sign-in (the steps reach the page where the account adds a device); agentgates passwords device does this and seals it into the row").option("--attend", "login only, your own key: the CVM fills the password and holds the page for you at the controls (finish it on your board's live view); prints the use id and the view token").option("--use-id <id>", "continue a parked use by its id (Done on an attended sign-in, or a use the owner answered)").option("--mailbox <row>", "login and session: the mailbox row the box reads an emailed sign-in code from (default: your one mailbox row, when the permit covers it and lists mail)").option("--as-row <row>", "login only: sign in through another site's account (
|
|
83311
|
+
passwords.command("use").description("Log in through the CVM with a stored login and get the page's digest back, never the password. Pass --row, or just --url and the matching row is picked, or --workflow to run a task the owner taught the CVM. A parked use (the owner has to approve, or type a code) is waited on until it answers.").option("--row <id>", "the row to use (default: the one whose hosts cover --url)").option("--url <https://site/login>", "the page the use targets").option("--use <login|header|totp|session|reveal>", "which use (default login); session hands this key the site's cookies, reveal the secret, when the permit says so").option("--cookies-out <file>", "session only: write the cookies to this file (Playwright addCookies / Puppeteer setCookie shape)").option("--steps-json <json>", "login only: steps the CVM runs inside the session after the login lands (goto, fill, click, wait, read, press; a click may name the control's text instead of a selector; key reads the key a site shows once, {kind: key, label|selector, prefix?}, and keeps it in the row for {apiKey})").option("--workflow <name>", "login only: run a workflow the owner taught the CVM on the row, by its name (passwords list shows them); --url may be left out").option("--input <name=value>", "a value the workflow takes, by its name; repeat for each (a value you leave out types what the owner typed)", (v, prev = []) => [...prev, v]).option("--code-steps-json <json>", "login only: the clicks that reach a code field the site keeps behind a 'try another way' menu (at most 4, click and wait), run before the code is typed").option("--enroll-device", "login only, your own key: provision a device credential for the account on this sign-in (the steps reach the page where the account adds a device); agentgates passwords device does this and seals it into the row").option("--attend", "login only, your own key: the CVM fills the password and holds the page for you at the controls (finish it on your board's live view); prints the use id and the view token").option("--use-id <id>", "continue a parked use by its id (Done on an attended sign-in, or a use the owner answered)").option("--mailbox <row>", "login and session: the mailbox row the box reads an emailed sign-in code from (default: your one mailbox row, when the permit covers it and lists mail)").option("--as-row <row>", "login only: sign in through another site's account (a site's Continue with GitHub): the login row whose username and password the CVM types, on that row's own sites only; the password never leaves the CVM").option("--solve", "login and session, your own key: the CVM passes a bot check it meets (Cloudflare, Turnstile, reCAPTCHA, hCaptcha) by ticking it, then through its solver service").option("--request-json <json>", "the whole request object for header and totp uses (spec \xA75.1); a header request's seal {json: <field>} seals that field of the JSON answer to the owner (a webhook's signing secret)").option("--wait <seconds>", "cap on how long to wait for the owner's answer (default: the owner's window)").option("--no-wait", "answer the parked use's id and return at once").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts, command) => {
|
|
83237
83312
|
const waitSource = command.getOptionValueSource("wait");
|
|
83238
83313
|
await passwordsUse({ ...opts, noWait: waitSource === "cli" && opts.wait === false, wait: typeof opts.wait === "string" ? opts.wait : void 0 });
|
|
83239
83314
|
});
|
|
@@ -83246,7 +83321,7 @@ passwords.command("open-sealed").description("Open a field the CVM sealed to you
|
|
|
83246
83321
|
passwords.command("code").description("Fetch a verification code one of the account's own contacts received, for an account the owner is registering or signing into elsewhere: the newest message from a site in your mailbox row (an app password, or a Gmail login you connected on your board; the permit lists mail), or the newest code that reached an inbox or a number this key holds, read through its own door (a sealed inbox is opened with your own key). One source: --mailbox, --inbox or --phone.").option("--from <domain>", "the site the code comes from, e.g. etsy.com (a mailbox row reads that sender)").option("--mailbox <row>", "the mailbox row (default: your one mailbox row, or your one Gmail login)").option("--inbox <id>", "an inbox this key holds (agentgates passwords inbox list): the newest code that reached it").option("--phone <id>", "a number this key holds (agentgates phone list): the newest code texted to it").option("--timeout <seconds>", "--inbox and --phone: how long the door waits for a code (default 60)").option("--since <minutes>", "how far back to look (default 10)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
83247
83322
|
await passwordsCode(opts);
|
|
83248
83323
|
});
|
|
83249
|
-
passwords.command("signup").description("Register the account owner on a site through the CVM, under a permit the owner signed: the CVM completes the site's own sign-up form with the owner's chosen identity and a password generated here, the site's verification code is read from a contact the account already holds, and the new login is saved as a row under this key. The source is one of your mailbox row (the CVM reads it), an inbox this key holds (--inbox: the code is read through the inbox's own door; a sealed inbox is opened with your own key) or a number this key holds (--phone: the code is read through the number's own door). The permit lists signup, and mail or sms for the source. Priced as a login; the code read is the wait-code door's own draw, reported in the answer.").requiredOption("--url <url>", "the https address of the site's sign-up page (or its sign-in page with a Sign up link)").option("--email <address>", "the address to sign up with: the source's own by default, or a plus alias of it (you+shop@gmail.com); none with --phone").option("--name <name>", "the name the form asks for").option("--username <name>", "the username when the form asks for one (the CVM derives one otherwise)").option("--password <password>", "the password to use (generated here when absent)").option("--mailbox <row>", "the mailbox row (default: your one mailbox row, or your one Gmail login)").option("--inbox <id>", "an inbox this key holds (agentgates passwords inbox list): the account is made with its address").option("--phone <id>", "a number this key holds (agentgates phone list): the account is made on the number, the code comes by text").option("--label <label>", "the stored row's label (default: the site)").option("--no-store", "do not store the new login as a row; the password prints once instead").option("--steps-json <json>", "steps to run at the site once the account exists (the login use's steps shape)").option("--drive", "let the CVM's own model update a step of the site book's recipe that no longer matches the form; a step only you can complete in person stops the run and names it").option("--birthday <yyyy-mm-dd>", "the date of birth a sign-up form asks for; typed, never kept").option("--attend", "the default: a step only a person completes (a puzzle, a verification the site shows) holds the page for the account owner at the controls of their board's live view. Your own key: finish it there, or continue here with --use-id. An agent's key: this run waits for the owner's Done, then goes on").option("--no-attend", "a step only a person completes ends the run with the step named, and nothing is held").option("--use-id <id>", "continue a sign-up the CVM is holding for you (Done): the steps after the one you completed run on").option("--as-row <row>", "sign up THROUGH another site's account (
|
|
83324
|
+
passwords.command("signup").description("Register the account owner on a site through the CVM, under a permit the owner signed: the CVM completes the site's own sign-up form with the owner's chosen identity and a password generated here, the site's verification code is read from a contact the account already holds, and the new login is saved as a row under this key. The source is one of your mailbox row (the CVM reads it), an inbox this key holds (--inbox: the code is read through the inbox's own door; a sealed inbox is opened with your own key) or a number this key holds (--phone: the code is read through the number's own door). The permit lists signup, and mail or sms for the source. Priced as a login; the code read is the wait-code door's own draw, reported in the answer.").requiredOption("--url <url>", "the https address of the site's sign-up page (or its sign-in page with a Sign up link)").option("--email <address>", "the address to sign up with: the source's own by default, or a plus alias of it (you+shop@gmail.com); none with --phone").option("--name <name>", "the name the form asks for").option("--username <name>", "the username when the form asks for one (the CVM derives one otherwise)").option("--password <password>", "the password to use (generated here when absent)").option("--mailbox <row>", "the mailbox row (default: your one mailbox row, or your one Gmail login)").option("--inbox <id>", "an inbox this key holds (agentgates passwords inbox list): the account is made with its address").option("--phone <id>", "a number this key holds (agentgates phone list): the account is made on the number, the code comes by text").option("--label <label>", "the stored row's label (default: the site)").option("--no-store", "do not store the new login as a row; the password prints once instead").option("--steps-json <json>", "steps to run at the site once the account exists (the login use's steps shape)").option("--drive", "let the CVM's own model update a step of the site book's recipe that no longer matches the form; a step only you can complete in person stops the run and names it").option("--birthday <yyyy-mm-dd>", "the date of birth a sign-up form asks for; typed, never kept").option("--attend", "the default: a step only a person completes (a puzzle, a verification the site shows) holds the page for the account owner at the controls of their board's live view. Your own key: finish it there, or continue here with --use-id. An agent's key: this run waits for the owner's Done, then goes on").option("--no-attend", "a step only a person completes ends the run with the step named, and nothing is held").option("--use-id <id>", "continue a sign-up the CVM is holding for you (Done): the steps after the one you completed run on").option("--as-row <row>", "sign up THROUGH another site's account (a site's Continue with GitHub): the login row whose account the run signs in as; its username and password are opened here under your key, sent with the request, never printed and never stored again").option("--auto-owner", "your own key plays the owner at the walls it can answer and continues the run: a page that has not drawn gets a moment, and a phone check is answered with --sms-id and --sms-number; any other wall stays held for you").option("--sms-id <phoneId>", "with --auto-owner: the number this key may read a text from (the house's pool number is listed in poolSmsReaders); the phone check's code is read there").option("--sms-number <+15551234567>", "with --auto-owner: the phone number typed into the phone check (the number behind --sms-id)").option("--wait <seconds>", "how long to wait on a parked use or a starting CVM (default: the use's own window)").option("--no-wait", "print the first answer and leave").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
83250
83325
|
await passwordsSignup(opts);
|
|
83251
83326
|
});
|
|
83252
83327
|
passwords.command("device").description("Provision a device credential for an account through the CVM: the CVM logs in with your stored login, the steps reach the page where the account adds a device, the site's own ceremony creates the credential inside the CVM, and it is sealed into the row (both copies). From then on a permit that lists device lets the CVM complete the account's device step with it. Your own key only.").requiredOption("--row <id>", "the login to provision it on (agentgates passwords list)").requiredOption("--url <https://site/login>", "the account's sign-in page").option("--page <https://site/security>", "the page where the account adds a device (a passkey)").option("--click <text>", "the text on that page's add-a-device button").option("--steps-json <json>", "instead of --page and --click: the steps that reach and press it").option("--wait <seconds>", "cap on how long to wait for a parked sign-in (a code the site sent you)").option("--no-wait", "answer the parked use's id and return at once").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts, command) => {
|