feat: Add networking commands for z3ed CLI

- Implemented new CLI commands for network operations, including `net connect`, `net join`, `net leave`, and `net proposal` for real-time collaboration.
- Enhanced the `CollaborationService` and `WebSocketClient` to support session management and proposal submissions.
- Updated `README.md` to include usage instructions for the new networking commands and features.
- Improved CMake configuration to include new source files for networking functionalities.
This commit is contained in:
scawful
2025-10-04 22:43:21 -04:00
parent 0f4d444a73
commit f19451e99e
4 changed files with 335 additions and 2 deletions

View File

@@ -0,0 +1,48 @@
#ifndef YAZE_CLI_HANDLERS_NET_NET_COMMANDS_H_
#define YAZE_CLI_HANDLERS_NET_NET_COMMANDS_H_
#include <string>
#include <vector>
#include "absl/status/status.h"
#include "cli/service/net/z3ed_network_client.h"
namespace yaze {
namespace cli {
namespace net {
/**
* Handle 'z3ed net connect' command
*/
absl::Status HandleNetConnect(const std::vector<std::string>& args);
/**
* Handle 'z3ed net join' command
*/
absl::Status HandleNetJoin(const std::vector<std::string>& args);
/**
* Handle 'z3ed net leave' command
*/
absl::Status HandleNetLeave(const std::vector<std::string>& args);
/**
* Handle 'z3ed net proposal' command
*/
absl::Status HandleNetProposal(const std::vector<std::string>& args);
/**
* Handle 'z3ed net status' command
*/
absl::Status HandleNetStatus(const std::vector<std::string>& args);
// Proposal subcommands
absl::Status HandleProposalSubmit(const std::vector<std::string>& args);
absl::Status HandleProposalStatus(const std::vector<std::string>& args);
absl::Status HandleProposalWait(const std::vector<std::string>& args);
} // namespace net
} // namespace cli
} // namespace yaze
#endif // YAZE_CLI_HANDLERS_NET_NET_COMMANDS_H_