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 149 to 150

Compare

+36 −0 in 1 place
new file, 36 lines
1+// What the open server's Worker is given: wrangler.jsonc's bindings and the secrets set with `wrangler secret put`.
2+
3+import type { IssueProject } from "./issues-entry.ts";
4+import type { ProjectObject } from "./project-object.ts";
5+
6+export interface Env {
7+ /** One Durable Object per project, named by the project's name. */
8+ PROJECT: DurableObjectNamespace<ProjectObject>;
9+ /** Issues, asks and news: one Durable Object per project, named by the project's name. */
10+ ISSUES_DO: DurableObjectNamespace<IssueProject>;
11+ /** Each project's shared, pushed out as a git repo abso-<project>. Unbound under local `wrangler dev`: skipped. */
12+ ARTIFACTS?: Artifacts;
13+ /** "off" leaves Artifacts alone even where it is bound: local `wrangler dev --local` binds it but cannot reach it. */
14+ ABSO_ARTIFACTS?: string;
15+ CF_VERSION_METADATA?: WorkerVersionMetadata;
16+ /** The shared token every agent signs in with. AVCS_TOKEN is its old name. With neither set, every call is refused. */
17+ ABSO_TOKEN?: string;
18+ AVCS_TOKEN?: string;
19+ /** For /admin/agent-keys, sent as the x-abso-admin header beside the shared token. */
20+ ABSO_ADMIN_TOKEN?: string;
21+ AVCS_ADMIN_TOKEN?: string;
22+ /** Per-agent keys: "on" with KEY_HMAC_SECRET set. */
23+ AGENT_KEYS?: string;
24+ KEY_HMAC_SECRET?: string;
25+}
27+/** A secret by its abso name, or its avcs name from before the rename. Empty counts as unset. */
28+export function secret(env: Env, name: "TOKEN" | "ADMIN_TOKEN"): string | undefined {
29+ for (const v of [env[`ABSO_${name}`], env[`AVCS_${name}`]]) if (typeof v === "string" && v !== "") return v;
30+ return undefined;
31+}
33+/** The Artifacts binding, unless it is unbound or ABSO_ARTIFACTS is "off": then nothing is pushed out or taken in. */
34+export function artifactsOf(env: Env): Artifacts | undefined {
35+ return env.ABSO_ARTIFACTS === "off" ? undefined : env.ARTIFACTS;
36+}
MCP
compare on this site's /mcp
CLI
abso diff 149 150 server/src/env.ts --json
JSON
/christopher/abso-core/compare/149..150?file=server%2Fsrc%2Fenv.ts&format=json