(scriptPath string)
| 31 | } |
| 32 | |
| 33 | func loadScript(scriptPath string) ([]ScriptEntry, error) { |
| 34 | data, err := os.ReadFile(scriptPath) |
| 35 | if err != nil { |
| 36 | return nil, fmt.Errorf("failed to read script file: %w", err) |
| 37 | } |
| 38 | |
| 39 | var script []ScriptEntry |
| 40 | if err := json.Unmarshal(data, &script); err != nil { |
| 41 | return nil, fmt.Errorf("failed to parse script JSON: %w", err) |
| 42 | } |
| 43 | |
| 44 | return script, nil |
| 45 | } |
| 46 | |
| 47 | func runEchoAgent(scriptPath string) { |
| 48 | script, err := loadScript(scriptPath) |