@colibri-social/space-sync 0.7.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/dist/.tsbuildinfo +1 -1
- package/dist/engine.d.ts +15 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +92 -25
- package/dist/engine.js.map +1 -1
- package/dist/repo-sync.d.ts +1 -0
- package/dist/repo-sync.d.ts.map +1 -1
- package/dist/repo-sync.js +40 -14
- package/dist/repo-sync.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/verify-jobs.d.ts +5 -7
- package/dist/verify-jobs.d.ts.map +1 -1
- package/dist/verify-jobs.js +4 -11
- package/dist/verify-jobs.js.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -6,12 +6,15 @@ Keeps a local, up-to-date copy of an atproto permissioned space.
|
|
|
6
6
|
|
|
7
7
|
`SpaceSyncEngine` runs both:
|
|
8
8
|
|
|
9
|
-
- **Push.** `
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
- **Push.** Every `authorizeSpaceSync` call carries a notify endpoint and a
|
|
10
|
+
per-space token, which registers this service on the space host. The engine
|
|
11
|
+
reauthorizes each space before its credential expires to keep the
|
|
12
|
+
registration alive. When a member writes, their host tells the authority,
|
|
13
|
+
which sends `notifySpaceUpdate` to registered syncers. `notifyWrite(space, repo)`
|
|
14
|
+
enqueues that repo
|
|
15
|
+
- **Sweep.** Every `sweepIntervalMs`, `listWriters` gives the authority's view of
|
|
13
16
|
the writer set with each repo's revision. Anything ahead of our cursor is
|
|
14
|
-
enqueued, and anything
|
|
17
|
+
enqueued, and anything removed or missing is dropped
|
|
15
18
|
|
|
16
19
|
## Fail handling
|
|
17
20
|
|
|
@@ -21,7 +24,8 @@ exponentially to an hour. The sweep skips a repo that is still backing off.
|
|
|
21
24
|
| | |
|
|
22
25
|
| --------------------------------------------------------- | ---------------------------------------- |
|
|
23
26
|
| the host no longer retains our `since` revision | full recovery from the CAR |
|
|
24
|
-
| the account is
|
|
27
|
+
| the account is taken down, suspended or deactivated | drop the repo |
|
|
28
|
+
| the host has no repo for the account | clear the copy and keep the repo empty |
|
|
25
29
|
| the set hash disagrees with a verified commit | full recovery |
|
|
26
30
|
| the authority says the space is deleted | drop the space and forget the credential |
|
|
27
31
|
| anything else | back off and retry, keeping the copy |
|