case0 / web /src /types.ts
HusseinEid's picture
Case Zero - initial public release (fully local: Qwen2.5-1.5B via llama.cpp + Supertonic, custom pixel-noir SPA via gradio.Server)
414dc55
raw
history blame
2.25 kB
// TS mirror of the server's PUBLIC wire contract (src/case_zero/api/public_view.py).
export interface Victim {
name: string
role: string
age: number
sprite: string
bio: string
}
export interface SuggestedQuestion {
id: string
q: string
}
export interface Suspect {
id: string
name: string
role: string
age: number
sprite: string
gender: string
tag: string
baselineSuspicion: number
motive: string
alibi: string
quote: string
greet: string
suggestedQuestions: SuggestedQuestion[]
}
export interface ThreadMessage {
from: 'me' | 'them'
who: string
t: string
m: string
}
export interface Evidence {
id: string
name: string
type: string
icon: string
time: string
found: string
summary: string
thread?: ThreadMessage[]
detail?: string
transcript?: string
dur?: string
rows?: string[][]
}
export interface TimelineBeat {
time: string
label: string
locked: boolean
ev?: string | null
conflict: boolean
}
export interface FlashbackAccount {
who: string
scene: string
lines: string[]
flags: number[]
}
export interface Flashback {
title: string
a: FlashbackAccount
b: FlashbackAccount
}
export interface Motive {
id: string
text: string
}
export interface StoryBeat {
scene: string
kicker: string
title: string
text: string
}
export interface PublicCase {
id: string
city: string
district: string
title: string
tagline: string
weather: string
victim: Victim
scene: string
tod: string
found: string
cause: string
facts: [string, string][]
bootLines: string[]
storyBeats: StoryBeat[]
suspects: Suspect[]
evidence: Evidence[]
timeline: TimelineBeat[]
flashback: Flashback
motives: Motive[]
}
// --- interrogation / verdict wire shapes ---
export interface InterrogateResult {
reply: string
suspicionDelta: number
suspicion: number
flags: { rattled?: boolean; contradictionExposed?: boolean; cornered?: boolean }
}
export interface VerdictResult {
correct: boolean
verdict: { stamp: string; killerId: string; killerName: string; truth: string }
score: { points: number; max: number; killerCorrect: boolean; motiveCorrect: boolean; evidenceHits: number }
stats: [string, string][]
}