From 46b3f74b2e9c82b8a59a58a61396516f9dc8bd94 Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Sat, 8 Aug 2026 11:28:42 +0300 Subject: [PATCH] lexicons: Tangled 1.0 (`org.tangled.{feed,graph}.*`) - `feed.star` and `feed.subscription` still have to use TID. - DID itself doesn't enforce the uniqueness because it's case-insensitive - we can't enforce DID rkey from lexicon schema. We can't benefit from existing atproto sdks for that and we will have to check that in runtime. So using DID in rkey earns nothing. We should handle duplications anyway, and that will be more problemetic when we add more fields in `follow` record. It's not that hard to imagine supporting follow-for-events feature in future. We know this problem exists, so we should avoid using DID as rkey at first place. Either way, indexers like Bobbin have to deal with duplication anyway, so we don't really loose anything here. Signed-off-by: Seongmin Lee --- lexicons/org/tangled/feed/subscription.json | 46 ++++++++++++++++++ lexicons/org/tangled/graph/collaborator.json | 27 +++++++++++ lexicons/org/tangled/graph/follow.json | 27 +++++++++++ lexicons/org/tangled/graph/vouch.json | 49 ++++++++++++++++++++ 4 files changed, 149 insertions(+) create mode 100644 lexicons/org/tangled/feed/subscription.json create mode 100644 lexicons/org/tangled/graph/collaborator.json create mode 100644 lexicons/org/tangled/graph/follow.json create mode 100644 lexicons/org/tangled/graph/vouch.json diff --git a/lexicons/org/tangled/feed/subscription.json b/lexicons/org/tangled/feed/subscription.json new file mode 100644 index 00000000..b94727b6 --- /dev/null +++ b/lexicons/org/tangled/feed/subscription.json @@ -0,0 +1,46 @@ +{ + "lexicon": 1, + "id": "org.tangled.feed.subscription", + "defs": { + "main": { + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "type": "union", + "refs": ["#record", "#repo"], + "closed": true + }, + "ignore": { + "type": "boolean", + "description": "mute this thread" + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + }, + "record": { + "type": "object", + "required": ["uri"], + "properties": { + "uri": { "type": "string", "format": "at-uri" } + } + }, + "repo": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + } + } +} diff --git a/lexicons/org/tangled/graph/collaborator.json b/lexicons/org/tangled/graph/collaborator.json new file mode 100644 index 00000000..836a1804 --- /dev/null +++ b/lexicons/org/tangled/graph/collaborator.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "org.tangled.graph.collaborator", + "defs": { + "main": { + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "type": "string", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } + } +} diff --git a/lexicons/org/tangled/graph/follow.json b/lexicons/org/tangled/graph/follow.json new file mode 100644 index 00000000..72af69d4 --- /dev/null +++ b/lexicons/org/tangled/graph/follow.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "org.tangled.graph.follow", + "defs": { + "main": { + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "subject": { + "type": "string", + "format": "did" + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } + } +} diff --git a/lexicons/org/tangled/graph/vouch.json b/lexicons/org/tangled/graph/vouch.json new file mode 100644 index 00000000..b757b197 --- /dev/null +++ b/lexicons/org/tangled/graph/vouch.json @@ -0,0 +1,49 @@ +{ + "lexicon": 1, + "id": "org.tangled.graph.vouch", + "defs": { + "main": { + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "kind", + "createdAt" + ], + "properties": { + "subject": { + "type": "string", + "format": "did" + }, + "kind": { + "type": "string", + "description": "Whether this user is being vouched for or denounced", + "enum": ["vouch", "denounce"], + "default": "vouch" + }, + "reason": { + "type": "string", + "description": "The reason for this vouch/denouncement", + "maxGraphemes": 256, + "maxLength": 2560 + }, + "evidences": { + "type": "array", + "description": "Optional list of ATURIs serving as evidence for this vouch (ex. issues, PRs)", + "maxLength": 10, + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + } + }, + "createdAt": { + "type": "string", + "format": "datetime" + } + } + } + } + } +} -- 2.51.2