Files
rust-discovery/proto/agent.proto
T
BuTzZ 6c3203d725
Rust development slice / linux (push) Failing after 1m10s
feat: snapshot Linux-first RMM MVP and pause handover
2026-11-12 22:06:25 +01:00

59 lines
3.3 KiB
Protocol Buffer

syntax = "proto3";
package rmm.agent.v1;
// Stable tags; additive changes only within major 1.
message Envelope {
uint32 protocol_major = 1;
uint32 protocol_minor = 2;
string message_id = 3;
string agent_id = 4;
uint64 enrollment_generation = 5;
uint64 connection_generation = 6;
string boot_id = 7;
uint64 sequence = 8;
int64 observed_at = 9; // UTC Unix milliseconds
reserved 15 to 19;
oneof payload {
ClientHello client_hello = 10;
ServerHello server_hello = 11;
Heartbeat heartbeat = 12;
InventorySnapshot inventory_snapshot = 13;
Ack ack = 14;
JobOffer job_offer = 20;
JobAccepted job_accepted = 21;
ExecutionPermitRequest execution_permit_request = 22;
ExecutionPermit execution_permit = 23;
JobStateChanged job_state_changed = 24;
JobResult job_result = 25;
CancelRequest cancel_request = 26;
SyncRequest sync_request = 27;
SyncResponse sync_response = 28;
}
}
message ClientHello { string agent_version = 1; repeated string capabilities = 2; }
message ServerHello { uint64 connection_generation = 1; uint32 max_message_bytes = 2; }
message Heartbeat { string instance_id = 1; uint64 uptime_seconds = 2; }
// Single-chunk root inventory scope only; JSON is schema rmm.linux.base/1.
message InventorySnapshot {
string snapshot_id = 1;
string scope = 2;
uint32 schema_version = 3;
uint32 chunk_index = 4;
uint32 chunk_count = 5;
bytes data = 6;
bytes sha256 = 7;
string completeness = 8;
}
message Ack { string message_id = 1; }
message MessageBatch { uint32 protocol_major=1; repeated Envelope messages=2; }
message PollRequest { Envelope envelope=1; uint32 wait_seconds=2; }
message SyncRequest { string request_id=1; string journal_id=2; uint64 checkpoint=3; string previous_decision_id=4; uint64 assignment_version=5; repeated SyncAttempt attempts=6; repeated string durable_message_ids=7; bool journal_complete=8; string helper_journal_id=9; uint64 helper_checkpoint=10; string helper_previous_decision_id=11; string previous_request_id=12; }
message SyncAttempt { string job_id=1; string attempt_id=2; string job_payload_hash=3; string grant_id=4; string consumption=5; string state=6; uint64 revision=7; string original_boot_id=8; JobResult result=9; string result_message_id=10; string outcome_sha256=11; bytes outcome_bytes=12; Envelope result_envelope=13; }
message SyncResponse { bytes decision_bytes=1; bytes signature=2; }
message JobOffer { string job_id=1; string attempt_id=2; string authorization_id=3; string plan_hash=4; string job_payload_hash=5; bytes payload_bytes=6; }
message JobAccepted { string job_id=1; string attempt_id=2; string job_payload_hash=3; string journal_proof=4; }
message ExecutionPermitRequest { string job_id=1; string attempt_id=2; string job_payload_hash=3; uint64 assignment_version=4; }
message ExecutionPermit { bytes payload_bytes=1; bytes signature=2; string denial_code=3; }
message JobStateChanged { string job_id=1; string attempt_id=2; uint64 revision=3; string state=4; string grant_id=5; }
message JobResult { string job_id=1; string attempt_id=2; uint64 revision=3; string state=4; string grant_id=5; bytes stdout=6; bytes stderr=7; bool output_truncated=8; bool reboot_required=9; optional int32 exit_code=10; string evidence_json=11; string error_code=12; }
message CancelRequest { string job_id=1; string attempt_id=2; string reason=3; }