feat: 通过 Host 日志同步类型化任务记录

This commit is contained in:
2026-09-08 16:52:48 +08:00
parent ef722145c4
commit cf39b1a905
13 changed files with 644 additions and 16 deletions
+6
View File
@@ -5,6 +5,9 @@ use std::{collections::HashSet, fs, io::Read, path::Path};
use uuid::Uuid;
/// File transport only. Logical records receive their own versioned whitelist separately.
pub fn allowed(path: &str) -> bool {
if crate::records::is_record(path) {
return crate::records::allowed(path);
}
let parts: Vec<_> = path.split('/').collect();
if parts.iter().any(|part| {
part.starts_with('.')
@@ -100,6 +103,9 @@ impl Workspace {
if bytes.len() > 104857600 {
return Err(HostError::new("FILE_TOO_LARGE"));
}
if crate::records::is_record(&path) {
crate::records::validate(&path, &bytes)?;
}
let digest = hash(&bytes);
let previous = self.entry(&path)?;
let observed: Option<(String, String, bool)> = if let Some(entry) = &previous {