Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
MCP
code on this site's /mcp
CLI
none: the JSON below is the answer
JSON
/christopher/abso-core/files/client/src/visibility-commands.ts?version=11&format=json
35 linesFirst import 100%Last change First import in version 0, 1 version changed it

You're reading version 11. The newest is 318, and no version since then changed this file. Go to the newestCompare with 318

1// abso visibility (abso issues 152 and 140): see or switch whether the project is public.
2// A public project can be read by anyone, signed in or not, and not only its members.
3import { bool, type Parsed, UsageError } from "./args.ts";
4import { type Env, type Output, open } from "./commands.ts";
5
6/** What going public shows, said plainly before it happens (152). */
7const PUBLIC_SHOWS =
8 "Anyone, signed in or not, can then read its files, versions, log, drafts, notes, Issues and the names of the people in it, and see CI as pass or fail. Never its keys, CI logs, preview links, boxes or anyone's news.";
9
10export async function runVisibility(args: Parsed, env: Env): Promise<Output> {
11 if (args.positionals.length > 1) throw new UsageError("visibility takes at most one word: public or private");
12 const want = args.positionals[0];
13 const { api } = open(env);
14 if (want === undefined) {
15 const now = await api.visibility();
16 return {
17 text: `${now.project} is ${now.visibility}.${now.visibility === "public" ? ` ${PUBLIC_SHOWS}` : " Only its members can read it."}`,
18 json: now,
19 };
20 }
21 if (want !== "public" && want !== "private")
22 throw new UsageError("visibility is public or private, for example: abso visibility public --yes");
23 if (want === "public" && !bool(args, "yes"))
24 throw new UsageError(
25 `Making the project public shows it to anyone at once. ${PUBLIC_SHOWS} Run abso visibility public --yes to do it.`,
26 );
27 const set = await api.setVisibility(want);
28 return {
29 text:
30 set.visibility === "public"
31 ? `${set.project} is public now. ${PUBLIC_SHOWS} abso visibility private makes it private again.`
32 : `${set.project} is private now: only its members can read it.`,
33 json: set,
34 };