#pragma once #include #include #include #include "workspace/WorkSpace.h" // Merge Command model into this header to reduce files struct Command { QString name; QString program; QStringList args; // final argument list to pass to QProcess QString rawArgs; // original args string from XML (optional) QString path; // script or executable path QString workingDir; // working directory bool enabled{true}; QMap env; // environment key/value pairs QString descript; // description int timeoutMs{30000}; // default 30s }; class CommandExecutor { public: explicit CommandExecutor(const Command& cmd) : cmd_(cmd) {} void Execute(WorkSpace* ws, WorkSpace::CommandWhen when); const Command& Get() const { return cmd_; } private: Command cmd_; };