- MCP
- blame on this site's /mcp
- CLI
- abso blame server/src/env.ts --json
- JSON
- /christopher/abso-core/blame/server/src/env.ts?format=json
46 linesspeed 78% · autosettle 17% · codex-capacity-chair 4%Last change autosettle in version 204,
46 lines from 6 changes in 5 versions.
speed150Open server: the project Worker, Durable Object and Artifacts (issue 17)Compare1// What the open server's Worker is given: wrangler.jsonc's bindings and the secrets set with `wrangler secret put`.
3import type { IssueProject } from "./issues-entry.ts";
4import type { ProjectObject } from "./project-object.ts";
6export interface Env {
codex-capacity-chair158Integrate opt-in disk-first project runtime with cold-object transactionsCompare7 /** Explicit development opt-in while disk-first server acceptance is in progress. */
8 ABSO_DISK_FIRST?: string;
speed150Open server: the project Worker, Durable Object and Artifacts (issue 17)Compare9 /** One Durable Object per project, named by the project's name. */
10 PROJECT: DurableObjectNamespace<ProjectObject>;
11 /** Issues, asks and news: one Durable Object per project, named by the project's name. */
12 ISSUES_DO: DurableObjectNamespace<IssueProject>;
13 /** Each project's shared, pushed out as a git repo abso-<project>. Unbound under local `wrangler dev`: skipped. */
14 ARTIFACTS?: Artifacts;
15 /** "off" leaves Artifacts alone even where it is bound: local `wrangler dev --local` binds it but cannot reach it. */
16 ABSO_ARTIFACTS?: string;
17 CF_VERSION_METADATA?: WorkerVersionMetadata;
18 /** The shared token every agent signs in with. AVCS_TOKEN is its old name. With neither set, every call is refused. */
19 ABSO_TOKEN?: string;
20 AVCS_TOKEN?: string;
21 /** For /admin/agent-keys, sent as the x-abso-admin header beside the shared token. */
22 ABSO_ADMIN_TOKEN?: string;
23 AVCS_ADMIN_TOKEN?: string;
24 /** Per-agent keys: "on" with KEY_HMAC_SECRET set. */
25 AGENT_KEYS?: string;
26 KEY_HMAC_SECRET?: string;
autosettle204Auto-settle switch (abso 19): on advises, act also has the client settle
AUTOSETTLE=on now only adds advice to a held push; AUTOSETTLE=act adds settle: true, and the client settles the collisions advised a side only then (ABSO_AUTOSETTLE=off still stops it). The whole server hook is one function, withAdvice(env, op, agent, request, answer), so a Worker calls it in one line: return json(a.status, await withAdvice(env, op, agent, body, a.body)). Tested: the switch test, held-push tests, and the local demo under on (held with advice) and act (settled and pushed).Compare27 /** "on" gives a held push a first opinion on each collision from Workers AI (#19); "act" also has the client settle the ones advised a side. Needs the AI binding. */
autosettle196Auto-settle (#19), step 3 behind a switch: the open server gives a held push a first opinion. With AUTOSETTLE=on and an AI binding (both off unless set), a held push's answer carries advice for each lines collision: keep yours, theirs or both, or needs an agent, with how many of 5 Workers AI samples agree and one line why. Checks in code run first and after (server/src/autosettle.ts), and the scripts now use the same ones. The client prints the advice under the collisions; the agent still settles. A model that fails leaves no advice and never fails the push's answer. server/test/autosettle.test.ts covers it with a stand-in for Workers AI.Compare28 AUTOSETTLE?: string;
autosettle201Auto-settle (#19): the open server's advice now comes from Clef, Cloudflare's decision model, by default. On project abso's 33 replayed past holds, Clef settled none wrong at confidence 0.5 or more, where the Llama text model was wrong once at 1.00 (it kept only theirs and would have dropped a 403 guard). A lean to one side under AUTOSETTLE_AT (0.5 unless set) is advice for an agent, marked unsure; AUTOSETTLE_MODEL picks clef-flash or a text model instead. Clef answers in about 0.3 s. The System One questions live in server/src/autosettle.ts, and scripts/autosettle/jev.ts asks Jev the same ones.Compare29 /** Which model advises: clef (the default), clef-flash, or a Workers AI text model's id. */
30 AUTOSETTLE_MODEL?: string;
31 /** The confidence under which a lean to one side is left to an agent: 0.5 unless set. */
32 AUTOSETTLE_AT?: string;
autosettle196Auto-settle (#19), step 3 behind a switch: the open server gives a held push a first opinion. With AUTOSETTLE=on and an AI binding (both off unless set), a held push's answer carries advice for each lines collision: keep yours, theirs or both, or needs an agent, with how many of 5 Workers AI samples agree and one line why. Checks in code run first and after (server/src/autosettle.ts), and the scripts now use the same ones. The client prints the advice under the collisions; the agent still settles. A model that fails leaves no advice and never fails the push's answer. server/test/autosettle.test.ts covers it with a stand-in for Workers AI.Compare33 /** Workers AI, for AUTOSETTLE. Unbound unless wrangler.jsonc names it. */
34 AI?: { run(model: string, input: unknown): Promise<unknown> };
37/** A secret by its abso name, or its avcs name from before the rename. Empty counts as unset. */
38export function secret(env: Env, name: "TOKEN" | "ADMIN_TOKEN"): string | undefined {
39 for (const v of [env[`ABSO_${name}`], env[`AVCS_${name}`]]) if (typeof v === "string" && v !== "") return v;
40 return undefined;
41}
43/** The Artifacts binding, unless it is unbound or ABSO_ARTIFACTS is "off": then nothing is pushed out or taken in. */
44export function artifactsOf(env: Env): Artifacts | undefined {
45 return env.ABSO_ARTIFACTS === "off" ? undefined : env.ARTIFACTS;
46}