Versions 201 to 318
Lines 222–228 at 318 (were 222–228 at 201)
223223
224224/** This machine's name, as the server takes a box's name: 1-64 letters, digits, '.', '_' or '-'. */
225−function boxName(): string {
Lines 254–282 at 318 (were 254–261 at 201)
255255 /** Opens the approve page in a browser, answering whether it tried. None where it shouldn't (--no-browser, SSH, CI). */
258+ * abso 684: in a joined folder, asks a person in its project to approve this sign-in, through an abso ask, so nobody
261+ readonly ask?: (codes: { readonly device: string; readonly user: string }) => Promise<LoginAsked | null>;
258263
277+
278+const CENTRAL = new Intl.DateTimeFormat("en-US", { timeZone: "America/Chicago", hour: "numeric", minute: "2-digit" });
279+
Lines 299–335 at 318 (were 278–293 at 201)
280301 // The page opens with the code in it, so nobody copies a link by hand. The link and code are printed all the same.
281− if (io.open?.(link)) io.say("Opening the approve page in your browser.");
282− io.say(`To sign this box in, open ${link} and approve the code ${code}.`);
283− io.say("Waiting for approval. Ctrl-C stops waiting, and abso stops by itself when the code runs out.");
284− const until = now() + expiresIn * 1000;
302+ // A failed ask falls back to the code, and says why, so a person can still approve it (abso 684).
306+ `Couldn't ask a person to approve this (${e instanceof Error ? e.message : String(e)}), so here is the code.`,
312+ const askWord = asked.asks.length === 1 ? `ask ${asked.asks[0]}` : `asks ${asked.asks.join(", ")}`;
313+ io.say(`Asked ${asked.who} (${askWord} in ${asked.project}) to sign this box in, as at most ${asked.role}.`);
315+ `Waiting for their answer, until ${CENTRAL.format(new Date(asked.expiresAt))} CT. To approve it yourself instead: ${link}`,
320+ io.say("Waiting for approval. Ctrl-C stops waiting, and abso stops by itself when the code runs out.");
322+ const until = asked ? Math.min(asked.expiresAt, now() + MAX_LOGIN_WAIT_S * 1000) : now() + expiresIn * 1000;
290− io.say(`Still waiting for the code ${code} to be approved.`);
Lines 339–352 at 318 (were 297–304 at 201)
300− if (a.body.error === "access_denied") throw new UsageError(`the code ${code} was turned down.`);
301− throw new UsageError(`the code ${code} ran out. Run abso login again.`);
343+ throw new UsageError(asked ? `${asked.who} turned this sign-in down.` : `the code ${code} was turned down.`);
Lines 356–365 at 318 (were 308–313 at 201)
361+ throw new UsageError("nobody answered in time, so nothing was granted. Run abso login again.");
313365
- MCP
- compare on this site's /mcp
- CLI
- abso diff 201 318 client/src/box.ts --json
- JSON
- /christopher/abso-core/compare/201..318?file=client%2Fsrc%2Fbox.ts&format=json