~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Labels are atproto's com.atproto.label.record

Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:labels/record
crates/group-host/src/lexicons.rs+1−1
@@ -121,7 +121,7 @@ pub const FILES: &[&str] = &[
lexicon!("upstream/com/atproto/admin/defs"),
lexicon!("upstream/com/atproto/identity/resolveHandle"),
lexicon!("upstream/com/atproto/label/defs"),
lexicon!("upstream/com/atproto/label/label"),
lexicon!("upstream/com/atproto/label/record"),
lexicon!("upstream/com/atproto/managedspace/checkAccess"),
lexicon!("upstream/com/atproto/managedspace/policy"),
lexicon!("upstream/com/atproto/moderation/defs"),
crates/group-host/src/moderation.rs+1−1
@@ -1,6 +1,6 @@
//! Moderation, a group's own: reports in, labels out, a queue between.
//!
//! - **Labels** are `com.atproto.label.label` records the group writes,
//! - **Labels** are `com.atproto.label.record` records the group writes,
//! as any record of its own, beside their subject: a record's in the
//! space it is in, an account's, or a member's public record's, in the
//! members space by custom. Whoever reads the content reads its labels.
crates/group-host/src/rbac.rs+1−1
@@ -15,7 +15,7 @@ use std::collections::{BTreeMap, BTreeSet};
pub const NS: &str = "fyi.opensocial";
/// A label, as a record the group writes beside its subject.
pub const LABEL: &str = "com.atproto.label.label";
pub const LABEL: &str = "com.atproto.label.record";
/// Anyone signed in, as an audience.
pub const PUBLIC: &str = "public";
crates/group-host/tests/group_tokens.rs+1−1
@@ -13,7 +13,7 @@ use serde_json::{Value as Json, json};
const CALENDAR: &str = "com.example.calendar";
const EVENT: &str = "com.example.event";
const LABEL: &str = "com.atproto.label.label";
const LABEL: &str = "com.atproto.label.record";
const GET_GROUP_AUTH: &str = "fyi.opensocial.getGroupAuth";
async fn membership(h: &Running, did: &str, who: &str, roles: &[&str]) {
crates/group-host/tests/mcp.rs+1−1
@@ -562,7 +562,7 @@ async fn labels_as_the_group_beside_what_it_labels() {
make_member(&h, &group, &bob.did).await;
let (_, tokens) = connect(&h, &alice, &group).await;
let access = tokens["access_token"].as_str().unwrap();
let label = "com.atproto.label.label";
let label = "com.atproto.label.record";
// An account's, in the members space.
let got = tool(
&h,
crates/group-host/tests/moderation.rs+1−1
@@ -14,7 +14,7 @@ use group_host::store::Store;
use serde_json::{Value as Json, json};
const CALENDAR: &str = "com.example.calendar";
const LABEL: &str = "com.atproto.label.label";
const LABEL: &str = "com.atproto.label.record";
const ACCOUNT: &str = "fyi.opensocial.defs#accountSubject";
const RECORD: &str = "fyi.opensocial.defs#recordSubject";
const CID: &str = "bafyreie5737gdxlw5i64vzichcalba3z2v5n6icifvx5xytvske7mr3hpm";
crates/group-host/tests/oauth_scope.rs+2−2
@@ -516,8 +516,8 @@ fn makes_a_permission_set_concrete() {
"rpc:fyi.opensocial.listInvites?aud=*".into(),
format!("space:fyi.opensocial.meta?authority={did}&skey=self&collection=fyi.opensocial.access&{all}"),
format!("space:fyi.opensocial.members?authority={did}&skey=self&collection=fyi.opensocial.space&collection=fyi.opensocial.access&{all}"),
format!("space:fyi.opensocial.meta?authority={did}&skey=self&collection=com.atproto.label.label&{all}"),
format!("space:fyi.opensocial.members?authority={did}&skey=self&collection=com.atproto.label.label&{all}"),
format!("space:fyi.opensocial.meta?authority={did}&skey=self&collection=com.atproto.label.record&{all}"),
format!("space:fyi.opensocial.members?authority={did}&skey=self&collection=com.atproto.label.record&{all}"),
"rpc:fyi.opensocial.listSubjects?aud=*".into(),
"rpc:fyi.opensocial.getSubjectHistory?aud=*".into(),
"rpc:fyi.opensocial.resolveSubject?aud=*".into(),
crates/group-host/tests/rbac.rs+1−1
@@ -162,7 +162,7 @@ fn answers_each_action_by_its_scope() {
assert_eq!(star.len(), 5);
// Labels, written in any of the group's spaces, label.
assert_eq!(
of_scope("space:*?collection=com.atproto.label.label"),
of_scope("space:*?collection=com.atproto.label.record"),
["label"]
);
// Memberships written in the members space admit, give roles and
crates/group-host-mcp/src/lib.rs+2−2
@@ -499,7 +499,7 @@ const TOOLS: &[(&str, &[&str], &str, Made)] = &[
(
"mod_label",
&["subject", "val"],
"Labels a subject as the group, with a label record (com.atproto.label.label) beside \
"Labels a subject as the group, with a label record (com.atproto.label.record) beside \
it: a record's in its space, an account's in the members space. With undo, takes the \
label back by deleting it.",
Made::Label,
@@ -917,7 +917,7 @@ pub fn plan(tool: &Tool, args: &Value, now: &str) -> Result<Plan, String> {
}
/// The label record's collection.
pub const LABEL: &str = "com.atproto.label.label";
pub const LABEL: &str = "com.atproto.label.record";
/// The space of `group`'s a label on `subject` goes in: a record's own,
/// an account's the members space. None for a record in no space of the
crates/group-host-mcp/tests/protocol.rs+1−1
@@ -177,7 +177,7 @@ fn makes_each_schema_from_the_lexicons() {
assert_eq!(fields["undo"]["type"], "boolean");
assert_eq!(label.input_schema["required"], json!(["subject", "val"]));
assert_eq!(label.args, ["subject", "val"]);
assert!(label.description.contains("com.atproto.label.label"));
assert!(label.description.contains("com.atproto.label.record"));
let resolve = &tool("mod_resolve").input_schema["properties"];
assert_eq!(resolve["subject"]["type"], "string");
assert_eq!(resolve["cid"]["format"], "cid");
crates/opensocial/src/lib.rs+1−1
crates/opensocial/tests/commands.rs+1−1
docs/design/moderation.md+2−2
docs/reference/api.md+1−1
docs/reference/mcp.md+1−1
harness/lexicons.mjs+7−3
lexicons/fyi/opensocial/defs.json+1−1
lexicons/fyi/opensocial/members.json+1−1
lexicons/fyi/opensocial/meta.json+1−1
lexicons/fyi/opensocial/moderate.json+2−2
lexicons/upstream/com/atproto/label/label.jsondeleted+0−46
lexicons/upstream/com/atproto/label/record.jsonnew+42−0
web/src/lib/actions.ts+1−1
web/src/lib/activity.ts+1−1
web/src/routes/g/[handle]/moderation/+page.server.ts+1−1