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

Versions 136 to 318

Compare

+13 −4 in 1 place
Lines 23–56 at 318 (were 23–47 at 136)
2323import { bool, type Parsed, str, UsageError } from "./args.ts";
2424import { type Env, type Output, open, plural } from "./commands.ts";
2525import { type Config, readMachineServers, trustedServers } from "./config.ts";
26−import { issuesServerFor, tokenGoesTo } from "./core.ts";
26+import { issuesServerFor, tokenGoesToIssues } from "./core.ts";
2727import { fromEnv } from "./env-names.ts";
2828import { ignoredHere } from "./fetch.ts";
2929import { loadIgnore, relativeTo } from "./folder.ts";
3030import type { AskReply } from "./issues-wire.ts";
31+import { isLocal, LOCAL_BASE } from "./local-store.ts";
3132import { queuedLines, standing } from "./queue.ts";
3233import { seenText, shortWhen } from "./times.ts";
3334
3435const q = (s: string): string => JSON.stringify(s);
3536
3637/** The folder, with its Api pointed at the Issues Worker: the token goes only where tokenGoesTo allows, as for the avcs server. */
37−function openIssues(env: Env): { root: string; config: Config; api: Api } {
38+export function openIssues(env: Env): { root: string; config: Config; api: Api } {
3839 const { root, config, api } = open(env);
39− const server = fromEnv(env.env, "ISSUES_SERVER") || issuesServerFor(config.server, readMachineServers(env.env));
40+ // A local project's issues are in its store, where the open server keeps them: at /issues.
41+ if (isLocal(config.server)) {
42+ api.issuesServer = `${LOCAL_BASE}/issues`;
43+ return { root, config, api };
44+ }
45+ // An explicit --server goes to that server's own Issues Worker: ABSO_ISSUES_SERVER doesn't redirect it.
46+ const server =
47+ (env.server === undefined ? fromEnv(env.env, "ISSUES_SERVER") : undefined) ||
48+ issuesServerFor(config.server, readMachineServers(env.env));
4049 if (server === undefined)
4150 throw new UsageError(
4251 `${config.server} has no Issues Worker beside it that abso knows; ~/.abso/servers.json or ABSO_ISSUES_SERVER names one`,
4352 );
44− if (config.token !== undefined && !tokenGoesTo(server, trustedServers(env.env))) {
53+ if (config.token !== undefined && !tokenGoesToIssues(server, trustedServers(env.env))) {
4554 throw new UsageError(
4655 `the Issues Worker is ${server}, and abso sends your token only to its own servers and this machine. If ${server} is yours, name it in ~/.abso/servers.json or ABSO_TRUSTED_SERVERS.`,
4756 );
MCP
compare on this site's /mcp
CLI
abso diff 136 318 client/src/issues.ts --json
JSON
/christopher/abso-core/compare/136..318?file=client%2Fsrc%2Fissues.ts&format=json