chadtmiller.com/group-host
atmosphere group host
0
0
The host builds on atproto 0.6.1, atproto-client 0.11.1 and atproto-server 0.3.0
crates/group-host/src/index.rs+8−9
| @@ -23,7 +23,7 @@ use atproto::space::LtHash; | ||
use atproto::space_auth::{self, Kind, Make}; | ||
use atproto::{Cid, Curve, Keypair, PublicKey, Value, did, drisl}; | ||
use atproto_client::identity; | ||
use atproto_client::space::{self, Credential}; | ||
use atproto_client::space::{self, Credential, OplogFrom}; | ||
use atproto_client::xrpc::Xrpc; | ||
use serde_json::Value as Json; | ||
use std::collections::BTreeMap; | ||
| @@ -179,15 +179,14 @@ impl Host { | ||
async fn read_on(&self, remote: &Remote, from: &SpaceHead) -> Result<()> { | ||
let hash = LtHash::from_state(&from.state)?; | ||
let writer = (remote.did.as_str(), &remote.kem); | ||
let since = (Some(from.rev.as_str()), None); | ||
let read = space::list_repo_ops( | ||
&remote.at, | ||
&remote.credential, | ||
writer, | ||
since, | ||
// Read to the head in one call: no page is left to read on. | ||
let start = OplogFrom { | ||
since: Some(from.rev.clone()), | ||
cursor: None, | ||
hash, | ||
usize::MAX, | ||
); | ||
pending: Vec::new(), | ||
}; | ||
let read = space::list_repo_ops(&remote.at, &remote.credential, writer, start, usize::MAX); | ||
let oplog = read.await?; | ||
let (changed, unreadable) = oplog.changes(|_| true)?; | ||
// A record that is not what its write made was written again | ||
Cargo.lock+6−6
| @@ -83,9 +83,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" | ||
| ||
[[package]] | ||
name = "atproto" | ||
version = "0.5.1" | ||
version = "0.6.1" | ||
source = "sparse+https://knotless.dev/cargo/did:plc:bcgltzqazw5tb6k2g3ttenbj/3mzr5vldibtui/" | ||
checksum = "57e665182bd8a7e099bcfcaf7a5daf9301f1ef72e7077ef56cc23fa546b9804a" | ||
checksum = "6159e7b9e7cff620778f904778064de7d07a2e34ca8dd36137a9235518bd8daa" | ||
dependencies = [ | ||
"base64 0.22.1", | ||
"blake3", | ||
| @@ -102,9 +102,9 @@ dependencies = [ | ||
| ||
[[package]] | ||
name = "atproto-client" | ||
version = "0.10.0" | ||
version = "0.11.1" | ||
source = "sparse+https://knotless.dev/cargo/did:plc:bcgltzqazw5tb6k2g3ttenbj/3mzr5vldibtui/" | ||
checksum = "2e73c19ed42750556054f4478964e665da63af5d720db75120331ee5fbdfca66" | ||
checksum = "486b02a79ef4f41c99a67fb247bedbb4f6b82bfd0ee9f0f707c58ca082040a90" | ||
dependencies = [ | ||
"atproto", | ||
"bytes", | ||
| @@ -122,9 +122,9 @@ dependencies = [ | ||
| ||
[[package]] | ||
name = "atproto-server" | ||
version = "0.2.0" | ||
version = "0.3.0" | ||
source = "sparse+https://knotless.dev/cargo/did:plc:bcgltzqazw5tb6k2g3ttenbj/3mzr5vldibtui/" | ||
checksum = "c99a6fb68cd1cb9f2eab0bf5f97f5d38f9963c887c5b685da7ee2b9f26515b4c" | ||
checksum = "ad984b2d9f159892ba04bb3baf8e02fa357be69f6f3db3f6b25fca1d813e5525" | ||
dependencies = [ | ||
"atproto", | ||
"atproto-client", | ||
Cargo.toml+3−3
| @@ -16,9 +16,9 @@ publish = false | ||
unsafe_code = "forbid" | ||
| ||
[workspace.dependencies] | ||
atproto = { version = "0.5.1", registry = "atproto" } | ||
atproto-client = { version = "0.10.0", registry = "atproto" } | ||
atproto-server = { version = "0.2.0", registry = "atproto" } | ||
atproto = { version = "0.6.0", registry = "atproto" } | ||
atproto-client = { version = "0.11.0", registry = "atproto" } | ||
atproto-server = { version = "0.3.0", registry = "atproto" } | ||
group-host = { path = "crates/group-host" } | ||
group-host-mcp = { path = "crates/group-host-mcp" } | ||
anyhow = "1" | ||