Add durable prompt execution state records

This commit is contained in:
2026-07-31 04:13:00 +00:00
parent b0b703eab4
commit a52a6ed22a
9 changed files with 619 additions and 65 deletions

View File

@@ -94,6 +94,9 @@ type ReportResult struct {
ModuleSnapshotPath string
DataPackage promptinput.Package
DataPackagePath string
PreparationPath string
ExecutionPath string
LLMDebugPath string
PreflightPath string
ReportPath string
OutputPath string
@@ -156,7 +159,9 @@ type BatchReportResult struct {
GeneratedAt time.Time `json:"generatedAt"`
ValidPeriod timeutil.Period `json:"validPeriod"`
DataPackagePath string `json:"dataPackagePath,omitempty"`
PreflightPath string `json:"preflightPath,omitempty"`
PreparationPath string `json:"preparationPath,omitempty"`
ExecutionPath string `json:"executionPath,omitempty"`
LLMDebugPath string `json:"llmDebugPath,omitempty"`
ReportPath string `json:"reportPath,omitempty"`
OutputPath string `json:"outputPath,omitempty"`
MetadataPath string `json:"metadataPath,omitempty"`
@@ -330,7 +335,7 @@ func RunBatchDetailed(ctx context.Context, req BatchRequest) (*BatchResult, erro
item := batchReportResult(planned)
if paths, err := store.Paths(resolved); err == nil {
item.DataPackagePath = paths.DataPackage
item.PreflightPath = paths.Preflight
item.PreparationPath = paths.Preflight
item.ReportPath = paths.RenderedReport
item.MetadataPath = paths.Metadata
}
@@ -361,7 +366,9 @@ func RunBatchDetailed(ctx context.Context, req BatchRequest) (*BatchResult, erro
} else {
item.Status = "succeeded"
item.DataPackagePath = reportResult.DataPackagePath
item.PreflightPath = reportResult.PreflightPath
item.PreparationPath = reportResult.PreparationPath
item.ExecutionPath = reportResult.ExecutionPath
item.LLMDebugPath = reportResult.LLMDebugPath
item.ReportPath = reportResult.ReportPath
item.OutputPath = reportResult.OutputPath
item.MetadataPath = reportResult.MetadataPath
@@ -786,6 +793,8 @@ func renderedReportResult(req reportResultRequest) *ReportResult {
ModuleSnapshotPath: req.moduleSnapshotPath,
DataPackage: req.dataPackage,
DataPackagePath: req.dataPackagePath,
PreparationPath: req.preflightPath,
ExecutionPath: req.generatedTextResultPath,
PreflightPath: req.preflightPath,
ReportPath: req.reportPath,
OutputPath: req.finalized.OutputPath,