package main import ( "path/filepath" "strings" "testing" "github.com/stretchr/testify/require" ) // daemonChildConfig writes a complete child config in its own directory. func daemonChildConfig(t *testing.T, dir, name string) string { t.Helper() root, err := openAgent(filepath.Join(dir, daemonAgentDirName)) require.NoError(t, err) path := filepath.Join(root.dir, "children", name) child, err := openAgent(path) require.NoError(t, err) config := child.config config.Name = name config.Model = "gpt-test-" + strings.ToLower(name) config.Effort = "high" config.Parent = root.config.Name config.Responsibility = "Keep the plans and decisions for " + name + "." config.Workdir = dir agentWriteTestConfig(t, path, config) return path }