wire protocol is generated now instead of being hard coded with versioning for commands.

This commit is contained in:
KingKDot
2026-07-30 12:38:28 -05:00
parent 3f49eb07f7
commit 477b9a5353
27 changed files with 2628 additions and 204 deletions
@@ -206,10 +206,11 @@ func TestPingPongMarshaling(t *testing.T) {
func TestCommandMarshaling(t *testing.T) {
cmd := Command{
Type: "command",
CommandType: "test_command",
ID: "cmd-123",
Payload: map[string]interface{}{"key": "value"},
Type: "command",
CommandType: "process_list",
CommandVersion: 1,
ID: "cmd-123",
Payload: map[string]interface{}{"key": "value"},
}
data, err := msgpack.Marshal(cmd)
@@ -228,6 +229,9 @@ func TestCommandMarshaling(t *testing.T) {
if decoded.ID != cmd.ID {
t.Errorf("ID mismatch: got %s, want %s", decoded.ID, cmd.ID)
}
if decoded.CommandVersion != cmd.CommandVersion {
t.Errorf("CommandVersion mismatch: got %d, want %d", decoded.CommandVersion, cmd.CommandVersion)
}
}
func TestCommandResultMarshaling(t *testing.T) {