Versions 258 to 259
Lines 222–228 at 259 (were 222–228 at 258)
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 259 (were 254–261 at 258)
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–327 at 259 (were 278–293 at 258)
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;
304+ const askWord = asked.asks.length === 1 ? `ask ${asked.asks[0]}` : `asks ${asked.asks.join(", ")}`;
305+ io.say(`Asked ${asked.who} (${askWord} in ${asked.project}) to sign this box in, as at most ${asked.role}.`);
307+ `Waiting for their answer, until ${CENTRAL.format(new Date(asked.expiresAt))} CT. To approve it yourself instead: ${link}`,
312+ io.say("Waiting for approval. Ctrl-C stops waiting, and abso stops by itself when the code runs out.");
314+ 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 331–344 at 259 (were 297–304 at 258)
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.`);
335+ throw new UsageError(asked ? `${asked.who} turned this sign-in down.` : `the code ${code} was turned down.`);
Lines 348–357 at 259 (were 308–313 at 258)
353+ throw new UsageError("nobody answered in time, so nothing was granted. Run abso login again.");
313357
- MCP
- compare on this site's /mcp
- CLI
- abso diff 258 259 client/src/box.ts --json
- JSON
- /christopher/abso-core/compare/258..259?file=client%2Fsrc%2Fbox.ts&format=json