feat: support multi-round upstream captures in raw sample generation

This commit is contained in:
CJACK
2026-04-05 22:48:41 +08:00
parent 2a6b787f38
commit 84813eca80
4 changed files with 222 additions and 36 deletions

View File

@@ -15,15 +15,23 @@ import (
var referenceMarkerRe = regexp.MustCompile(`(?i)\[reference:\s*\d+\]`)
type CaptureRound struct {
Label string `json:"label,omitempty"`
URL string `json:"url,omitempty"`
StatusCode int `json:"status_code"`
ResponseBytes int `json:"response_bytes"`
}
type CaptureSummary struct {
Label string `json:"label,omitempty"`
URL string `json:"url,omitempty"`
StatusCode int `json:"status_code"`
ResponseBytes int `json:"response_bytes"`
ContainsReferenceMarkers bool `json:"contains_reference_markers,omitempty"`
ReferenceMarkerCount int `json:"reference_marker_count,omitempty"`
ContainsFinishedToken bool `json:"contains_finished_token,omitempty"`
FinishedTokenCount int `json:"finished_token_count,omitempty"`
Label string `json:"label,omitempty"`
URL string `json:"url,omitempty"`
StatusCode int `json:"status_code"`
ResponseBytes int `json:"response_bytes"`
Rounds []CaptureRound `json:"rounds,omitempty"`
ContainsReferenceMarkers bool `json:"contains_reference_markers,omitempty"`
ReferenceMarkerCount int `json:"reference_marker_count,omitempty"`
ContainsFinishedToken bool `json:"contains_finished_token,omitempty"`
FinishedTokenCount int `json:"finished_token_count,omitempty"`
}
type Meta struct {