feat: Enhance ROM loading options and proposal management

- Introduced `RomLoadOptions` struct to manage various loading configurations for ROM files, including options for stripping headers, populating metadata, and loading Zelda 3 content.
- Updated `Rom::LoadFromFile` and `Rom::LoadFromData` methods to accept `RomLoadOptions`, allowing for more flexible ROM loading behavior.
- Implemented `MaybeStripSmcHeader` function to conditionally remove SMC headers from ROM data.
- Added new command handler `RomInfo` to display basic ROM information, including title and size.
- Created `ProposalRegistry` class to manage agent-generated proposals, including creation, logging, and status updates.
- Enhanced CLI commands to support proposal listing and detailed diff viewing, improving user interaction with agent-generated modifications.
- Updated resource catalog to include new actions for ROM info and agent proposal management.
This commit is contained in:
scawful
2025-10-01 18:18:48 -04:00
parent 04a4d04f4e
commit 02c6985201
13 changed files with 1373 additions and 72 deletions

View File

@@ -102,6 +102,11 @@ class DungeonListObjects : public CommandHandler {
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class RomInfo : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
};
class RomValidate : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override;
@@ -151,7 +156,7 @@ class Open : public CommandHandler {
public:
absl::Status Run(const std::vector<std::string>& arg_vec) override {
auto const& arg = arg_vec[0];
RETURN_IF_ERROR(rom_.LoadFromFile(arg))
RETURN_IF_ERROR(rom_.LoadFromFile(arg, RomLoadOptions::CliDefaults()))
std::cout << "Title: " << rom_.title() << std::endl;
std::cout << "Size: 0x" << std::hex << rom_.size() << std::endl;
return absl::OkStatus();