1#ifndef YAZE_CORE_PROJECT_PLAN_AGENT_H_
2#define YAZE_CORE_PROJECT_PLAN_AGENT_H_
8#include "absl/status/status.h"
9#include "absl/status/statusor.h"
27 "yaze.plan.agent_status/1";
29 "yaze.plan.agent_update/1";
44 static absl::StatusOr<PlanAgentUpdate>
Parse(std::string_view text);
92 std::string_view key);
97 std::string_view after);
105 std::string_view loaded_source,
106 std::string_view disk_source);
void RenamePlanAgentObservation(ProjectPlan *plan, std::string_view before, std::string_view after)
const PlanJson * FindPlanAgentStatus(const ProjectPlan &plan)
const PlanJson * FindPlanAgentObservation(const ProjectPlan &plan, std::string_view key)
constexpr std::string_view kPlanAgentUpdateSchema
absl::StatusOr< PlanAgentDiff > ApplyPlanAgentUpdate(ProjectPlan *plan, const PlanAgentUpdate &update)
absl::StatusOr< PlanAgentDiff > DiffPlanAgentUpdate(const ProjectPlan &plan, const PlanAgentUpdate &update)
constexpr std::string_view kPlanAgentStatusSchema
bool AdoptPlanAgentOnlyChanges(ProjectPlan *draft, std::string_view loaded_source, std::string_view disk_source)
const char * PlanAgentChangeKindName(PlanAgentChangeKind kind)
nlohmann::ordered_json PlanJson
absl::StatusOr< PlanAgentFileResult > ApplyPlanAgentUpdateToFile(const std::string &path, const PlanAgentUpdate &update, bool dry_run)
std::vector< std::string > OrphanedPlanAgentObservations(const ProjectPlan &plan)
constexpr std::string_view kPlanAgentStatusKey
std::vector< PlanAgentChange > changes
std::string before_sha256
std::vector< std::string > remove
static absl::StatusOr< PlanAgentUpdate > Parse(std::string_view text)