| 1 | |
| 2 | export interface Receipt { |
| 3 | id: string; |
| 4 | source: string; |
| 5 | path: string; |
| 6 | last_seen: string; |
| 7 | confidence: number; |
| 8 | snippet: string; |
| 9 | } |
| 10 | |
| 11 | export interface Hit { |
| 12 | engine: string; |
| 13 | title: string; |
| 14 | path: string; |
| 15 | snippet: string; |
| 16 | score: number; |
| 17 | last_seen: string; |
| 18 | confidence: number; |
| 19 | } |
| 20 | |
| 21 | export interface Conflict { |
| 22 | claim: string; |
| 23 | winner: string; |
| 24 | losers: string[]; |
| 25 | reason: string; |
| 26 | } |
| 27 | |
| 28 | export interface EngineStatus { |
| 29 | engine: string; |
| 30 | status: "up" | "down"; |
| 31 | ms?: number; |
| 32 | } |
| 33 | |
| 34 | export interface AskResponse { |
| 35 | answer: string | null; |
| 36 | receipts: Receipt[]; |
| 37 | hits: Hit[]; |
| 38 | conflicts: Conflict[]; |
| 39 | engines: EngineStatus[]; |
| 40 | took_ms: number; |
| 41 | } |
| 42 | |
| 43 | export interface HealthEngine { |
| 44 | engine: string; |
| 45 | status: "up" | "down"; |
| 46 | last_ingest: string; |
| 47 | staleness_h: number; |
| 48 | } |
| 49 | |
| 50 | export interface HealthResponse { |
| 51 | engines: HealthEngine[]; |
| 52 | ok: boolean; |
| 53 | } |
| 54 | |
| 55 | export type DataSource = |
| 56 | | "proxmox" |
| 57 | | "white-pc" |
| 58 | | "3060" |
| 59 | | "browser-history" |
| 60 | | "agents" |
| 61 | | "rag" |
| 62 | | "cbm" |
| 63 | | "serena" |
| 64 | | "memgraph" |
| 65 | | "inbox"; |
| 66 | |
| 67 | export interface OrganismNode { |
| 68 | id: DataSource; |
| 69 | label: string; |
| 70 | position: [number, number, number]; |
| 71 | health: "fresh" | "stale" | "dead"; |
| 72 | staleness_h: number; |
| 73 | connections: DataSource[]; |
| 74 | } |
| 75 | |
| 76 | export type AgentStatus = "active" | "idle" | "error"; |
| 77 | export type AgentType = "root" | "claude" | "codex" | "glm" | "scheduler" | "probe"; |
| 78 | |
| 79 | export interface AgentNode { |
| 80 | id: string; |
| 81 | label: string; |
| 82 | type: AgentType; |
| 83 | status: AgentStatus; |
| 84 | parentId: string | null; |
| 85 | lastActivity: string; |
| 86 | taskCount?: number; |
| 87 | } |
| 88 | |
| 89 | export interface OrganismContextValue { |
| 90 | healthData: HealthResponse | null; |
| 91 | focusSource: DataSource | null; |
| 92 | setFocusSource: (source: DataSource | null) => void; |
| 93 | isAsking: boolean; |
| 94 | setIsAsking: (v: boolean) => void; |
| 95 | } |