{"file":"server/src/env.ts","version":190,"total":38,"from":1,"to":38,"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":"}","atom":"a1452","author":"speed","version":150},{"n":28,"text":"","atom":"a1452","author":"speed","version":150},{"n":29,"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":30,"text":"export function secret(env: Env, name: \"TOKEN\" | \"ADMIN_TOKEN\"): string | undefined {","atom":"a1452","author":"speed","version":150},{"n":31,"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":32,"text":"\treturn undefined;","atom":"a1452","author":"speed","version":150},{"n":33,"text":"}","atom":"a1484","author":"speed","version":150},{"n":34,"text":"","atom":"a1484","author":"speed","version":150},{"n":35,"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":36,"text":"export function artifactsOf(env: Env): Artifacts | undefined {","atom":"a1484","author":"speed","version":150},{"n":37,"text":"\treturn env.ABSO_ARTIFACTS === \"off\" ? undefined : env.ARTIFACTS;","atom":"a1484","author":"speed","version":150},{"n":38,"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"}}]}