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).
47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
import type { DataChatToolTrace } from "./types";
|
|
|
|
// Transparent trace of the tools the data-chat agent 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 from
|
|
// the org's own data — the visible proof the agent reasons over real org-scoped
|
|
// queries, not memory.
|
|
|
|
const TOOL_LABELS: Record<string, string> = {
|
|
list_evidence_reports: "List reports",
|
|
get_evidence_report: "Get report",
|
|
search_org_sources: "Search sources",
|
|
search_claims: "Search claims",
|
|
get_claim: "Get claim",
|
|
};
|
|
|
|
interface ToolTracePillsProps {
|
|
trace: DataChatToolTrace[];
|
|
}
|
|
|
|
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>
|
|
);
|
|
}
|