chore: snapshot working tree - pty_exited notifications + in-flight inference WIP

feat(booterm): structured pty_exited WS notifications. Plan-validated, impl-validated, code-reviewed green (contracts build clean, contracts test 29/29, booterm + web typecheck clean).

wip: in-progress inference/provider refactor (agents.ts, provider.ts, new llama-providers.ts, removed llama-args-validator), plus arena, dispatcher, compaction, schema changes.

openspec: pty-exit-notifications complete; x-agent-flags planned (not yet implemented).
This commit is contained in:
2026-06-14 12:48:47 +00:00
parent 0ed506f1da
commit b18de2a331
204 changed files with 25344 additions and 867 deletions

View File

@@ -0,0 +1,29 @@
import { z } from 'zod';
const schema = z.object({
NODE_ENV: z.enum(['development', 'production']).default('production'),
PORT: z.coerce.number().default(9503),
HOST: z.string().default('100.114.205.53'),
DATABASE_URL: z.string(),
LOG_LEVEL: z.enum(['fatal', 'error', 'warn', 'info', 'debug', 'trace']).default('info'),
RETENTION_RAW_HOURS: z.coerce.number().default(48),
RETENTION_ROLLUP_DAYS: z.coerce.number().default(90),
CAPTURE_SIZE_KB: z.coerce.number().default(256),
CAPTURE_BUDGET_MB: z.coerce.number().default(50),
LLAMA_PROVIDERS_PATH: z.string().optional(),
LLAMA_SWAP_URL: z.string().default('http://localhost:8080'),
// P9.1: path to the llama-swap config-schema.json (fork). Defaults to the
// copy bundled under dist/data; override to point at the live fork schema.
LLAMA_CONFIG_SCHEMA_PATH: z.string().optional(),
});
export type Config = z.infer<typeof schema>;
export function loadConfig(): Config {
const result = schema.safeParse(process.env);
if (!result.success) {
console.error('Invalid env:', result.error.message);
process.exit(1);
}
return result.data;
}