-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomment.json
More file actions
135 lines (135 loc) · 4.35 KB
/
comment.json
File metadata and controls
135 lines (135 loc) · 4.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
"name": "Comment",
"access": {
"anon": "Can read public comments but cannot create sign-in-required comments.",
"user": "Can post, reply, react, edit, and delete their own comments; suspended users cannot post new comments.",
"admin": "Can hide, delete, and moderate comments, and handle reports or suspensions.",
"agent": "No comment read/write capability is currently provided."
},
"rules": {
"attached-to-object": "Comments must be attached to a specific object; no decontextualized public feed entry is provided.",
"attached-object-types": "Attached objects include courses, sections, teachers, homework, and section-teacher relationships.",
"rich-content": "Supports Markdown, math formulas, emoji, tables, replies, and reactions.",
"visibility-modes": "Supports public, signed-in-only, and anonymous posting; anonymous comments hide identity from regular users but are traceable by admins in governance scenarios."
},
"capabilities": {
"object-comment-section": {
"title": "Object Comment Section",
"auth": "anon",
"web": "stable",
"rest": {
"routes": [
{
"path": "/api/comments",
"returns": "{ comments: Comment[], hiddenCount: Int, viewer, target }"
},
{
"path": "/api/comments",
"method": "POST",
"returns": "{ id: String }",
"auth": "user"
},
{
"path": "/api/comments/[id]",
"method": "PATCH",
"returns": "{ success: Boolean, comment: Comment }",
"auth": "user"
},
{
"path": "/api/comments/[id]",
"method": "DELETE",
"returns": "{ success: Boolean }",
"auth": "user"
},
{
"path": "/api/comments/[id]/reactions",
"method": "POST",
"returns": "{ success: Boolean }",
"auth": "user"
},
{
"path": "/api/comments/[id]",
"returns": "{ thread: Comment[], focusId: String, hiddenCount: Int, viewer, target }"
},
{
"path": "/api/comments/[id]/reactions",
"method": "DELETE",
"returns": "{ success: Boolean }",
"auth": "user"
}
]
},
"mcp": "unavailable",
"display": {
"fields": [
"comment.id",
"comment.author.name",
"comment.author.image (avatar)",
"comment.body (markdown-rendered)",
"comment.createdAt (timestamp)",
"comment.updatedAt / edited timestamp",
"comment.visibility badges",
"comment.status (non-active states)",
"comment.reactions[] (counts per reaction type)",
"comment.replies[] (threaded)",
"comment.attachments[] filename/open action",
"canReply/canEdit/canModerate actions",
"Copy link action"
]
}
},
"comment-governance": {
"title": "Comment Governance",
"auth": "admin",
"web": {
"pages": ["/admin/moderation"]
},
"rest": {
"routes": [
{
"path": "/api/admin/comments",
"returns": "{ comments: Comment[] }"
},
{
"path": "/api/admin/comments/[id]",
"method": "PATCH",
"returns": "{ comment: Comment }"
},
{
"path": "/api/admin/suspensions",
"method": "POST",
"returns": "{ suspension: Suspension }"
},
{
"path": "/api/admin/suspensions/[id]",
"method": "PATCH",
"returns": "{ suspension: Suspension }"
}
]
},
"mcp": "unavailable",
"display": {
"fields": [
"comment.body/content preview",
"comment.author.name",
"target object",
"creation timestamp",
"Status: active/softbanned/deleted",
"Suspended filter",
"Status radio + confirm action",
"Suspension controls"
]
}
},
"comment-auxiliary-pages": {
"title": "Comment Auxiliary Pages",
"auth": "anon",
"web": {
"pages": ["/comments/[id]", "/guides/markdown-support"]
},
"display": {
"fields": ["Comment guidelines/help pages"]
}
}
}
}