Add campaign configuration support

This commit is contained in:
2026-05-20 20:41:28 -05:00
parent dffb432537
commit b29d8eeb50
34 changed files with 865 additions and 182 deletions

View File

@@ -1,11 +1,16 @@
package config
// Config is the resolved combined configuration from pipeline.yml and session.yml.
// Config is the resolved combined configuration from pipeline.yml,
// campaign.yml, and session.yml.
type Config struct {
Pipeline *PipelineConfig
Campaign *CampaignConfig
Session *SessionConfig
PipelinePath string
CampaignPath string
SessionPath string
StableInputs ResolvedStableInputs
}
// PipelineConfig contains durable pipeline-level settings.
@@ -25,6 +30,19 @@ type PipelineConfig struct {
Notification NotificationConfig `yaml:"notification"`
}
// CampaignConfig contains stable campaign-level identity and input defaults.
type CampaignConfig struct {
Campaign string `yaml:"campaign"`
Inputs CampaignInputsConfig `yaml:"inputs"`
}
// CampaignInputsConfig contains stable campaign-level input file references.
type CampaignInputsConfig struct {
SpeakersFile string `yaml:"speakers_file"`
AutocorrectFile string `yaml:"autocorrect_file"`
GlossaryFile string `yaml:"glossary_file"`
}
// SessionConfig contains per-session inputs and metadata.
type SessionConfig struct {
SessionID string `yaml:"session_id"`
@@ -229,3 +247,18 @@ type SessionInputsConfig struct {
type SessionAudioS3Input struct {
Prefix string `yaml:"prefix"`
}
// ResolvedStableInputs records where stable input file paths came from after
// campaign/session merge.
type ResolvedStableInputs struct {
SpeakersFile ResolvedInputFile
AutocorrectFile ResolvedInputFile
GlossaryFile ResolvedInputFile
}
// ResolvedInputFile records one merged config path and its source config file.
type ResolvedInputFile struct {
Path string
ConfigPath string
Source string
}