@agentgates/cli 0.22.0 → 0.25.2
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 +86 -39
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -6875,7 +6875,7 @@ var require_package = __commonJS({
|
|
|
6875
6875
|
"package.json"(exports, module) {
|
|
6876
6876
|
module.exports = {
|
|
6877
6877
|
name: "@agentgates/cli",
|
|
6878
|
-
version: "0.
|
|
6878
|
+
version: "0.25.2",
|
|
6879
6879
|
description: "Wallet operations for AI agents and humans",
|
|
6880
6880
|
keywords: [
|
|
6881
6881
|
"crypto",
|
|
@@ -62652,7 +62652,17 @@ function identityOrigin() {
|
|
|
62652
62652
|
function siteOrigin() {
|
|
62653
62653
|
return trim2(process.env.AGENTGATES_ORIGIN) || "https://agentgates.ai";
|
|
62654
62654
|
}
|
|
62655
|
-
var
|
|
62655
|
+
var ACCOUNT_HEADS = { credits: "account/balance", deposit: "account/deposit", plans: "account/plans", keys: "account/keys", docs: "account/docs", catalog: "account/catalog", notify: "account/notify", founder: "account/founder", renew: "account/renew" };
|
|
62656
|
+
var SERVICE_HEADS = /* @__PURE__ */ new Set(["booth", "booths", "browser", "passwords", "phones", "inboxes", "calls", "personas", "playbooks"]);
|
|
62657
|
+
var PASSWORDS_USE_PINNED_BY_BOX = false;
|
|
62658
|
+
function lanePath(relative) {
|
|
62659
|
+
const trimmed = relative.replace(/^\/api\/identity/, "").replace(/^\/+/, "");
|
|
62660
|
+
const [head, ...rest] = trimmed.split("/");
|
|
62661
|
+
if (PASSWORDS_USE_PINNED_BY_BOX && head === "passwords" && rest.length === 2 && rest[1] === "use") return `/api/identity/${trimmed}`;
|
|
62662
|
+
const mapped = ACCOUNT_HEADS[head] ?? (SERVICE_HEADS.has(head) ? head : null);
|
|
62663
|
+
if (!mapped) throw new Error(`no public path for ${relative}`);
|
|
62664
|
+
return `/api/${[mapped, ...rest].join("/")}`;
|
|
62665
|
+
}
|
|
62656
62666
|
var WireError = class extends Error {
|
|
62657
62667
|
constructor(status4, code, message, body) {
|
|
62658
62668
|
super(message);
|
|
@@ -62735,15 +62745,15 @@ async function signedFetch(wallet, method, path7, body, timeoutMs = 13e4) {
|
|
|
62735
62745
|
return answer;
|
|
62736
62746
|
}
|
|
62737
62747
|
async function listLoginKeys(wallet) {
|
|
62738
|
-
const answer = await signedFetch(wallet, "GET",
|
|
62748
|
+
const answer = await signedFetch(wallet, "GET", lanePath(`/keys`));
|
|
62739
62749
|
return expectOk(answer, "login keys").keys ?? [];
|
|
62740
62750
|
}
|
|
62741
62751
|
async function createLoginKey(wallet, name) {
|
|
62742
|
-
const answer = await signedFetch(wallet, "POST",
|
|
62752
|
+
const answer = await signedFetch(wallet, "POST", lanePath(`/keys`), { name });
|
|
62743
62753
|
return expectOk(answer, "login key mint");
|
|
62744
62754
|
}
|
|
62745
62755
|
async function revokeLoginKey(wallet, id2) {
|
|
62746
|
-
const answer = await signedFetch(wallet, "POST",
|
|
62756
|
+
const answer = await signedFetch(wallet, "POST", lanePath(`/keys`), { revoke: id2 });
|
|
62747
62757
|
return expectOk(answer, "login key revoke");
|
|
62748
62758
|
}
|
|
62749
62759
|
function expectOk(answer, what) {
|
|
@@ -62756,7 +62766,7 @@ function expectOk(answer, what) {
|
|
|
62756
62766
|
async function readAttestation() {
|
|
62757
62767
|
let res;
|
|
62758
62768
|
try {
|
|
62759
|
-
res = await fetch(`${identityOrigin()}${
|
|
62769
|
+
res = await fetch(`${identityOrigin()}${lanePath("/passwords/attestation")}`, {
|
|
62760
62770
|
headers: { accept: "application/json", "user-agent": CLI_USER_AGENT },
|
|
62761
62771
|
signal: AbortSignal.timeout(6e4)
|
|
62762
62772
|
});
|
|
@@ -62771,30 +62781,30 @@ async function readAttestation() {
|
|
|
62771
62781
|
return body;
|
|
62772
62782
|
}
|
|
62773
62783
|
async function listRows(wallet) {
|
|
62774
|
-
const out = expectOk(await signedFetch(wallet, "GET",
|
|
62784
|
+
const out = expectOk(await signedFetch(wallet, "GET", lanePath(`/passwords`)), "list");
|
|
62775
62785
|
return { passwords: out.passwords ?? [], permitted: out.permitted ?? [] };
|
|
62776
62786
|
}
|
|
62777
62787
|
async function storeRow(wallet, body) {
|
|
62778
|
-
const out = expectOk(await signedFetch(wallet, "POST",
|
|
62788
|
+
const out = expectOk(await signedFetch(wallet, "POST", lanePath(`/passwords`), body), "store");
|
|
62779
62789
|
return out.password;
|
|
62780
62790
|
}
|
|
62781
62791
|
async function revealRow(wallet, id2) {
|
|
62782
|
-
const out = expectOk(await signedFetch(wallet, "POST",
|
|
62792
|
+
const out = expectOk(await signedFetch(wallet, "POST", lanePath(`/passwords/${encodeURIComponent(id2)}/reveal`)), "reveal");
|
|
62783
62793
|
return out.passkeyBlob;
|
|
62784
62794
|
}
|
|
62785
62795
|
async function postPermit(wallet, signed2) {
|
|
62786
62796
|
const out = expectOk(
|
|
62787
|
-
await signedFetch(wallet, "POST",
|
|
62797
|
+
await signedFetch(wallet, "POST", lanePath(`/passwords/permits`), { typedData: signed2.typedData, signature: signed2.signature }),
|
|
62788
62798
|
"permit"
|
|
62789
62799
|
);
|
|
62790
62800
|
return out.permit;
|
|
62791
62801
|
}
|
|
62792
62802
|
async function postUse(wallet, id2, body, timeoutMs = 2e5) {
|
|
62793
|
-
return signedFetch(wallet, "POST",
|
|
62803
|
+
return signedFetch(wallet, "POST", lanePath(`/passwords/${encodeURIComponent(id2)}/use`), body, timeoutMs);
|
|
62794
62804
|
}
|
|
62795
62805
|
async function withdrawInvite(wallet, envelope, signature) {
|
|
62796
62806
|
return expectOk(
|
|
62797
|
-
await signedFetch(wallet, "POST",
|
|
62807
|
+
await signedFetch(wallet, "POST", lanePath(`/passwords/invites/withdraw`), { invite: { envelope, signature } }),
|
|
62798
62808
|
"withdraw"
|
|
62799
62809
|
);
|
|
62800
62810
|
}
|
|
@@ -62940,7 +62950,7 @@ var TERMINAL = /* @__PURE__ */ new Set(["done", "failed", "no_answer"]);
|
|
|
62940
62950
|
async function readOperator() {
|
|
62941
62951
|
let res;
|
|
62942
62952
|
try {
|
|
62943
|
-
res = await fetch(`${siteOrigin()}/api/
|
|
62953
|
+
res = await fetch(`${siteOrigin()}/api/account/catalog`, { headers: { accept: "application/json", "user-agent": CLI_USER_AGENT } });
|
|
62944
62954
|
} catch (err) {
|
|
62945
62955
|
throw new WireError(0, "network_error", `could not reach ${siteOrigin()}: ${err.message}`, null);
|
|
62946
62956
|
}
|
|
@@ -62956,22 +62966,22 @@ function expect(answer, what) {
|
|
|
62956
62966
|
throw new WireError(answer.status, code, sentence, answer.body);
|
|
62957
62967
|
}
|
|
62958
62968
|
async function listNumbers(wallet) {
|
|
62959
|
-
const answer = await signedFetch(wallet, "GET",
|
|
62969
|
+
const answer = await signedFetch(wallet, "GET", lanePath(`/booths`));
|
|
62960
62970
|
return (expect(answer, "numbers").phones ?? []).filter((p) => p.status === "active");
|
|
62961
62971
|
}
|
|
62962
62972
|
async function placeCall(wallet, phoneId, body) {
|
|
62963
|
-
const path7 = phoneId ?
|
|
62973
|
+
const path7 = phoneId ? lanePath(`/phones/${encodeURIComponent(phoneId)}/calls`) : lanePath(`/calls`);
|
|
62964
62974
|
const answer = await signedFetch(wallet, "POST", path7, body);
|
|
62965
62975
|
const out = expect(answer, "call");
|
|
62966
62976
|
return { callId: out.callId, call: out.call, perMinuteUsd: out.perMinuteUsd ?? "", from: phoneId ? "number" : "house" };
|
|
62967
62977
|
}
|
|
62968
62978
|
async function readCall(wallet, phoneId, id2) {
|
|
62969
|
-
const path7 = phoneId ?
|
|
62979
|
+
const path7 = phoneId ? lanePath(`/phones/${encodeURIComponent(phoneId)}/calls/${encodeURIComponent(id2)}`) : lanePath(`/calls/${encodeURIComponent(id2)}`);
|
|
62970
62980
|
const answer = await signedFetch(wallet, "GET", path7);
|
|
62971
62981
|
return expect(answer, "call").call;
|
|
62972
62982
|
}
|
|
62973
62983
|
async function listCalls(wallet, phoneId) {
|
|
62974
|
-
const path7 = phoneId ?
|
|
62984
|
+
const path7 = phoneId ? lanePath(`/phones/${encodeURIComponent(phoneId)}/calls`) : lanePath(`/calls`);
|
|
62975
62985
|
const answer = await signedFetch(wallet, "GET", path7);
|
|
62976
62986
|
return expect(answer, "calls").calls ?? [];
|
|
62977
62987
|
}
|
|
@@ -63063,7 +63073,7 @@ function phoneSlice(body) {
|
|
|
63063
63073
|
return out;
|
|
63064
63074
|
}
|
|
63065
63075
|
async function phonePricing(opts) {
|
|
63066
|
-
const res = await fetch(`${SITE3}/api/
|
|
63076
|
+
const res = await fetch(`${SITE3}/api/account/catalog`, { headers: { accept: "application/json" } });
|
|
63067
63077
|
if (!res.ok) throw new Error(`phone catalog: HTTP ${res.status}`);
|
|
63068
63078
|
const body = await res.json();
|
|
63069
63079
|
const slice = phoneSlice(body);
|
|
@@ -63308,7 +63318,7 @@ function emailSlice(body) {
|
|
|
63308
63318
|
return out;
|
|
63309
63319
|
}
|
|
63310
63320
|
async function emailPricing(opts) {
|
|
63311
|
-
const res = await fetch(`${SITE4}/api/
|
|
63321
|
+
const res = await fetch(`${SITE4}/api/account/catalog`, { headers: { accept: "application/json" } });
|
|
63312
63322
|
if (!res.ok) throw new Error(`email catalog: HTTP ${res.status}`);
|
|
63313
63323
|
const body = await res.json();
|
|
63314
63324
|
const slice = emailSlice(body);
|
|
@@ -64102,9 +64112,9 @@ function parseUses(raw, dflt) {
|
|
|
64102
64112
|
return list;
|
|
64103
64113
|
}
|
|
64104
64114
|
function parseGets(raw) {
|
|
64105
|
-
const v = (raw ?? "
|
|
64115
|
+
const v = (raw ?? "session").trim().toLowerCase();
|
|
64106
64116
|
if (v === "box" || v === "session" || v === "password") return v;
|
|
64107
|
-
throw new PasswordsSealError("--gets is one of
|
|
64117
|
+
throw new PasswordsSealError("--gets is one of session, password (or box: the acting uses alone)");
|
|
64108
64118
|
}
|
|
64109
64119
|
function withLevel(uses, gets) {
|
|
64110
64120
|
const out = uses.filter((u) => u !== "session" && u !== "reveal");
|
|
@@ -64141,7 +64151,7 @@ function passwordsSlice(body) {
|
|
|
64141
64151
|
return out;
|
|
64142
64152
|
}
|
|
64143
64153
|
async function passwordsPricing(opts) {
|
|
64144
|
-
const res = await fetch(`${SITE5}/api/
|
|
64154
|
+
const res = await fetch(`${SITE5}/api/account/catalog`, { headers: { accept: "application/json" } });
|
|
64145
64155
|
if (!res.ok) throw new Error(`passwords catalog: HTTP ${res.status}`);
|
|
64146
64156
|
const body = await res.json();
|
|
64147
64157
|
const slice = passwordsSlice(body);
|
|
@@ -64614,12 +64624,12 @@ async function passwordsInvite(opts) {
|
|
|
64614
64624
|
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
64615
64625
|
|
|
64616
64626
|
// src/lib/browser-wire.ts
|
|
64617
|
-
var BROWSER_LANE = "/api/
|
|
64627
|
+
var BROWSER_LANE = "/api/browser";
|
|
64618
64628
|
var SETTLED = /* @__PURE__ */ new Set(["done", "failed", "cancelled"]);
|
|
64619
64629
|
async function readBrowserCatalog() {
|
|
64620
64630
|
let res;
|
|
64621
64631
|
try {
|
|
64622
|
-
res = await fetch(`${siteOrigin()}/api/
|
|
64632
|
+
res = await fetch(`${siteOrigin()}/api/account/catalog`, { headers: { accept: "application/json", "user-agent": CLI_USER_AGENT } });
|
|
64623
64633
|
} catch (err) {
|
|
64624
64634
|
throw new WireError(0, "network_error", `could not reach ${siteOrigin()}: ${err.message}`, null);
|
|
64625
64635
|
}
|
|
@@ -64643,6 +64653,7 @@ async function postTask(wallet, args) {
|
|
|
64643
64653
|
if (args.hosts?.length) body.hosts = args.hosts;
|
|
64644
64654
|
if (typeof args.maxSteps === "number") body.maxSteps = args.maxSteps;
|
|
64645
64655
|
if (typeof args.maxSeconds === "number") body.maxSeconds = args.maxSeconds;
|
|
64656
|
+
if (args.cookies?.length) body.cookies = args.cookies;
|
|
64646
64657
|
const answer = await signedFetch(wallet, "POST", `${BROWSER_LANE}/tasks`, body);
|
|
64647
64658
|
return expect2(answer, "task").task;
|
|
64648
64659
|
}
|
|
@@ -64658,13 +64669,13 @@ async function readIdentityBalance(wallet) {
|
|
|
64658
64669
|
const answer = await signedFetch(
|
|
64659
64670
|
wallet,
|
|
64660
64671
|
"GET",
|
|
64661
|
-
|
|
64672
|
+
lanePath(`/credits`)
|
|
64662
64673
|
);
|
|
64663
64674
|
const body = expect2(answer, "balance");
|
|
64664
64675
|
return { balance: body.balance ?? null, entries: body.entries ?? [], rungsUsd: body.rungsUsd ?? [] };
|
|
64665
64676
|
}
|
|
64666
64677
|
async function readDepositAddress(wallet) {
|
|
64667
|
-
const answer = await signedFetch(wallet, "GET",
|
|
64678
|
+
const answer = await signedFetch(wallet, "GET", lanePath(`/deposit`));
|
|
64668
64679
|
if (answer.status === 503) {
|
|
64669
64680
|
const b2 = answer.body ?? {};
|
|
64670
64681
|
return { deposit: null, dark: typeof b2.error === "string" ? b2.error : "deposit addresses are not open yet on this deployment" };
|
|
@@ -64684,7 +64695,7 @@ async function readDepositAddress(wallet) {
|
|
|
64684
64695
|
};
|
|
64685
64696
|
}
|
|
64686
64697
|
async function scanDeposit(wallet) {
|
|
64687
|
-
const answer = await signedFetch(wallet, "POST",
|
|
64698
|
+
const answer = await signedFetch(wallet, "POST", lanePath(`/deposit`), { scan: true });
|
|
64688
64699
|
const body = answer.status === 429 ? answer.body ?? {} : expect2(answer, "scan");
|
|
64689
64700
|
return { scanned: body.scanned === true, credited: typeof body.credited === "number" ? body.credited : 0, balance: body.balance ?? null };
|
|
64690
64701
|
}
|
|
@@ -64858,7 +64869,7 @@ async function browserBalance(opts) {
|
|
|
64858
64869
|
} else {
|
|
64859
64870
|
process.stdout.write(` ${import_picocolors9.default.dim(dark ?? "deposit addresses are not open yet")}
|
|
64860
64871
|
`);
|
|
64861
|
-
if (balance2.rungsUsd.length) process.stdout.write(` ${import_picocolors9.default.dim(`top up over x402: POST /api/
|
|
64872
|
+
if (balance2.rungsUsd.length) process.stdout.write(` ${import_picocolors9.default.dim(`top up over x402: POST /api/account/balance with {"amountUsd": ${balance2.rungsUsd[0]}} from a wallet that holds USDC`)}
|
|
64862
64873
|
`);
|
|
64863
64874
|
}
|
|
64864
64875
|
process.stdout.write("\n");
|
|
@@ -64867,6 +64878,39 @@ async function browserBalance(opts) {
|
|
|
64867
64878
|
failFrom3(opts, err);
|
|
64868
64879
|
}
|
|
64869
64880
|
}
|
|
64881
|
+
async function sessionForTask(wallet, rowId, url) {
|
|
64882
|
+
if (!/^[A-Za-z0-9_-]{1,64}$/.test(rowId)) throw new WireError(400, "bad_request", "--login takes the saved password's row id (agentgates passwords list)", null);
|
|
64883
|
+
const body = { use: "session", request: { url } };
|
|
64884
|
+
let permitted = false;
|
|
64885
|
+
const startedAt = Date.now();
|
|
64886
|
+
for (; ; ) {
|
|
64887
|
+
const answer = await postUse(wallet, rowId, body);
|
|
64888
|
+
const b2 = answer.body ?? {};
|
|
64889
|
+
if (answer.status === 200) {
|
|
64890
|
+
const result = b2.result ?? {};
|
|
64891
|
+
if (result.code !== "ok" || !Array.isArray(result.cookies) || result.cookies.length === 0) {
|
|
64892
|
+
throw new WireError(200, result.code ?? "login_failed", result.error ?? `the login did not land (${result.code ?? "no answer"})`, answer.body);
|
|
64893
|
+
}
|
|
64894
|
+
return result.cookies;
|
|
64895
|
+
}
|
|
64896
|
+
if (answer.status === 202) {
|
|
64897
|
+
throw new WireError(202, "approval_pending", "this saved password asks you before each use; approve it on the Passwords board, or allow yourself without --ask-me", answer.body);
|
|
64898
|
+
}
|
|
64899
|
+
if (answer.status === 403 && (b2.code === "no_permit" || b2.code === "use_not_allowed") && !permitted) {
|
|
64900
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
64901
|
+
const signed2 = await signPermit(wallet, { agent: wallet.address, secretIds: ["*"], hosts: [], usesPerDay: 0, uses: [...ACTING_USES, "session"], expiresAt: now + 30 * 86400, approveEachUse: false });
|
|
64902
|
+
await postPermit(wallet, signed2);
|
|
64903
|
+
permitted = true;
|
|
64904
|
+
continue;
|
|
64905
|
+
}
|
|
64906
|
+
const named = b2.startingInSeconds ?? b2.retryInSeconds;
|
|
64907
|
+
if (answer.status === 503 && typeof named === "number" && Date.now() - startedAt < 24e4) {
|
|
64908
|
+
await new Promise((r) => setTimeout(r, Math.min(120, Math.max(5, Math.ceil(named))) * 1e3));
|
|
64909
|
+
continue;
|
|
64910
|
+
}
|
|
64911
|
+
throw new WireError(answer.status, b2.code ?? null, b2.error ?? `the session use answered ${answer.status}`, answer.body);
|
|
64912
|
+
}
|
|
64913
|
+
}
|
|
64870
64914
|
async function browserRun(url, opts) {
|
|
64871
64915
|
const goal = (opts.task ?? "").trim();
|
|
64872
64916
|
if (!goal) return refuse4(opts, 'say what the browser agent should do: --task "<words>"', "bad_request");
|
|
@@ -64876,7 +64920,10 @@ async function browserRun(url, opts) {
|
|
|
64876
64920
|
if (maxSeconds !== void 0 && !Number.isInteger(maxSeconds)) return refuse4(opts, "--seconds must be a whole number", "bad_request");
|
|
64877
64921
|
try {
|
|
64878
64922
|
const keys2 = await requirePasswordsKey();
|
|
64879
|
-
const
|
|
64923
|
+
const cookies = opts.login ? await sessionForTask(keys2.wallet, opts.login.trim(), siteUrl(url)) : void 0;
|
|
64924
|
+
if (cookies && !jsonMode4(opts)) process.stderr.write(` ${import_picocolors9.default.dim(`signed in with the saved password: ${cookies.length} cookie${cookies.length === 1 ? "" : "s"} ride the task`)}
|
|
64925
|
+
`);
|
|
64926
|
+
const task = await postTask(keys2.wallet, { url: siteUrl(url), goal, hosts: opts.host, maxSteps, maxSeconds, cookies });
|
|
64880
64927
|
if (!opts.wait) {
|
|
64881
64928
|
emit4(opts, { ok: true, task }, () => {
|
|
64882
64929
|
printTask(task, false);
|
|
@@ -65127,9 +65174,9 @@ var MENU = {
|
|
|
65127
65174
|
var LANES = {
|
|
65128
65175
|
compute: { key: "compute", name: "virtual machines", docs: "/api/compute/docs" },
|
|
65129
65176
|
inference: { key: "models", name: "inference", docs: "/api/inference/docs" },
|
|
65130
|
-
phone: { key: "phone", name: "phone", docs: "/api/
|
|
65131
|
-
email: { key: "email", name: "email", docs: "/api/
|
|
65132
|
-
passwords: { key: "passwords", name: "passwords", docs: "/api/
|
|
65177
|
+
phone: { key: "phone", name: "phone", docs: "/api/account/docs/phone" },
|
|
65178
|
+
email: { key: "email", name: "email", docs: "/api/account/docs/email" },
|
|
65179
|
+
passwords: { key: "passwords", name: "passwords", docs: "/api/account/docs/passwords" }
|
|
65133
65180
|
};
|
|
65134
65181
|
var LANE_ORDER = ["compute", "inference", "phone", "email", "passwords"];
|
|
65135
65182
|
function leadLane(lane) {
|
|
@@ -65220,11 +65267,11 @@ async function onboard(opts = {}) {
|
|
|
65220
65267
|
`);
|
|
65221
65268
|
put(` ${CREATORS_ORIGIN}/api/inference/docs ${import_picocolors11.default.dim("\xB7 the chat contract, x402 or Bearer")}
|
|
65222
65269
|
`);
|
|
65223
|
-
put(` ${CREATORS_ORIGIN}/api/
|
|
65270
|
+
put(` ${CREATORS_ORIGIN}/api/account/docs/phone ${import_picocolors11.default.dim("\xB7 the phone contract: numbers, texts, calls, the payphone")}
|
|
65224
65271
|
`);
|
|
65225
|
-
put(` ${CREATORS_ORIGIN}/api/
|
|
65272
|
+
put(` ${CREATORS_ORIGIN}/api/account/docs/email ${import_picocolors11.default.dim("\xB7 the email contract: inboxes, plans, sends, wait-code")}
|
|
65226
65273
|
`);
|
|
65227
|
-
put(` ${CREATORS_ORIGIN}/api/
|
|
65274
|
+
put(` ${CREATORS_ORIGIN}/api/account/docs/passwords ${import_picocolors11.default.dim("\xB7 the passwords contract: store, permits, uses")}
|
|
65228
65275
|
`);
|
|
65229
65276
|
put(` ${CREATORS_ORIGIN}/llms.txt ${import_picocolors11.default.dim("\xB7 the whole surface")}
|
|
65230
65277
|
|
|
@@ -65460,7 +65507,7 @@ async function keysCreate(opts) {
|
|
|
65460
65507
|
|
|
65461
65508
|
${made.key}
|
|
65462
65509
|
|
|
65463
|
-
${import_picocolors12.default.dim("Shown once. Send it as Authorization: Bearer <key> on every /api/
|
|
65510
|
+
${import_picocolors12.default.dim("Shown once. Send it as Authorization: Bearer <key> on every /api/account door; the words stay home.")}
|
|
65464
65511
|
` + (opts.keep ? ` ${import_picocolors12.default.dim("Kept in the key file: this machine sends it from now on.")}
|
|
65465
65512
|
|
|
65466
65513
|
` : ` ${import_picocolors12.default.dim("agentgates keys create --keep \xB7 would have made it this machine's")}
|
|
@@ -70538,7 +70585,7 @@ passwords.command("init").description(
|
|
|
70538
70585
|
passwords.command("add").alias("store").description("Store a login: sealed on this machine to this key's own signature and to the box'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 only; an email address is not a secret").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 (default login)").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("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
70539
70586
|
await passwordsAdd(opts);
|
|
70540
70587
|
});
|
|
70541
|
-
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 <
|
|
70588
|
+
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 box logs in (default); password = the secret itself; box = the acting uses alone, for an agent that works inside the box 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("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
70542
70589
|
await passwordsAllow(opts);
|
|
70543
70590
|
});
|
|
70544
70591
|
passwords.command("use").description("Log in through the box 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. 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 box runs inside the session after the login lands (goto, fill, click, wait, read)").option("--request-json <json>", "the whole request object for header and totp uses (spec \xA75.1)").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) => {
|
|
@@ -70550,7 +70597,7 @@ passwords.command("list").description("The rows this key holds, and the rows ano
|
|
|
70550
70597
|
});
|
|
70551
70598
|
passwords.command("invite").description(
|
|
70552
70599
|
"Invite a person: print a link they open to take this key's logins under their own wallet and set the guardrails (which uses, ask-me). The link is the key to those logins until it is used, withdrawn or expires. Once accepted, this key uses them under their permit."
|
|
70553
|
-
).option("--rows <id,id>", "hand over these rows only (default: every row this key holds)").option("--minutes <n>", "how long the link works, 5 to 60 (default 15)").option("--uses <login,totp,header>", "the uses to propose on the permit (default all three)").option("--gets <
|
|
70600
|
+
).option("--rows <id,id>", "hand over these rows only (default: every row this key holds)").option("--minutes <n>", "how long the link works, 5 to 60 (default 15)").option("--uses <login,totp,header>", "the uses to propose on the permit (default all three)").option("--gets <session|password>", "the level to propose: session (default) or password; the person can change it").option("--days <n>", "the permit length to propose, 1 to 366 (default 30)").option("--no-ask-me", "propose the permit without the ask-me switch (the person can still turn it on)").option("--withdraw <link>", "kill a link you already printed").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts, command) => {
|
|
70554
70601
|
const askSource = command.getOptionValueSource("askMe");
|
|
70555
70602
|
await passwordsInvite({ ...opts, noAskMe: askSource === "cli" && opts.askMe === false });
|
|
70556
70603
|
});
|
|
@@ -70560,7 +70607,7 @@ var browser = program2.command("browser").description(
|
|
|
70560
70607
|
browser.command("pricing").description("The step price and the ceilings. Public read: no key, no account, no payment.").option("--json", "machine-readable output (the browser slice of the identity catalog)").action(async (opts) => {
|
|
70561
70608
|
await browserPricing(opts);
|
|
70562
70609
|
});
|
|
70563
|
-
browser.command("run <url>").description("Queue a task at a site. With --wait, print the answer when it lands.").requiredOption("--task <words>", "what the browser agent should do there, in words").option("--steps <n>", "the most steps it may take (the catalog's default when absent)").option("--seconds <n>", "the most seconds it may run (the catalog's ceiling when absent)").option("--host <hostname>", "an extra hostname the task may visit (repeatable)", (v, prev = []) => [...prev, v]).option("--wait [seconds]", "wait for the answer (the task's own clock plus two minutes by default)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (url, opts) => {
|
|
70610
|
+
browser.command("run <url>").description("Queue a task at a site. With --wait, print the answer when it lands.").requiredOption("--task <words>", "what the browser agent should do there, in words").option("--login <row id>", "start signed in with this saved password (agentgates passwords list): the box logs in, the session rides the task; Passwords charges the login, Browser the steps").option("--steps <n>", "the most steps it may take (the catalog's default when absent)").option("--seconds <n>", "the most seconds it may run (the catalog's ceiling when absent)").option("--host <hostname>", "an extra hostname the task may visit (repeatable)", (v, prev = []) => [...prev, v]).option("--wait [seconds]", "wait for the answer (the task's own clock plus two minutes by default)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (url, opts) => {
|
|
70564
70611
|
await browserRun(url, opts);
|
|
70565
70612
|
});
|
|
70566
70613
|
browser.command("tasks").description("The tasks this key owns, newest first.").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|