Complete Promptkit batch execution cutover

This commit is contained in:
2026-07-31 04:56:48 +00:00
parent a6d11c01e8
commit 2c68d0a85f
23 changed files with 377 additions and 8160 deletions

View File

@@ -59,6 +59,9 @@ func mergeFile(cfg *Config, path string) error {
if err != nil {
return fmt.Errorf("read config %q: %w", path, err)
}
if err := rejectRetiredExecutionConfig(data); err != nil {
return fmt.Errorf("parse config %q: %w", path, err)
}
if err := yaml.Unmarshal(data, cfg); err != nil {
return fmt.Errorf("parse config %q: %w", path, err)
}
@@ -70,3 +73,20 @@ func mergeFile(cfg *Config, path string) error {
}
return nil
}
func rejectRetiredExecutionConfig(data []byte) error {
var document yaml.Node
if err := yaml.Unmarshal(data, &document); err != nil {
return err
}
if len(document.Content) == 0 || document.Content[0].Kind != yaml.MappingNode {
return nil
}
root := document.Content[0]
for i := 0; i+1 < len(root.Content); i += 2 {
if root.Content[i].Value == "scriptorium" {
return fmt.Errorf("scriptorium configuration is no longer supported; migrate to promptkit configuration")
}
}
return nil
}