feat: update dependencies and improve development commands in Justfile

This commit is contained in:
GW_MC
2026-03-03 04:49:26 +00:00
parent 31f1d8309d
commit 091743bb51
3 changed files with 12 additions and 25 deletions

View File

@@ -13,7 +13,7 @@ use std::pin::Pin;
use tracing::{error, info, warn};
use uuid::Uuid;
use crate::db::entities::agent;
use crate::db::entities::agents;
use crate::db::Database;
/// Agent service implementation
@@ -36,9 +36,9 @@ impl AgentServiceImpl {
// TODO: Validate token properly
// For now, create a new agent record
let agent_id = Uuid::new_v4();
let now = Utc::now();
let agent = agent::ActiveModel {
let agent = agents::ActiveModel {
id: Set(agent_id),
workspace_id: Set(Uuid::nil()), // TODO: Get from token
name: Set(request.hostname.clone()),
@@ -78,7 +78,7 @@ impl AgentServiceImpl {
// Update agent's last_seen_at
let now = Utc::now();
let agent = agent::ActiveModel {
let agent = agents::ActiveModel {
id: Set(agent_uuid),
last_seen_at: Set(Some(now.into())),
..Default::default()
@@ -115,7 +115,7 @@ impl AgentService for AgentServiceImpl {
let output_stream = async_stream::try_stream! {
while let Some(result) = stream.message().await? {
let msg = result;
// Handle different message types via payload
if let Some(payload) = msg.payload {
use nxmesh_proto::agent_message::Payload;
@@ -165,7 +165,7 @@ impl AgentService for AgentServiceImpl {
.and_then(|v| v.to_str().ok())
.unwrap_or("unknown")
.to_string();
let report = request.into_inner();
self.handle_health_report(report, &agent_id).await?;