use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use stateknot_core::{AgentRequest, AgentSubmissionKey, CapabilityIdentity, EventId};
use stateknot_runtime::AgentRunSnapshot;
use std::fmt;
#[derive(Clone, Deserialize, JsonSchema, Serialize)]
#[serde(deny_unknown_fields)]
pub struct AgentHttpSubmission {
pub submission_key: AgentSubmissionKey,
pub agent: CapabilityIdentity,
pub request: AgentRequest,
}
impl fmt::Debug for AgentHttpSubmission {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("AgentHttpSubmission")
.field("agent", &self.agent)
.finish_non_exhaustive()
}
}
#[derive(Clone, Deserialize, JsonSchema, Serialize)]
#[serde(deny_unknown_fields)]
pub struct AgentHttpLookup {
pub submission_key: AgentSubmissionKey,
}
impl fmt::Debug for AgentHttpLookup {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("AgentHttpLookup { .. }")
}
}
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize)]
#[serde(deny_unknown_fields)]
pub struct AgentHttpRunResponse {
pub request_id: EventId,
pub snapshot: AgentRunSnapshot,
}