Add Scriptorium render diagnostics
This commit is contained in:
@@ -94,13 +94,14 @@ type ScriptoriumConfig struct {
|
||||
|
||||
// ScriptoriumArtifactConfig configures one named output artifact workflow.
|
||||
type ScriptoriumArtifactConfig struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
PromptID string `yaml:"prompt_id"`
|
||||
ProfileID string `yaml:"profile_id"`
|
||||
OutputPath string `yaml:"output_path"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
Inputs map[string]ScriptoriumInputConfig `yaml:"inputs"`
|
||||
Vars map[string]any `yaml:"vars"`
|
||||
Enabled bool `yaml:"enabled"`
|
||||
RenderDebug *bool `yaml:"render_debug"`
|
||||
PromptID string `yaml:"prompt_id"`
|
||||
ProfileID string `yaml:"profile_id"`
|
||||
OutputPath string `yaml:"output_path"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
Inputs map[string]ScriptoriumInputConfig `yaml:"inputs"`
|
||||
Vars map[string]any `yaml:"vars"`
|
||||
}
|
||||
|
||||
// ScriptoriumInputConfig configures one named prompt input source.
|
||||
|
||||
@@ -108,6 +108,30 @@ func TestScriptoriumLoadAndValidate(t *testing.T) {
|
||||
output_kind: session_recap
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "artifact render_debug override is accepted",
|
||||
scriptoriumYAML: `scriptorium:
|
||||
binary: scriptorium
|
||||
render_debug: false
|
||||
artifacts:
|
||||
session_recap:
|
||||
enabled: true
|
||||
render_debug: true
|
||||
prompt_id: dnd.session_recap
|
||||
output_path: artifacts/session_recap.md
|
||||
inputs:
|
||||
transcript:
|
||||
source: processed_transcript
|
||||
required: true
|
||||
`,
|
||||
assert: func(t *testing.T, cfg *Config) {
|
||||
t.Helper()
|
||||
artifact := cfg.Pipeline.Scriptorium.Artifacts["session_recap"]
|
||||
if artifact.RenderDebug == nil || *artifact.RenderDebug != true {
|
||||
t.Fatalf("artifact render_debug = %#v, want true", artifact.RenderDebug)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "multiple artifact definitions can be decoded",
|
||||
scriptoriumYAML: `scriptorium:
|
||||
|
||||
Reference in New Issue
Block a user