const allowedServices = new Set(["ai", "ai-gateway-service-id", "resend", "amap"]); function argument(name) { const index = process.argv.indexOf(name); return index >= 0 ? process.argv[index + 1] : undefined; } const service = argument("--service"); const runId = argument("--run-id"); const model = argument("--model"); if (!allowedServices.has(service) || !runId || ((service === "ai" || service === "ai-gateway-service-id") && !model)) { console.error("Usage: pnpm validate:external -- --service --run-id [--model ]"); process.exit(2); } console.log( JSON.stringify({ blocker: service === "ai" || service === "ai-gateway-service-id" ? "real_gateway_credentials_absent" : undefined, mode: "mock", model, real_calls: 0, run_id: runId, service, status: service === "ai" || service === "ai-gateway-service-id" ? "not_applicable" : "not_applicable_for_TASK-WP0-01", }), );