Milestone 3: the hub
lunehub serves accounts, invites, pairing codes, memberships, devices and vaults as plain bare repos (SPEC §8), checks device key and role on every Git request, refuses secrets in a pre-receive hook (P3) and logs every access change. Ships as one container (Dockerfile, compose.yaml). lunesync gains join, login, pair, vault new/upload, invite, grant, members and hub log; `run` picks up new vaults and roles from the hub. Read members' edits stay local. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -92,6 +92,7 @@ pub fn run(cfg: &VaultConfig, label: &str, poll: Duration, timing: Timing, log:
|
||||
let mut backoff = poll;
|
||||
let mut was_waiting = false;
|
||||
let mut was_holding = false;
|
||||
let mut was_read_only = false;
|
||||
let mut announced: HashSet<String> = HashSet::new();
|
||||
loop {
|
||||
let first = rx.recv_timeout(Duration::from_millis(250));
|
||||
@@ -168,6 +169,10 @@ pub fn run(cfg: &VaultConfig, label: &str, poll: Duration, timing: Timing, log:
|
||||
say("not sharing anything from this device while a big change is held");
|
||||
}
|
||||
was_holding = report.holding;
|
||||
if report.read_only && !was_read_only {
|
||||
say("your changes here aren't shared — you have read access to this vault");
|
||||
}
|
||||
was_read_only = report.read_only;
|
||||
if report.waiting_for_local_edits && !was_waiting {
|
||||
say("new changes are waiting until your current edits settle");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user