| export interface StreamEvent { |
| type: |
| | "text_delta" |
| | "tool_use" |
| | "tool_result" |
| | "done" |
| | "error" |
| |
| | "kb_lookup" |
| | "plan" |
| | "trace" |
| | "artifact" |
| | "citation" |
| | "step_status"; |
| text?: string; |
| tool?: string; |
| input?: Record<string, unknown>; |
| result?: unknown; |
| response?: string; |
| error?: string; |
| |
| kb?: { name: string; ms: number }; |
| plan?: PlanProposal; |
| trace?: TraceEntry; |
| artifact?: Artifact; |
| citation?: Citation; |
| step?: { index: number; status: StepStatus }; |
| } |
|
|
| export interface ChatMessage { |
| id: string; |
| role: "user" | "assistant"; |
| content: string; |
| toolCalls?: ToolCall[]; |
| kbLookups?: KBLookup[]; |
| trace?: TraceEntry[]; |
| plan?: PlanProposal; |
| artifacts?: Artifact[]; |
| citations?: Citation[]; |
| |
| stepStatus?: StepStatus[]; |
| isStreaming?: boolean; |
| } |
|
|
| export interface ToolCall { |
| tool: string; |
| input: Record<string, unknown>; |
| result?: unknown; |
| status: "running" | "completed" | "error"; |
| } |
|
|
| |
|
|
| export interface KBLookup { |
| name: string; |
| ms: number; |
| } |
|
|
| export interface PlanStepProto { |
| label: string; |
| tools: string[]; |
| } |
|
|
| export interface PlanProposal { |
| title: string; |
| steps: PlanStepProto[]; |
| } |
|
|
| export interface TraceEntry { |
| ts: number; |
| kind: "thought" | "tool_call" | "tool_result" | "text"; |
| label: string; |
| detail?: string; |
| } |
|
|
| export interface Artifact { |
| id: string; |
| name: string; |
| bytes: number; |
| mime: string; |
| url: string; |
| createdAt: number; |
| hubOutputData?: Record<string, unknown>; |
| } |
|
|
| export interface Citation { |
| label: string; |
| url?: string; |
| } |
|
|
| |
|
|
| export interface TaskRecord { |
| id: string; |
| projectId: string; |
| title: string; |
| createdAt: number; |
| updatedAt: number; |
| messages: ChatMessage[]; |
| artifacts: Artifact[]; |
| } |
|
|
| export interface ProjectRecord { |
| id: string; |
| name: string; |
| createdAt: number; |
| } |
|
|
| export interface Benchmark { |
| source: string; |
| paper_title: string; |
| paper_url: string; |
| paper_date: string; |
| avg_hit_rate_vhh: number | null; |
| avg_hit_rate_mab: number | null; |
| target_coverage: number | null; |
| best_affinity_pM: number | null; |
| total_designs_tested: number; |
| code_available: boolean; |
| weights_available: boolean; |
| developability: { overall_pass_rate: number | null } | null; |
| targets: { name: string; target_class: string }[]; |
| binding_results: { |
| target: string; |
| antibody_format: string; |
| hit_rate: number | null; |
| best_affinity_nM: number | null; |
| assay: string; |
| notes: string; |
| }[]; |
| notes: string; |
| } |
|
|
| export interface Skill { |
| id: string; |
| name: string; |
| description: string; |
| version: string; |
| author: string; |
| inputs: Record<string, unknown>; |
| outputs: Record<string, unknown>; |
| |
| category?: string; |
| tier?: string; |
| gpu?: boolean; |
| gpuType?: string; |
| minRamGb?: number; |
| typicalRuntimeSeconds?: number; |
| } |
|
|
| |
|
|
| export interface DatasetSearchResult { |
| id: string; |
| source: "sabdab" | "oas" | "imgt" | "fc"; |
| title: string; |
| summary: string; |
| organism?: string; |
| data_type: "structure" | "sequence" | "gene"; |
| } |
|
|
| export interface DatasetSearchResponse { |
| results: Record<string, DatasetSearchResult[]>; |
| errors: Record<string, string>; |
| query: Record<string, unknown>; |
| } |
|
|
| export interface SyncStatusEntry { |
| source: string; |
| last_synced: string | null; |
| entry_count: number; |
| size_bytes: number; |
| status: "synced" | "syncing" | "error" | "not_synced" | "not_configured"; |
| } |
|
|
| export type ResourceKind = "target" | "benchmark" | "model" | "skill" | "sabdab" | "imgt" | "oas"; |
|
|
| export interface ResourceRef { |
| type: ResourceKind; |
| id: string; |
| label: string; |
| sublabel?: string; |
| } |
|
|
| export interface ModelEntry { |
| name: string; |
| version: string; |
| source: string; |
| capabilities: string[]; |
| repo_url: string | null; |
| license: string | null; |
| gpu_required: boolean; |
| min_vram_gb: number; |
| antibody_formats: string[]; |
| notes: string; |
| } |
|
|
| export type StepStatus = "pending" | "running" | "done" | "error"; |
|
|