yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
project_plan_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_ROM_PROJECT_PLAN_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_ROM_PROJECT_PLAN_COMMANDS_H_
3
5
6namespace yaze::cli::handlers {
7
8// Prints a yaze.plan/1 file's SHA-256, stable entry IDs and agent status, so
9// an agent can key a "yaze.plan.agent_update/1" document to the bytes it read.
11 public:
12 std::string GetName() const override { return "plan-read"; }
13 std::string GetUsage() const override {
14 return "plan-read (--plan <plan.json> | --project <file.yaze>) "
15 "[--format <json|text>]";
16 }
17 bool RequiresRom() const override { return false; }
18 Descriptor Describe() const override;
19 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
20 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
21 resources::OutputFormatter& formatter) override;
22};
23
24// Checks, diffs and applies an agent update to the plan's "agent_status"
25// section through the shared source-CAS publisher. Human plan fields are never
26// written. A stale base_sha256 is refused before anything is written.
28 public:
29 std::string GetName() const override { return "plan-agent-apply"; }
30 std::string GetUsage() const override {
31 return "plan-agent-apply (--plan <plan.json> | --project <file.yaze>) "
32 "--update <update.json> [--dry-run] [--format <json|text>]";
33 }
34 bool RequiresRom() const override { return false; }
35 Descriptor Describe() const override;
36 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override;
37 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
38 resources::OutputFormatter& formatter) override;
39};
40
41} // namespace yaze::cli::handlers
42
43#endif // YAZE_SRC_CLI_HANDLERS_ROM_PROJECT_PLAN_COMMANDS_H_
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:52
std::string GetName() const override
Get the command name.
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.