caelum0x 695a365ae4 feat: PaperTrail — enterprise evidence-verification platform
Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a
deterministic verification core: clinical-trial claims checked against
ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI
recomputed in code, oracle-tested), code-enforced exact-span grounding, and
multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing
at scale (unpdf + Docling), agentic workflows, Claude Science connector,
compliance/audit, billing, public API, and more.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 07:21:22 +03:00

31 lines
1.1 KiB
TypeScript

import type { NextRequest } from "next/server";
import { withOrg, type Ctx } from "@/lib/api/handler";
import { ok } from "@/lib/api/response";
import { requireRole } from "@/lib/authz/rbac";
import { CATALOG_LIST } from "@/lib/connectors/catalog";
import { failFromError } from "../_lib";
export const runtime = "nodejs";
// GET /api/connectors/catalog — the provider catalog (display metadata,
// capabilities, and config field descriptors) used to render the catalog grid
// and per-provider config forms. Any member may read. Zod schemas are stripped
// from the response (they aren't serializable); the field descriptors carry the
// shape the client needs.
export const GET = withOrg(async (_req: NextRequest, ctx: Ctx) => {
try {
requireRole(ctx, "viewer");
const entries = CATALOG_LIST.map((e) => ({
provider: e.provider,
name: e.name,
category: e.category,
description: e.description,
fields: e.fields,
capabilities: e.capabilities,
}));
return ok(entries);
} catch (err: unknown) {
return failFromError(err, "Failed to load connector catalog.");
}
});