Versions 140 to 318
Lines 15–46 at 318 (were 15–39 at 140)
1717
18−/** What the person who approved the code allowed: each project with the highest role its agents get there, and how many agents. */
19+ * What the person who approved the code allowed: each project with the highest role its agents get there. A box lets in any
20+ * number of agents (abso 642; Christopher, 2026-10-14, ask 1947); the server still records a max_agents it doesn't enforce.
21− readonly max_agents: number;
24+ /** Version 2 grants (abso 663): member-all is every project of the approver's, now and later, at most this role. */
2327
28+/** The role a box has in all its approver's projects, now and later, or null when its grant is a list (abso 663). */
32+
2635 readonly projects?: readonly { readonly project: string; readonly role: "reader" | "writer" | "owner" }[];
27− readonly max_agents?: number;
3038
34− const maxAgents = str(args, "max-agents");
36− if (projects === undefined && role === undefined && maxAgents === undefined && days === undefined) return undefined;
3744 if (role !== undefined && projects === undefined) throw new UsageError("--role needs --projects");
Lines 57–62 at 318 (were 50–56 at 140)
5259 ...(names ? { projects: [...new Set(names)].map((project) => ({ project, role: requestedRole })) } : {}),
53− ...(maxAgents === undefined ? {} : { max_agents: integer(maxAgents, "max-agents", 50) }),
Lines 161–167 at 318 (were 155–160 at 140)
Lines 170–176 at 318 (were 163–168 at 140)
Lines 222–228 at 318 (were 214–220 at 140)
215223
216224/** This machine's name, as the server takes a box's name: 1-64 letters, digits, '.', '_' or '-'. */
217−function boxName(): string {
Lines 236–242 at 318 (were 228–235 at 140)
231− x.projects.every((p) => typeof p?.project === "string" && typeof p.role === "string") &&
232− typeof x.max_agents === "number"
235242
Lines 254–282 at 318 (were 247–254 at 140)
248255 /** 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>;
251263
277+
278+const CENTRAL = new Intl.DateTimeFormat("en-US", { timeZone: "America/Chicago", hour: "numeric", minute: "2-digit" });
279+
Lines 299–335 at 318 (were 271–286 at 140)
273301 // The page opens with the code in it, so nobody copies a link by hand. The link and code are printed all the same.
274− if (io.open?.(link)) io.say("Opening the approve page in your browser.");
275− io.say(`To sign this box in, open ${link} and approve the code ${code}.`);
276− io.say("Waiting for approval. Ctrl-C stops waiting, and abso stops by itself when the code runs out.");
277− 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;
283− io.say(`Still waiting for the code ${code} to be approved.`);
Lines 339–352 at 318 (were 290–297 at 140)
293− if (a.body.error === "access_denied") throw new UsageError(`the code ${code} was turned down.`);
294− 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 301–306 at 140)
361+ throw new UsageError("nobody answered in time, so nothing was granted. Run abso login again.");
306365
Lines 377–436 at 318 (were 318–323 at 140)
320379
380+/** What a new project from this box starts with (abso 663): the website's own create, as the person who approved the box. */
390+
392+ * Makes a project as the person who approved this box (abso init, abso 663). One key for every try, so a retry after
410+ `${originOf(record.server)} is still making ${project.name}. Run the same abso init again in a minute: it picks up where this left off.`,
415+
433+
Lines 463–468 at 318 (were 350–359 at 140)
352465 if (err instanceof UsageError && /refused \(409\): that agent name/.test(err.message)) continue;
353− if (err instanceof UsageError && /refused \(409\): this box is at its agent limit/.test(err.message))
354− throw new UsageError(
355− `this box is at its agent limit (${record.grant.max_agents}): abso box shows its grant, and an agent can be revoked on the website's Boxes page`,
356− );
Lines 490–501 at 318 (were 381–389 at 140)
381490 if (!record) return `This box isn't signed in to ${originOf(server)}. abso login signs it in.`;
385495 `Signed in to ${record.server} as box ${record.id}${expired ? ", but the sign-in has expired. abso login renews it." : "."}`,
386− `Projects: ${g.projects.map((p) => `${p.project} (${p.role})`).join(", ")}. Up to ${g.max_agents} agents.`,
498+ : `Projects: all of yours, now and later (${all} at most). abso init makes a new one; abso org new makes an organization.`,
- MCP
- compare on this site's /mcp
- CLI
- abso diff 140 318 client/src/box.ts --json
- JSON
- /christopher/abso-core/compare/140..318?file=client%2Fsrc%2Fbox.ts&format=json