feat: align task pipe protocol and hmac

This commit is contained in:
zyl
2026-03-25 03:25:47 +00:00
parent 8757bbb266
commit b9773d4719
5 changed files with 168 additions and 8 deletions

View File

@@ -97,6 +97,11 @@ impl<T: Transport> BrowserPipeTool<T> {
"received duplicate init after handshake".to_string(),
));
}
BrowserMessage::SubmitTask { .. } => {
return Err(PipeError::UnexpectedMessage(
"received submit_task while waiting for response".to_string(),
));
}
}
}
}

View File

@@ -12,6 +12,9 @@ pub enum BrowserMessage {
#[serde(default)]
capabilities: Vec<String>,
},
SubmitTask {
instruction: String,
},
Response {
seq: u64,
success: bool,
@@ -31,6 +34,14 @@ pub enum AgentMessage {
agent_id: String,
supported_actions: Vec<Action>,
},
LogEntry {
level: String,
message: String,
},
TaskComplete {
success: bool,
summary: String,
},
Command {
seq: u64,
action: Action,