caelum0x 174222bcaa feat: Builder-Track named-user tools, bio + evidence-intelligence platform, Apache-2.0
Builds PaperTrail from the base skeleton into a full evidence-verification platform
for the "Built with Claude: Life Sciences" hackathon (Builder Track).

New named-user features (Build Beyond the Bench):
- Lab Notebook Companion — rough bench notes -> structured, searchable, grounded
  experiment records (lib/labNotebook, /console/lab-notebook, migration 0059)
- Clinical Trial Matcher — de-identified patient notes -> ranked eligible
  ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning
  (lib/trialMatcher, /console/trial-matcher, migrations 0060)

Platform:
- Deterministic verification moat (biostats recompute, exact-span grounding)
- 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar,
  PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier)
- Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise
  governance (RBAC, /api/v1 gateway, metering, audit chain, retention)
- 17 OSS projects assimilated into native TypeScript on our stack (backend/engines
  retained + credited in NOTICE)
- Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site
- Next.js 16 upgrade, benchmark harness (honest smoke-test caveat)

Licensing: Apache-2.0 (LICENSE + NOTICE).
2026-07-10 16:23:13 +03:00

52 lines
1.8 KiB
TypeScript

import type { Citation } from "@/lib/copilot/schemas";
// The grounded citation trail for an answer: numbered chips linking out to each
// primary source the copilot's tools actually returned. The [n] markers match the
// inline citations in the answer text. Because these come only from tool results,
// every chip points at a real cached source — nothing here is model-fabricated.
interface CitationChipsProps {
citations: Citation[];
}
const TYPE_LABELS: Record<string, string> = {
pubmed: "PubMed",
clinicaltrials: "ClinicalTrials.gov",
};
export function CitationChips({ citations }: CitationChipsProps) {
if (citations.length === 0) return null;
return (
<div className="mt-3 border-t border-ink/10 pt-2">
<div className="mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-ink/30">
Sources
</div>
<div className="flex flex-col gap-1">
{citations.map((c) => (
<a
key={c.index}
href={c.url}
target="_blank"
rel="noopener noreferrer"
className="group flex items-start gap-2 text-xs text-ink/70 hover:text-accent"
>
<span className="mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-ink/10 text-[10px] font-medium text-ink/60 group-hover:bg-accent/15 group-hover:text-accent">
{c.index}
</span>
<span className="min-w-0">
<span className="group-hover:underline">
{c.title ?? c.external_id ?? c.url}
</span>
<span className="ml-1.5 text-[10px] text-ink/35">
{TYPE_LABELS[c.source_type] ?? c.source_type}
{c.external_id ? ` · ${c.external_id}` : ""}
</span>
</span>
</a>
))}
</div>
</div>
);
}