codetether_rlm/context_index/
types.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct ContextIndex {
8 pub source: String,
9 pub hash: u64,
10 pub symbols: Vec<String>,
11 pub records: Vec<EvidenceRecord>,
12}
13
14#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
16pub enum EvidenceKind {
17 Symbol,
18 Import,
19 Error,
20 Text,
21}
22
23#[derive(Debug, Clone, Copy, PartialEq, Eq)]
25pub enum PlanIntent {
26 Debug,
27 Symbol,
28 Summary,
29}
30
31#[derive(Debug, Clone, Serialize, Deserialize)]
33pub struct EvidenceRecord {
34 pub id: usize,
35 pub source: String,
36 pub kind: EvidenceKind,
37 pub span: (usize, usize),
38 pub symbols: Vec<String>,
39 pub score: f32,
40 pub reason: String,
41 pub text: String,
42}
43
44#[derive(Debug, Clone)]
46pub struct RetrievalPlan {
47 pub terms: Vec<String>,
48 pub budget_tokens: usize,
49 pub intent: PlanIntent,
50}