A community based topic aggregation platform built on atproto

feat(comments): add lexicons for comment create/update/delete XRPC procedures

Define AT Protocol lexicon schemas for comment write operations:
- social.coves.community.comment.create: Create new comments/replies
- social.coves.community.comment.update: Update existing comment content
- social.coves.community.comment.delete: Delete comments by URI

All procedures require OAuth authentication and follow atProto conventions
with proper error definitions (ContentTooLong, ContentEmpty, NotAuthorized, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+247
+109
internal/atproto/lexicon/social/coves/community/comment/create.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "social.coves.community.comment.create", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Create a comment on a post or another comment. Comments support nested threading, rich text, embeds, and self-labeling.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["reply", "content"], 13 + "properties": { 14 + "reply": { 15 + "type": "object", 16 + "description": "References for maintaining thread structure. Root always points to the original post, parent points to the immediate parent (post or comment).", 17 + "required": ["root", "parent"], 18 + "properties": { 19 + "root": { 20 + "type": "ref", 21 + "ref": "com.atproto.repo.strongRef", 22 + "description": "Strong reference to the original post that started the thread" 23 + }, 24 + "parent": { 25 + "type": "ref", 26 + "ref": "com.atproto.repo.strongRef", 27 + "description": "Strong reference to the immediate parent (post or comment) being replied to" 28 + } 29 + } 30 + }, 31 + "content": { 32 + "type": "string", 33 + "maxGraphemes": 10000, 34 + "maxLength": 100000, 35 + "description": "Comment text content" 36 + }, 37 + "facets": { 38 + "type": "array", 39 + "description": "Annotations for rich text (mentions, links, etc.)", 40 + "items": { 41 + "type": "ref", 42 + "ref": "social.coves.richtext.facet" 43 + } 44 + }, 45 + "embed": { 46 + "type": "union", 47 + "description": "Embedded media or quoted posts", 48 + "refs": [ 49 + "social.coves.embed.images", 50 + "social.coves.embed.post" 51 + ] 52 + }, 53 + "langs": { 54 + "type": "array", 55 + "description": "Languages used in the comment content (ISO 639-1)", 56 + "maxLength": 3, 57 + "items": { 58 + "type": "string", 59 + "format": "language" 60 + } 61 + }, 62 + "labels": { 63 + "type": "ref", 64 + "ref": "com.atproto.label.defs#selfLabels", 65 + "description": "Self-applied content labels" 66 + } 67 + } 68 + } 69 + }, 70 + "output": { 71 + "encoding": "application/json", 72 + "schema": { 73 + "type": "object", 74 + "required": ["uri", "cid"], 75 + "properties": { 76 + "uri": { 77 + "type": "string", 78 + "format": "at-uri", 79 + "description": "AT-URI of the created comment" 80 + }, 81 + "cid": { 82 + "type": "string", 83 + "format": "cid", 84 + "description": "CID of the created comment record" 85 + } 86 + } 87 + } 88 + }, 89 + "errors": [ 90 + { 91 + "name": "InvalidReply", 92 + "description": "The reply reference is invalid, malformed, or refers to non-existent content" 93 + }, 94 + { 95 + "name": "ContentTooLong", 96 + "description": "Comment content exceeds maximum length constraints" 97 + }, 98 + { 99 + "name": "ContentEmpty", 100 + "description": "Comment content is empty or contains only whitespace" 101 + }, 102 + { 103 + "name": "NotAuthorized", 104 + "description": "User is not authorized to create comments on this content" 105 + } 106 + ] 107 + } 108 + } 109 + }
+41
internal/atproto/lexicon/social/coves/community/comment/delete.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "social.coves.community.comment.delete", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Delete a comment. Only the comment author can delete their own comments.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["uri"], 13 + "properties": { 14 + "uri": { 15 + "type": "string", 16 + "format": "at-uri", 17 + "description": "AT-URI of the comment to delete" 18 + } 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "properties": {} 27 + } 28 + }, 29 + "errors": [ 30 + { 31 + "name": "CommentNotFound", 32 + "description": "Comment with the specified URI does not exist" 33 + }, 34 + { 35 + "name": "NotAuthorized", 36 + "description": "User is not authorized to delete this comment (not the author)" 37 + } 38 + ] 39 + } 40 + } 41 + }
+97
internal/atproto/lexicon/social/coves/community/comment/update.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "social.coves.community.comment.update", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Update an existing comment's content, facets, embed, languages, or labels. Threading references (reply.root and reply.parent) are immutable and cannot be changed.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["uri", "content"], 13 + "properties": { 14 + "uri": { 15 + "type": "string", 16 + "format": "at-uri", 17 + "description": "AT-URI of the comment to update" 18 + }, 19 + "content": { 20 + "type": "string", 21 + "maxGraphemes": 10000, 22 + "maxLength": 100000, 23 + "description": "Updated comment text content" 24 + }, 25 + "facets": { 26 + "type": "array", 27 + "description": "Updated annotations for rich text (mentions, links, etc.)", 28 + "items": { 29 + "type": "ref", 30 + "ref": "social.coves.richtext.facet" 31 + } 32 + }, 33 + "embed": { 34 + "type": "union", 35 + "description": "Updated embedded media or quoted posts", 36 + "refs": [ 37 + "social.coves.embed.images", 38 + "social.coves.embed.post" 39 + ] 40 + }, 41 + "langs": { 42 + "type": "array", 43 + "description": "Updated languages used in the comment content (ISO 639-1)", 44 + "maxLength": 3, 45 + "items": { 46 + "type": "string", 47 + "format": "language" 48 + } 49 + }, 50 + "labels": { 51 + "type": "ref", 52 + "ref": "com.atproto.label.defs#selfLabels", 53 + "description": "Updated self-applied content labels" 54 + } 55 + } 56 + } 57 + }, 58 + "output": { 59 + "encoding": "application/json", 60 + "schema": { 61 + "type": "object", 62 + "required": ["uri", "cid"], 63 + "properties": { 64 + "uri": { 65 + "type": "string", 66 + "format": "at-uri", 67 + "description": "AT-URI of the updated comment (unchanged from input)" 68 + }, 69 + "cid": { 70 + "type": "string", 71 + "format": "cid", 72 + "description": "New CID of the updated comment record" 73 + } 74 + } 75 + } 76 + }, 77 + "errors": [ 78 + { 79 + "name": "CommentNotFound", 80 + "description": "Comment with the specified URI does not exist" 81 + }, 82 + { 83 + "name": "ContentTooLong", 84 + "description": "Updated comment content exceeds maximum length constraints" 85 + }, 86 + { 87 + "name": "ContentEmpty", 88 + "description": "Updated comment content is empty or contains only whitespace" 89 + }, 90 + { 91 + "name": "NotAuthorized", 92 + "description": "User is not authorized to update this comment (not the author)" 93 + } 94 + ] 95 + } 96 + } 97 + }