import { allSettings, getEnv } from "@autoscholar/core"; import { auditEvents } from "@autoscholar/db"; import { desc } from "drizzle-orm"; import { fmtDateTime } from "@/lib/format"; import { db } from "@/lib/server/db"; import { currentSession } from "@/lib/server/session"; import { SettingsControls } from "./SettingsControls"; export const dynamic = "force-dynamic"; export default async function SettingsPage() { const d = db(); const env = getEnv(); const settings = await allSettings(d); const audit = await d.select().from(auditEvents).orderBy(desc(auditEvents.createdAt)).limit(100); const sess = await currentSession(); return (

Founder controls

Settings & security

Environment and providers

Publishing (env)
{env.PUBLISHING_ENABLED === 1 ? "enabled" : "DISABLED"}
Dispatch (env)
{env.DISPATCH_ENABLED === 1 ? "enabled" : "DISABLED"}
Staging mode
{env.STAGING_MODE === 1 ? "on (noindex, synthetic sample allowed)" : "off"}
Research model
{env.ANTHROPIC_MODEL}
Reviewer model
{env.ANTHROPIC_REVIEWER_MODEL}
Default caps
${env.DEFAULT_MAX_BUDGET_USD} · {env.DEFAULT_MAX_RUNTIME_MINUTES} min
Lease TTL
{env.LEASE_TTL_SECONDS}s
Enrollment secret
{env.WORKER_ENROLLMENT_SECRET ? "configured" : "not set"}
Anthropic key on control plane
{process.env.ANTHROPIC_API_KEY ? "present (not needed here)" : "absent (expected: keys live on workers)"}
Session
{sess?.username} · expires {fmtDateTime(sess?.expiresAt)}

Audit log (latest 100)

{audit.length === 0 && ( )} {audit.map((a) => ( ))}
When Actor Action Target Detail
Empty.
{fmtDateTime(a.createdAt)} {a.actorType} {a.actorId ? `:${a.actorId.slice(0, 8)}` : ""} {a.action} {a.targetType} {a.targetId?.slice(0, 8)} {JSON.stringify(a.detail)}
); }