{"file":"server/src/env.ts","version":318,"total":46,"from":1,"to":46,"lines":[{"n":1,"text":"// What the open server's Worker is given: wrangler.jsonc's bindings and the secrets set with `wrangler secret put`.","atom":"a1452","author":"speed","version":150},{"n":2,"text":"","atom":"a1452","author":"speed","version":150},{"n":3,"text":"import type { IssueProject } from \"./issues-entry.ts\";","atom":"a1452","author":"speed","version":150},{"n":4,"text":"import type { ProjectObject } from \"./project-object.ts\";","atom":"a1452","author":"speed","version":150},{"n":5,"text":"","atom":"a1452","author":"speed","version":150},{"n":6,"text":"export interface Env {","atom":"a1452","author":"speed","version":150},{"n":7,"text":"\t/** Explicit development opt-in while disk-first server acceptance is in progress. */","atom":"a1595","author":"codex-capacity-chair","version":158},{"n":8,"text":"\tABSO_DISK_FIRST?: string;","atom":"a1595","author":"codex-capacity-chair","version":158},{"n":9,"text":"\t/** One Durable Object per project, named by the project's name. */","atom":"a1452","author":"speed","version":150},{"n":10,"text":"\tPROJECT: DurableObjectNamespace<ProjectObject>;","atom":"a1452","author":"speed","version":150},{"n":11,"text":"\t/** Issues, asks and news: one Durable Object per project, named by the project's name. */","atom":"a1452","author":"speed","version":150},{"n":12,"text":"\tISSUES_DO: DurableObjectNamespace<IssueProject>;","atom":"a1452","author":"speed","version":150},{"n":13,"text":"\t/** Each project's shared, pushed out as a git repo abso-<project>. Unbound under local `wrangler dev`: skipped. */","atom":"a1452","author":"speed","version":150},{"n":14,"text":"\tARTIFACTS?: Artifacts;","atom":"a1452","author":"speed","version":150},{"n":15,"text":"\t/** \"off\" leaves Artifacts alone even where it is bound: local `wrangler dev --local` binds it but cannot reach it. */","atom":"a1484","author":"speed","version":150},{"n":16,"text":"\tABSO_ARTIFACTS?: string;","atom":"a1484","author":"speed","version":150},{"n":17,"text":"\tCF_VERSION_METADATA?: WorkerVersionMetadata;","atom":"a1452","author":"speed","version":150},{"n":18,"text":"\t/** The shared token every agent signs in with. AVCS_TOKEN is its old name. With neither set, every call is refused. */","atom":"a1452","author":"speed","version":150},{"n":19,"text":"\tABSO_TOKEN?: string;","atom":"a1452","author":"speed","version":150},{"n":20,"text":"\tAVCS_TOKEN?: string;","atom":"a1452","author":"speed","version":150},{"n":21,"text":"\t/** For /admin/agent-keys, sent as the x-abso-admin header beside the shared token. */","atom":"a1452","author":"speed","version":150},{"n":22,"text":"\tABSO_ADMIN_TOKEN?: string;","atom":"a1452","author":"speed","version":150},{"n":23,"text":"\tAVCS_ADMIN_TOKEN?: string;","atom":"a1452","author":"speed","version":150},{"n":24,"text":"\t/** Per-agent keys: \"on\" with KEY_HMAC_SECRET set. */","atom":"a1452","author":"speed","version":150},{"n":25,"text":"\tAGENT_KEYS?: string;","atom":"a1452","author":"speed","version":150},{"n":26,"text":"\tKEY_HMAC_SECRET?: string;","atom":"a1452","author":"speed","version":150},{"n":27,"text":"\t/** \"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. */","atom":"a2291","author":"autosettle","version":204},{"n":28,"text":"\tAUTOSETTLE?: string;","atom":"a2197","author":"autosettle","version":196},{"n":29,"text":"\t/** Which model advises: clef (the default), clef-flash, or a Workers AI text model's id. */","atom":"a2240","author":"autosettle","version":201},{"n":30,"text":"\tAUTOSETTLE_MODEL?: string;","atom":"a2240","author":"autosettle","version":201},{"n":31,"text":"\t/** The confidence under which a lean to one side is left to an agent: 0.5 unless set. */","atom":"a2240","author":"autosettle","version":201},{"n":32,"text":"\tAUTOSETTLE_AT?: string;","atom":"a2240","author":"autosettle","version":201},{"n":33,"text":"\t/** Workers AI, for AUTOSETTLE. Unbound unless wrangler.jsonc names it. */","atom":"a2197","author":"autosettle","version":196},{"n":34,"text":"\tAI?: { run(model: string, input: unknown): Promise<unknown> };","atom":"a2197","author":"autosettle","version":196},{"n":35,"text":"}","atom":"a1452","author":"speed","version":150},{"n":36,"text":"","atom":"a1452","author":"speed","version":150},{"n":37,"text":"/** A secret by its abso name, or its avcs name from before the rename. Empty counts as unset. */","atom":"a1452","author":"speed","version":150},{"n":38,"text":"export function secret(env: Env, name: \"TOKEN\" | \"ADMIN_TOKEN\"): string | undefined {","atom":"a1452","author":"speed","version":150},{"n":39,"text":"\tfor (const v of [env[`ABSO_${name}`], env[`AVCS_${name}`]]) if (typeof v === \"string\" && v !== \"\") return v;","atom":"a1452","author":"speed","version":150},{"n":40,"text":"\treturn undefined;","atom":"a1452","author":"speed","version":150},{"n":41,"text":"}","atom":"a1484","author":"speed","version":150},{"n":42,"text":"","atom":"a1484","author":"speed","version":150},{"n":43,"text":"/** The Artifacts binding, unless it is unbound or ABSO_ARTIFACTS is \"off\": then nothing is pushed out or taken in. */","atom":"a1484","author":"speed","version":150},{"n":44,"text":"export function artifactsOf(env: Env): Artifacts | undefined {","atom":"a1484","author":"speed","version":150},{"n":45,"text":"\treturn env.ABSO_ARTIFACTS === \"off\" ? undefined : env.ARTIFACTS;","atom":"a1484","author":"speed","version":150},{"n":46,"text":"}","atom":"a1452","author":"speed","version":150}],"atoms":[{"atom":"a1452","author":"speed","message":"","time":1791906739189,"timeIso":"2026-10-13T15:52:19.189Z","publish":{"draft":null,"version":150,"agent":"speed","message":"Open server: the project Worker, Durable Object and Artifacts (issue 17)","time":1791907522179,"timeIso":"2026-10-13T16:05:22.179Z"}},{"atom":"a1484","author":"speed","message":"","time":1791907425388,"timeIso":"2026-10-13T16:03:45.388Z","publish":{"draft":null,"version":150,"agent":"speed","message":"Open server: the project Worker, Durable Object and Artifacts (issue 17)","time":1791907522179,"timeIso":"2026-10-13T16:05:22.179Z"}},{"atom":"a1595","author":"codex-capacity-chair","message":"","time":1791916379418,"timeIso":"2026-10-13T18:32:59.418Z","publish":{"draft":null,"version":158,"agent":"codex-capacity-chair","message":"Integrate opt-in disk-first project runtime with cold-object transactions","time":1791917879117,"timeIso":"2026-10-13T18:57:59.117Z"}},{"atom":"a2197","author":"autosettle","message":"","time":1792021639221,"timeIso":"2026-10-14T23:47:19.221Z","publish":{"draft":null,"version":196,"agent":"autosettle","message":"Auto-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.","time":1792021901137,"timeIso":"2026-10-14T23:51:41.137Z"}},{"atom":"a2240","author":"autosettle","message":"","time":1792024283505,"timeIso":"2026-10-15T00:31:23.505Z","publish":{"draft":null,"version":201,"agent":"autosettle","message":"Auto-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.","time":1792024417177,"timeIso":"2026-10-15T00:33:37.177Z"}},{"atom":"a2291","author":"autosettle","message":"","time":1792028480762,"timeIso":"2026-10-15T01:41:20.762Z","publish":{"draft":null,"version":204,"agent":"autosettle","message":"Auto-settle switch (abso 19): on advises, act also has the client settle\n\nAUTOSETTLE=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).","time":1792028481422,"timeIso":"2026-10-15T01:41:21.422Z"}}]}