#ifndef OPENMANUS_FLOW_PLANNING_FLOW_H #define OPENMANUS_FLOW_PLANNING_FLOW_H #include #include #include #include "base_flow.h" namespace openmanus { /** * @class PlanningFlow * @brief 规划流程,使用规划代理执行任务 */ class PlanningFlow : public BaseFlow { public: /** * @brief 构造函数 * @param agent 主要代理 */ PlanningFlow(std::shared_ptr agent); /** * @brief 构造函数 * @param agents 多个代理 */ PlanningFlow(const std::vector>& agents); /** * @brief 执行流程 * @param input_text 输入文本 * @return 执行结果 */ virtual std::string execute(const std::string& input_text) override; private: /** * @brief 获取当前计划状态 * @return 计划状态 */ std::string getPlanStatus(); /** * @brief 更新步骤执行状态 * @param step_id 步骤ID * @param status 状态 * @return 是否成功 */ bool updateStepStatus(const std::string& step_id, const std::string& status); /** * @brief 获取当前步骤索引 * @return 当前步骤索引 */ int getCurrentStepIndex(); private: std::string active_plan_id_; std::unordered_map> step_execution_tracker_; }; } // namespace openmanus #endif // OPENMANUS_FLOW_PLANNING_FLOW_H