1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! Peer workspace continuity: the same unfinished working tree on more than
//! one machine.
//!
//! Git carries history between machines. This carries what git deliberately
//! does not: the half-finished edit, the file not worth a commit, the state a
//! person is in the middle of. Stop typing on one machine, open another, and
//! the tree is there — without a WIP commit, a stash, a patch or a copy.
//!
//! # What this is not
//!
//! It is not a git operation and it never performs one. Continuity never
//! pulls, pushes, merges, rebases, resets, commits or changes a branch to make
//! synchronisation possible. When git state diverges it BLOCKS and says so;
//! the operator reconciles with the ordinary fleet commands, and continuity
//! resumes by itself once both sides agree again.
//!
//! It is also not `wsb sync`, which is the fleet's git operation and keeps its
//! name. These two share a word in English and nothing else, so they share no
//! module, no type and no code path.
//!
//! # The shape of it
//!
//! * [`model`] — the closed vocabulary: identities, states, blocked reasons.
//! * [`identity`] — a machine's ed25519 identity, its fingerprint, and pairing.
//! * [`compatibility`] — the git guard: same repository, same named branch,
//! same HEAD, nothing in progress, expressed as an epoch a transfer is
//! validated against at both ends.
//! * [`scan`] — what belongs to the continuity set, and what may never enter it.
//! * [`converge`] — three-way convergence against the last agreed baseline,
//! which is what makes this bidirectional rather than a copy.
//! * [`protocol`] — the messages two daemons exchange.
//! * [`transport`] — the authenticated, encrypted channel they exchange them on.
//!
//! The daemon owns the long-lived half — connections, watchers, sessions — in
//! `wsb-daemon`'s own `peer` module. Everything a decision depends on lives
//! here, where it can be tested without a network.
/// The daemon's routes for peers, under its workbench API.
/// Where peers dial unless the operator says otherwise.
///
/// Fixed rather than floating: a peer is reached at an address a person typed
/// once, and a port that moved with every restart would have to be typed
/// again. The workbench's port may float; this one may not.
pub const DEFAULT_PEER_PORT: u16 = 7420;
/// Where a workspace declares its continuity policy, relative to its root.
pub const POLICY_FILE: &str = ".wsb/peer.json";
pub use ;
pub use ;
pub use ;
pub use ;