Replace evidence context with source unit excerpts

This commit is contained in:
2026-08-09 19:42:33 +00:00
parent ad1cba41c2
commit 071a78ae22
10 changed files with 650 additions and 584 deletions

View File

@@ -14,37 +14,12 @@ const (
MediaType = "application/json"
)
// Document is the durable union of direct evidence and surrounding source
// context selected for one accepted source document.
type Document struct {
SourceID string `json:"source_id"`
SourceDigest string `json:"source_digest"`
WindowUnits int `json:"window_units"`
SelectedLanes []string `json:"selected_lanes"`
Contexts []Context `json:"contexts"`
}
// Document is the durable selected source-unit excerpt.
type Document []source.SourceUnit
type Context struct {
ContextRef source.SourceRef `json:"context_ref"`
EvidenceRefs []EvidenceRef `json:"evidence_refs"`
Units []source.SourceUnit `json:"units"`
}
type EvidenceRef struct {
LaneID string `json:"lane_id"`
SourceRef source.SourceRef `json:"source_ref"`
}
// LaneEvidence attributes direct source references to one selected lane.
type LaneEvidence struct {
LaneID string `json:"lane_id"`
SourceRefs []source.SourceRef `json:"source_refs"`
}
// BuildRequest supplies accepted source material and direct lane evidence.
// BuildRequest supplies accepted source material and projected source references.
type BuildRequest struct {
Source *source.SourceDocument
WindowUnits int
SelectedLanes []string
LaneEvidence []LaneEvidence
Source *source.SourceDocument
WindowUnits int
SourceRefs []source.SourceRef
}