eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 799 B
JavaScript
function defineEvalConfig(e){return validateEvalConfigInput(e),{...e,_tag:`EveEvalConfig`}}function validateEvalConfigInput(e){if(e.setup!==void 0&&typeof e.setup!=`function`)throw Error("Eval config `setup` must be a function.");if(e.teardown!==void 0&&typeof e.teardown!=`function`)throw Error("Eval config `teardown` must be a function.");if(e.maxConcurrency!==void 0&&(!Number.isInteger(e.maxConcurrency)||e.maxConcurrency<1))throw Error("Eval config `maxConcurrency` must be a positive integer.");if(e.timeoutMs!==void 0&&(e.timeoutMs<0||!Number.isFinite(e.timeoutMs)))throw Error("Eval config `timeoutMs` must be a non-negative finite number.");if(e.reporters!==void 0&&!Array.isArray(e.reporters))throw Error("Eval config `reporters` must be an array of reporters.")}export{defineEvalConfig};