Adapter wiring. Both Cloudflare (D1) and Node (any OmaDb) deployment factories live here behind a single SqlEvalRunRepo class.
// Source: https://github.com/openma-ai/open-managed-agents | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Adapter wiring. Both Cloudflare (D1) and Node (any OmaDb)
// deployment factories live here behind a single SqlEvalRunRepo class.
export { SqlEvalRunRepo } from "./sql-eval-run-repo";
import { drizzle } from "drizzle-orm/d1";
import { SqlEvalRunRepo } from "./sql-eval-run-repo";
import type { OmaDb } from "@open-managed-agents/db-schema";
import type { Logger } from "../ports";
import { EvalRunService } from "../service";
export function createCfEvalRunService(
deps: { db: D1Database },
opts?: { logger?: Logger },
): EvalRunService {
const drz = drizzle(deps.db);
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key