Versions 258 to 259
Lines 8–14 at 259 (were 8–14 at 258)
11−import { boxPublic, boxText, login, loginRequest, logout, readBox } from "./box.ts";
11+import { boxName, boxPublic, boxText, login, loginRequest, logout, originOf, readBox } from "./box.ts";
Lines 45–61 at 259 (were 45–51 at 258)
48−import { runAck, runAnswer, runAsk, runIssue, runIssues, runReply, runSearch, runWaiting } from "./issues.ts";
4959import { adminToken, issuedPublic, keyList, keyListText, keyNew, keyRevoke } from "./key-admin.ts";
Lines 199–213 at 259 (were 189–201 at 258)
196− usage: "abso login [--no-browser] [--projects <name,name>] [--role <reader|writer|owner>] [--days <1-90>]",
208+ "abso login [--no-browser] [--no-ask] [--projects <name,name>] [--role <reader|writer|owner>] [--days <1-90>]",
198− "Sign this box in once: it opens the approve page in your browser with the code filled in, prints the link and the code too, and waits while a person approves the code on the website, choosing the projects, the highest role and how long. Then abso join in any of those projects gives each agent its own key, with no approval. The box's sign-in is kept in your user folder, never in a project folder, and is never printed. No browser opens with --no-browser or ABSO_NO_BROWSER, over SSH, under CI, or on Linux without a display.",
210+ "Sign this box in once: it opens the approve page in your browser with the code filled in, prints the link and the code too, and waits while a person approves the code on the website, choosing the projects, the highest role and how long. Then abso join in any of those projects gives each agent its own key, with no approval. The box's sign-in is kept in your user folder, never in a project folder, and is never printed. No browser opens with --no-browser or ABSO_NO_BROWSER, over SSH, under CI, or on Linux without a display. In an agent's folder on the same server, it also asks a person in that project to approve it (the person who approved the agent's box, else the project's owners), as an abso ask, so nobody has to relay the code; the box can then be granted that project at no more than the agent's own role. --no-ask shows the code only.",
Lines 215–221 at 259 (were 203–208 at 258)
207220 say: (line) => process.stderr.write(terminalText(`${line}\n`, colorsPass(process.stderr, env.env))),
Lines 1076–1128 at 259 (were 1063–1065 at 258)
1079+
1081+ * abso 684: in an agent's folder on this same server, the ask `abso login` makes of a person in that project, so nobody
1082+ * relays the code. The folder's agent key proves the agent; the device code proves the sign-in is this client's own.
1085+function loginAsk(server: string, env: Env): NonNullable<Parameters<typeof login>[1]["ask"]> | undefined {
1089+ if (config.token === undefined || originOf(config.server) !== originOf(server)) return undefined;
1094+ body: JSON.stringify({ project: config.project, agent: config.agent, device_code: device, user_code: user }),
1103+ if (!asked.ok || !Array.isArray(body.people) || typeof body.request_url !== "string") return null;
1106+ const when = new Intl.DateTimeFormat("en-US", { timeZone: "America/Chicago", hour: "numeric", minute: "2-digit" });
1107+ const question = `Please sign in my box "${boxName()}" for ${config.project}, as at most ${body.role}. It expires at ${when.format(new Date(expiresAt))} CT. Approve or deny: ${body.request_url}`;
1119+ who: body.people.length === 1 ? "the person who approved this agent's box" : `the owners of ${config.project}`,
1124+ for (const id of asks) await api.withdraw(id, { note: "The sign-in ran out; nothing was granted." });
- MCP
- compare on this site's /mcp
- CLI
- abso diff 258 259 client/src/main.ts --json
- JSON
- /christopher/abso-core/compare/258..259?file=client%2Fsrc%2Fmain.ts&format=json