Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ Impure shell around pure decision cores:
- Each tick: `local_snapshot` + `index_snapshot` → pure `reconcile()` → `Vec<Action>`
{Import, WriteFile, DeleteLocal, Tombstone, Merge} → execute → settle into `SyncState`
(atomic temp+rename to `data_dir/state.toml`).
- The `Wiremap` (ssync-core `wiremap.rs`) owns the adapters, the per-agent excludes, and
the path-map resolver: every wire-key ↔ local-path translation and every freeze verdict
(excluded key #14, dropped-agent guard, failed mapping #49) lives behind it — Engine
never touches adapters directly, and the freeze invariants are unit-tested there
without iroh.
- `SessionFilesystem` (ssync-core `session_filesystem.rs`) owns adapters, bounded discovery,
wire-key ↔ local-path translation, path-map resolution, freeze verdicts, and contained
read/write/delete. Engine never touches adapters or filesystem policy directly; tests cover
the interface without iroh.
- Import path: file → age-encrypt (subprocess) → `Node::publish` (blob + index entry keyed
`{agent}/{relative_path}`; the ONLY write path — temp-tag prevents the GC race).
- Export path: index entry → `Node::blob` (local miss → bounded fetch from peers behind
Expand Down
11 changes: 6 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [
]

[workspace.package]
version = "0.19.1"
version = "0.19.4"
edition = "2024"
license = "MIT"
repository = "https://github.com/fosskar/ssync"
Expand Down
3 changes: 2 additions & 1 deletion crates/ssync-core/src/cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ pub fn plan(adapters: &[Box<dyn Adapter>], filter: &Filter) -> Result<Vec<Victim
{
continue;
}
let files = crate::wiremap::session_files(adapter.session_root(), adapter.as_ref());
let files =
crate::session_filesystem::session_files(adapter.session_root(), adapter.as_ref());
let mut selected = Vec::new();
for path in &files {
let old_enough = match filter.before {
Expand Down
4 changes: 2 additions & 2 deletions crates/ssync-core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ impl Config {
}

/// The validated [`PathMap`] this config describes (empty = inert).
pub fn build_path_map(&self) -> Result<crate::pathmap::PathMap> {
crate::pathmap::PathMap::new(
pub fn build_path_map(&self) -> Result<crate::PathMap> {
crate::PathMap::new(
self.path_map
.iter()
.map(|e| {
Expand Down
Loading