Initial Tessera backup vault (M0–M2)

Scaffold Rust workspace, React canvas, vault engine, hub API,
providers, agent wormhole path, and Docker compose per SPEC.
This commit is contained in:
Tessera Agent
2026-11-09 09:59:42 +00:00
commit a5ffb2c1b4
54 changed files with 8379 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ChunkIndex {
pub chunks: HashMap<String, ChunkEntry>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ChunkEntry {
pub pack_id: String,
pub offset: u64,
pub length: u64,
}
impl ChunkIndex {
pub fn record(&mut self, chunk_id: String, pack_id: String, offset: u64, length: u64) {
self.chunks.insert(
chunk_id,
ChunkEntry {
pack_id,
offset,
length,
},
);
}
}