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

44 lines
1.4 KiB
TypeScript

import type { ToolTrace } from "@/lib/copilot/schemas";
// Transparent trace of the tools the copilot invoked for a turn, rendered as
// pills. Each pill shows the tool name and a one-line summary of what it returned
// (or the error), so a reviewer can see exactly how the answer was assembled —
// this is the visible proof the copilot reasons over real engine calls, not memory.
const TOOL_LABELS: Record<string, string> = {
search_sources: "Search sources",
verify_claim: "Verify claim",
run_synthesis: "Run synthesis",
};
interface ToolTracePillsProps {
trace: ToolTrace[];
}
export function ToolTracePills({ trace }: ToolTracePillsProps) {
if (trace.length === 0) return null;
return (
<div className="mt-2 flex flex-wrap gap-1.5">
{trace.map((t, i) => {
const label = TOOL_LABELS[t.tool] ?? t.tool;
return (
<span
key={`${t.tool}-${i}`}
className={`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] ${
t.ok
? "border-accent/30 bg-accent/5 text-accent"
: "border-red-300 bg-red-50 text-red-700"
}`}
title={t.error ?? `${t.durationMs}ms`}
>
<span className="font-medium">{label}</span>
<span className="opacity-60">·</span>
<span className="opacity-80">{t.ok ? t.summary : t.error ?? "failed"}</span>
</span>
);
})}
</div>
);
}