// Package task 定义 Agent 远程任务类型。 // Logan.Li package task const ( TypeCommand = "command" // 单条 shell/PowerShell 命令 // Logan.Li TypeScript = "script" // 多行脚本 // Logan.Li ) // Task 表示从后端拉取到的待执行任务。 // Logan.Li type Task struct { TaskID string `json:"task_id"` Type string `json:"type"` Command string `json:"command"` Timeout int `json:"timeout"` } // Result 表示任务执行结果,用于回传后端。 // Logan.Li type Result struct { TaskID string `json:"task_id"` ExitCode int `json:"exit_code"` Result string `json:"result"` Status string `json:"status"` }