Add run manifest and logical output file contracts
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user