feat(v0.6): AgentSpec field on TaskMeta with backward-compat unmarshal
Replace TaskMeta.Agent (string) with TaskMeta.Agent (AgentSpec) carrying type/command/args/env. Custom UnmarshalYAML preserves the legacy scalar form: a built-in name (claude, opencode) maps to that type; any other scalar maps to type=custom with the scalar as command. A missing agent field leaves Type empty so the resolver fills in default_agent at launch. ValidateAgentSpec enforces: known type (claude|opencode|custom), type=custom requires command, command must be an executable name or path with no whitespace or shell metacharacters. Launch-path wiring (Task 3) and the --agent flag rework (Task 4) are intentionally not part of this commit; cmd/* call sites are patched to the minimum needed for the build to compile.
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ func runInfo(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("Category: %s\n", m.Category)
|
||||
fmt.Printf("Status: %s\n", m.Status)
|
||||
fmt.Printf("Mode: %s\n", m.Mode)
|
||||
fmt.Printf("Agent: %s\n", agentLineWithSource(m.Agent, resolver))
|
||||
fmt.Printf("Agent: %s\n", agentLineWithSource(m.Agent.Type, resolver))
|
||||
fmt.Printf("Launch session mode: %s (%s)\n",
|
||||
resolver.SessionMode().Value, infoSourceLabel(resolver.SessionMode()))
|
||||
// v0.5.1: display timestamps in local time. task.yaml stores UTC;
|
||||
|
||||
Reference in New Issue
Block a user