Validates orchestration environment variables using Zod and provides preflight checks.
// Source: https://github.com/hoangsonww/AI-Gov-Content-Curator | License: MIT | Copyright 2026 Son Nguyen
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Runtime configuration with Zod validation.
*
* Validates environment variables at startup so the orchestration layer
* fails fast with actionable messages instead of mysterious SDK errors.
*/
import { z } from "zod";
// ---------------------------------------------------------------------------
// Schema
// ---------------------------------------------------------------------------
const orchestrationEnvSchema = z.object({
/** Anthropic API key (required for Anthropic-backed agents). */
ANTHROPIC_API_KEY: z.string().min(1).optional(),
/** Google AI API key (required for Google-backed agents). */
GO
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key