Add run manifest and logical output file contracts

This commit is contained in:
2026-07-04 00:45:21 +00:00
parent ac14667797
commit bc4203a264
10 changed files with 455 additions and 52 deletions

View File

@@ -182,8 +182,17 @@ type OutputRequest struct {
Metadata map[string]any `json:"metadata,omitempty"`
}
type OutputFile struct {
Name string `json:"name"`
ContentType string `json:"content_type,omitempty"`
Bytes []byte `json:"-"`
}
type OutputResult struct {
Bytes []byte `json:"-"`
Files []OutputFile `json:"files,omitempty"`
// Bytes is the legacy single-output payload. New encoders should return Files.
Bytes []byte `json:"-"`
// ContentType is the legacy single-output content type. New encoders should return Files.
ContentType string `json:"content_type,omitempty"`
Warnings []Warning `json:"warnings,omitempty"`
}
@@ -192,3 +201,7 @@ type OutputEncoder interface {
Key() string
Encode(ctx context.Context, req OutputRequest) (OutputResult, error)
}
type ManifestMetadataProvider interface {
ManifestMetadata() map[string]any
}