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

43 lines
1013 B
TypeScript

// Shared types for global search, imported by both the API route and the
// console UI so the response shape stays in sync.
export const SEARCH_TYPES = [
"claim",
"document",
"evidence",
"verification",
] as const;
export type SearchType = (typeof SEARCH_TYPES)[number];
// A single hit. `title` is the primary label, `snippet` an optional secondary
// line (e.g. a matched excerpt), `href` a console link to the entity.
export interface SearchResult {
id: string;
type: SearchType;
title: string;
snippet: string | null;
href: string;
createdAt: string | null;
}
// Results grouped by entity type, in a stable display order.
export interface SearchGroup {
type: SearchType;
label: string;
results: SearchResult[];
}
export interface SearchResponse {
query: string;
total: number;
groups: SearchGroup[];
}
export const SEARCH_TYPE_LABELS: Record<SearchType, string> = {
claim: "Claims",
document: "Documents",
evidence: "Evidence",
verification: "Verifications",
};