Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - 3rd party labelers #2032

Merged
merged 305 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
d828187
adding some basic views
dholms Dec 7, 2023
a5c227a
feed hydration, add blocks to post hydration
devinivy Dec 7, 2023
bdd2fb8
pass over notification hydration
devinivy Dec 7, 2023
8d669bf
tidy
devinivy Dec 7, 2023
fc70842
merge
dholms Dec 7, 2023
4fb3d24
implement getProfile
dholms Dec 7, 2023
6d162a0
hydrate post aggregation and viewer state
devinivy Dec 7, 2023
95bad68
fix
devinivy Dec 7, 2023
b1dfbde
fix codegen
dholms Dec 7, 2023
2298406
get some tests passing!
dholms Dec 8, 2023
4ab0bbb
add takedowns & some like bugfixing
dholms Dec 8, 2023
9fd84ea
all profile tests passing!
dholms Dec 8, 2023
39aa7b4
likes test
dholms Dec 8, 2023
5cd6fc7
follow endpoints using data plane
devinivy Dec 8, 2023
eedc2ea
reorg follow block rules
devinivy Dec 8, 2023
9d64919
reposts
dholms Dec 8, 2023
7fb5ea9
post views!
dholms Dec 8, 2023
7395f8d
implement getList w/ dataplane caveat
devinivy Dec 8, 2023
571f9f6
adjust dataplane getListMembers to return listitem uris
devinivy Dec 8, 2023
640b792
implement getListMutes and -Blocks w/ dataplane
devinivy Dec 8, 2023
c342d38
suggestions
dholms Dec 8, 2023
0126f08
timeline
dholms Dec 9, 2023
a9e7148
misc view fixes
devinivy Dec 11, 2023
49d79ee
view fixes for mutes, self-mute/block
devinivy Dec 11, 2023
bb3d377
author feed
dholms Dec 12, 2023
396e210
feed gen routes
dholms Dec 12, 2023
1ad4b84
tidy
dholms Dec 12, 2023
bee9c6d
misc block/mute fixes
devinivy Dec 12, 2023
19f2f47
list feed & actor likes
dholms Dec 12, 2023
97fcb3c
implement getLists, fix some empty cursors
devinivy Dec 12, 2023
cd4b277
implement getMutes, empty profile description fix
devinivy Dec 12, 2023
265a2e3
implement getBlocks, block application fix
devinivy Dec 13, 2023
12e8edb
implement getSuggestedFollowsByActor, needs some fixes
devinivy Dec 13, 2023
0db39b6
feed generation
dholms Dec 12, 2023
b6fb606
search routes
dholms Dec 13, 2023
e358500
threads
dholms Dec 13, 2023
defb28c
tidy
dholms Dec 13, 2023
4266b3a
fix some snaps
dholms Dec 13, 2023
d7fdc08
fix getSuggestedFollowsByActor
devinivy Dec 13, 2023
10a10b8
implement listNotifications
devinivy Dec 13, 2023
17bdb01
implement getUnreadCount w/ dataplane
devinivy Dec 13, 2023
3707a75
implement notifications.updateSeen w/ dataplane
devinivy Dec 13, 2023
1f78afa
3rd party blocking tests
dholms Dec 13, 2023
7d249bd
blocked profile viewer
dholms Dec 13, 2023
9f92374
add search mocks
dholms Dec 13, 2023
69d8a2b
refactor getFeed
dholms Dec 14, 2023
c13fca9
createPipeline -> createPipelineNew
dholms Dec 14, 2023
a4dc101
basic replygating functionality on dataplane w/o filtering violating …
devinivy Dec 14, 2023
764e0da
hack threadgates into dataplane, apply gates
devinivy Dec 14, 2023
cecc669
deterministic thread orders in dataplane
devinivy Dec 14, 2023
f089eb5
misc cleanup around dataplane
devinivy Dec 15, 2023
f6de678
upgrade typescript to v5.3
devinivy Dec 15, 2023
549b464
update typescript linter deps
devinivy Dec 15, 2023
70cf5c2
sync bsky proto, codegen
devinivy Dec 19, 2023
9574a86
update dataplane, sync with bsky proto updates
devinivy Dec 19, 2023
d8aa699
remove indexer, ingester, daemon, moderation services from appview
devinivy Dec 20, 2023
61a0389
convert more bsky internals to dataplane, remove custom feedgens, imp…
devinivy Dec 20, 2023
96f3828
remove bsky services. db and indexing logic into mock dataplane.
devinivy Dec 20, 2023
c3fb682
remove tests not needed by appview v2, misc reorg
devinivy Dec 20, 2023
975ba4d
add basic in-mem repo subscription to dataplane mock
devinivy Dec 21, 2023
a48903d
fix dev-env, bsky tests, bsky build
devinivy Dec 21, 2023
8371879
cull bsky service entrypoint
devinivy Dec 21, 2023
012c754
add bsky service readme
devinivy Dec 21, 2023
f2edcfd
build
devinivy Dec 21, 2023
a93ae30
tidy
devinivy Dec 21, 2023
9229cc2
tidy, fix pds proxy tests
devinivy Dec 21, 2023
22b3c2f
Merge pull request #1939 from bluesky-social/bav-v2-hydration
devinivy Dec 21, 2023
3b85cbf
fix
devinivy Dec 22, 2023
3b9a5cb
fix bsky entrypoint deps
devinivy Dec 22, 2023
e8258eb
support http2 grpc client
devinivy Dec 26, 2023
438025e
build
devinivy Dec 27, 2023
f431958
fix dataplane bad tls config/default
devinivy Dec 27, 2023
1dab449
support multiple dataplane urls, retry when unavailable
devinivy Dec 27, 2023
065149a
build
devinivy Dec 27, 2023
6f05b42
tidy/fix
devinivy Dec 27, 2023
1da49cc
move dataplane mock tests into their own dir
devinivy Dec 29, 2023
62603e0
cover label hydration through timeline test
devinivy Dec 29, 2023
b40e8c6
bring back labels in appview tests
devinivy Dec 29, 2023
9b2153f
remove unused db primary/replica/coordinator from bsky dataplane
devinivy Dec 29, 2023
1d8a4f1
Merge pull request #1982 from bluesky-social/bav-v2-drop-pg
devinivy Dec 29, 2023
3feee71
Merge pull request #1992 from bluesky-social/bav-v2-config-pass1
devinivy Dec 29, 2023
c67e1f1
Merge pull request #1993 from bluesky-social/bav-v2-dataplane-clients
devinivy Dec 29, 2023
8668a2f
bsky proto add cids to contracts, buf codegen
devinivy Jan 2, 2024
246fb09
sync-up bsky data-plane w/ codegen updates
devinivy Jan 2, 2024
1ca11d2
start using dataplane interaction endpoints
devinivy Jan 2, 2024
36b72bf
add file
devinivy Jan 2, 2024
dd6fe98
Merge pull request #2008 from bluesky-social/appview-v2-proto-cids
devinivy Jan 2, 2024
5e829ff
avoid overfetching from dataplane, plumb feed items and cids
devinivy Jan 3, 2024
0b6752a
pass refs through for post viewer state
devinivy Jan 3, 2024
bebb77b
Lexicons: Add labeler prefs, labeler declaration, and get labeler routes
pfrazee Jan 4, 2024
59d6cf7
Add labelerViewBasic and update embed views
pfrazee Jan 4, 2024
9b944f8
Fix typo
pfrazee Jan 4, 2024
53c33f2
switch list feeds to use feed item in dataplane
devinivy Jan 5, 2024
fabb122
handle not found err on get-thread dataplane call
devinivy Jan 5, 2024
34d3a7c
support use of search service rather than dataplane methods
devinivy Jan 5, 2024
deb8c4d
mark some appview v2 todos
devinivy Jan 6, 2024
3d71d89
tidy
devinivy Jan 6, 2024
45c6237
still use dataplane on search endpoints when search service is not co…
devinivy Jan 6, 2024
f006a08
fix pds test
devinivy Jan 6, 2024
03b6ef6
Switch to labelerViewDetailed
pfrazee Jan 8, 2024
354d63c
Move label and report values to refs
pfrazee Jan 8, 2024
d513e5d
Add getActorLabelers
pfrazee Jan 8, 2024
4463443
lint
dholms Jan 8, 2024
88f2f21
merge main
dholms Jan 9, 2024
98613e9
fix up bsky tests & snaps
dholms Jan 9, 2024
f937800
small diff to open pr
dholms Jan 9, 2024
2362de4
rm new line
dholms Jan 9, 2024
169c359
Merge pull request #2016 from bluesky-social/3p-labeler-schemas
dholms Jan 9, 2024
418d700
codegen schemas
dholms Jan 9, 2024
14d8773
tidy migrations
dholms Jan 9, 2024
ce9dc75
Merge branch 'appview-v2' into 3p-labelers
dholms Jan 9, 2024
1880a21
Merge branch '3p-labelers' into 3p-labeler-record-handling
dholms Jan 9, 2024
da9f699
table + indexing
dholms Jan 9, 2024
2363c0a
protos
dholms Jan 9, 2024
1b7ee9f
rename lexicons
dholms Jan 9, 2024
15268b5
views, hydration + rename lexicons
dholms Jan 9, 2024
d27af5d
rest of routes
dholms Jan 9, 2024
83dbced
data plane routes
dholms Jan 9, 2024
7edc5cc
parse labelers from req
dholms Jan 9, 2024
807b38a
fix appview-v2 docker build
devinivy Jan 9, 2024
0a45fea
Support label issuer tied to appview v2 (#2033)
devinivy Jan 9, 2024
9cbf2bf
hydrate context
dholms Jan 10, 2024
90e45e6
tidy header logic
dholms Jan 10, 2024
5c92f03
integrating into more routes
dholms Jan 10, 2024
73cf9cd
more routes
dholms Jan 10, 2024
d6ab359
wrap up rest
dholms Jan 10, 2024
bc6b0d8
add mock labeler
dholms Jan 10, 2024
3852574
rework labelerlexicons
dholms Jan 11, 2024
016c4a8
merge lex rework
dholms Jan 11, 2024
2686f3d
tidy lexs
dholms Jan 11, 2024
75a4a77
Merge branch '3p-labeler-lex-rework' into 3p-labeler-record-handling
dholms Jan 11, 2024
08fdcba
codegen new lexicons
dholms Jan 11, 2024
788d4fc
integrate lexicon rework
dholms Jan 11, 2024
571e144
merge
dholms Jan 11, 2024
fc99baf
add proxy logic
dholms Jan 11, 2024
d63ef89
Merge branch '3p-labeler-record-handling' into 3p-labeler-hydration
dholms Jan 11, 2024
3c9ebbe
forward labeler headers through pds
dholms Jan 11, 2024
78866a6
tweak label header parsing
dholms Jan 11, 2024
0cf9b8b
remove did from scheams
dholms Jan 11, 2024
a4eff3e
Merge branch '3p-labeler-lex-rework' into 3p-labeler-record-handling
dholms Jan 11, 2024
2d7267b
update indexing for lexs
dholms Jan 11, 2024
cd68c4e
tests for mod service views
dholms Jan 11, 2024
ad37bb3
Merge branch '3p-labeler-record-handling' into 3p-labeler-hydration
dholms Jan 11, 2024
e8d97f4
label hydration test
dholms Jan 11, 2024
c2d0cd7
Add 'associated' to profileViewDetailed
pfrazee Jan 11, 2024
ececc93
Rename labelers to mods in preferences
pfrazee Jan 11, 2024
0a7b8a8
Change uri to did in mod preferences
pfrazee Jan 11, 2024
5ba01bd
couple more
dholms Jan 11, 2024
027ebfc
merge
dholms Jan 11, 2024
9de677b
syntax tweaks
dholms Jan 11, 2024
32624d4
Merge branch '3p-labeler-lex-rework' into 3p-labeler-record-handling
dholms Jan 11, 2024
4e99c06
integrate updated lexicons
dholms Jan 11, 2024
8d90f05
update view snap
dholms Jan 11, 2024
2007a24
Merge branch '3p-labeler-record-handling' into 3p-labeler-hydration
dholms Jan 11, 2024
104f971
handle mod service embeds
dholms Jan 11, 2024
57ab568
merge
dholms Jan 11, 2024
c515712
tidy
dholms Jan 12, 2024
45dfdff
fix mock
dholms Jan 12, 2024
5a6915f
Merge branch 'appview-v2' into 3p-labelers
dholms Jan 12, 2024
d28a069
Merge branch '3p-labelers' into 3p-labeler-lex-rework
dholms Jan 12, 2024
d7efab1
lint
dholms Jan 12, 2024
c52332f
Merge branch '3p-labeler-lex-rework' into 3p-labeler-record-handling
dholms Jan 12, 2024
1718b63
Merge branch '3p-labeler-record-handling' into 3p-labeler-hydration
dholms Jan 12, 2024
1583176
Merge pull request #2040 from bluesky-social/3p-labeler-lex-rework
dholms Jan 12, 2024
7bab77e
base default labels of config var
dholms Jan 12, 2024
9465429
fix label hydration
dholms Jan 12, 2024
cbfe0b9
Merge remote-tracking branch 'origin/appview-v2-fix-overfetching1' in…
devinivy Jan 12, 2024
1c14449
Merge remote-tracking branch 'origin/appview-v2-not-found-search' int…
devinivy Jan 12, 2024
f2cfd45
Appview v2: handle empty cursor on list notifications (#2017)
devinivy Jan 12, 2024
c592ae8
Update appview v2 to use author feed enum (#2047)
devinivy Jan 15, 2024
59704b3
Appview v2: utilize sorted-at field in bsky protos (#2050)
devinivy Jan 15, 2024
75d3079
remove all dataplane usage of GetLikeCounts, switch to GetInteraction…
devinivy Jan 16, 2024
3c6287a
Appview v2, sync w/ changes to protos (#2071)
devinivy Jan 24, 2024
2178b15
Appview v2 initial implementation for getPopularFeedGenerators (#2072)
devinivy Jan 24, 2024
c8129d5
merge
dholms Jan 25, 2024
9935a76
fixes
dholms Jan 25, 2024
3e8431e
fix feed tests
dholms Jan 25, 2024
37ac9b4
fix bsync mock
dholms Jan 25, 2024
714b117
format
dholms Jan 25, 2024
8194bc1
remove unused config
devinivy Jan 25, 2024
96a5a9b
final merge
dholms Jan 25, 2024
827f9e7
fix lockfile
dholms Jan 25, 2024
8f5306f
another lockfile fix
dholms Jan 25, 2024
0fb4e5b
fix duplicate type
dholms Jan 25, 2024
82c0855
fix dupplicate test
dholms Jan 25, 2024
6a664ed
Appview v2 handling clearly bad cursors (#2092)
devinivy Jan 25, 2024
ad72ef7
Appview v2 no notifs seen behavior (#2096)
devinivy Jan 25, 2024
29230db
Appview v2 dataplane retries based on client host (#2098)
devinivy Jan 25, 2024
ed9e234
don't apply negated labels
devinivy Jan 26, 2024
6dd9331
display suspensions on actor profile in appview v2
devinivy Jan 26, 2024
b47e28d
Appview v2 use dataplane for identity lookups (#2095)
devinivy Jan 26, 2024
8e59aad
Appview v2: apply safe takedown refs to records, actors (#2107)
devinivy Jan 29, 2024
abf4d44
Fix timing on appview v2 repo rev header (#2113)
dholms Jan 30, 2024
a2b51fb
fix post thread responses
devinivy Jan 30, 2024
464faba
Appview v2 don't apply 3p self blocks (#2112)
devinivy Jan 31, 2024
1970529
Appview v2 search for feed generators (#2118)
devinivy Jan 31, 2024
be4dc5a
Appview v2 config tidy (#2117)
devinivy Feb 2, 2024
b292023
Appview v2: don't apply missing modlists (#2122)
dholms Feb 2, 2024
374d2b8
Appview v2 enforce post thread root boundary (#2120)
devinivy Feb 2, 2024
5cd08e4
Appview v2 fix admin environment variable (#2137)
devinivy Feb 5, 2024
e610da9
Remove re-pagination from getSuggestions (#2145)
devinivy Feb 7, 2024
94a59e5
Adjust wording for account suspension (#2153)
dholms Feb 8, 2024
593ee1e
Merge pull request #2034 from bluesky-social/3p-labeler-record-handling
dholms Feb 13, 2024
901acb9
Merge pull request #2035 from bluesky-social/3p-labeler-hydration
dholms Feb 13, 2024
8497d18
Appview v2: fix not-found and blocked uris in threads (#2201)
devinivy Feb 20, 2024
c2a6577
:sparkles: Show author feed of takendown author to admins only (#2197)
foysalit Feb 20, 2024
ae0180a
fold in cid, auth, tracing, node version changes
devinivy Feb 26, 2024
d65d814
Merge remote-tracking branch 'origin/main' into appview-v2-merge
devinivy Feb 26, 2024
ed97d0a
remove dead config from bsky service entrypoint
devinivy Feb 26, 2024
bba2eb4
build
devinivy Feb 26, 2024
f855938
remove ozone test codepaths for appview v2
devinivy Feb 26, 2024
5a60f5d
tidy, docs fix
devinivy Feb 26, 2024
142cdb8
merge appview-v2
dholms Feb 26, 2024
a65beef
fix test
dholms Feb 26, 2024
87a87d6
add additional user counts
dholms Feb 26, 2024
4253c62
add associated data to profiles
dholms Feb 27, 2024
543df85
update snaps
dholms Feb 27, 2024
5d860cf
update to is_mod_service
dholms Feb 27, 2024
4608ad2
Merge pull request #2231 from bluesky-social/appview-v2-merge
devinivy Feb 27, 2024
5b39f7c
format
devinivy Feb 27, 2024
c636761
Merge remote-tracking branch 'origin/appview-v2' into 3p-labelers
devinivy Feb 27, 2024
fb70b3b
tidy
devinivy Feb 27, 2024
b1f3f94
merge main
dholms Feb 27, 2024
1f93719
merge
dholms Feb 27, 2024
4ba6266
3p labeler sdk updates (#2176)
pfrazee Feb 28, 2024
4f42f34
Lexicon: Add custom label definitions and remove modservice descriptions
pfrazee Feb 28, 2024
4f7ca51
Lexicon: Update moderation prefs
pfrazee Feb 28, 2024
6b53142
SDK updates: remove label groups, reduce builtin labels, update mod-p…
pfrazee Feb 28, 2024
8097adf
Lexicon: Update global labels with new reduced set
pfrazee Feb 29, 2024
6334f33
Lexicon: Remove moderation.getService and add detailed option to getS…
pfrazee Feb 29, 2024
be81d51
Lexicons: add severity=none to custom label value defs
pfrazee Feb 29, 2024
ce9ffd4
Implement custom label-value definition tooling
pfrazee Feb 29, 2024
36fb2bf
All custom labels are no-self
pfrazee Mar 1, 2024
a03632f
Backend impl for labeler lexicon updates (#2258)
dholms Mar 1, 2024
343927e
Lexicon: modservice -> labeler
pfrazee Mar 2, 2024
0f615b5
Remove x- prefix behavior; add label value syntax rules; add custom l…
pfrazee Mar 2, 2024
94d8eb5
Lexicon: Remove the ability to choose a defaultSetting from custom la…
pfrazee Mar 2, 2024
e3b33a5
Rework test suites
pfrazee Mar 2, 2024
05331d1
Give behaviors to all labels regardless of target
pfrazee Mar 2, 2024
bfd942d
sync up backend with lex changes
dholms Mar 4, 2024
375a4ca
fix labelers in dev-env agent
dholms Mar 4, 2024
a34dae9
lint protos
dholms Mar 4, 2024
8f48d4d
Merge pull request #2237 from bluesky-social/3p-labelers-lexicon-updates
dholms Mar 4, 2024
ef31c71
Merge branch '3p-labelers' into profile-associated
dholms Mar 4, 2024
31b19dd
update protos & views
dholms Mar 4, 2024
e8a53f2
small bugfix & update tests
dholms Mar 4, 2024
e4554a5
Merge pull request #2232 from bluesky-social/profile-associated
dholms Mar 4, 2024
4acf5fc
tweak protos
dholms Mar 6, 2024
c0e0006
merge main
dholms Mar 6, 2024
cc40e86
fix build issue from merge
dholms Mar 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 41 additions & 1 deletion lexicons/app/bsky/actor/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"followersCount": { "type": "integer" },
"followsCount": { "type": "integer" },
"postsCount": { "type": "integer" },
"associated": {
"type": "ref",
"ref": "#profileAssociated"
},
"indexedAt": { "type": "string", "format": "datetime" },
"viewer": { "type": "ref", "ref": "#viewerState" },
"labels": {
Expand All @@ -75,6 +79,14 @@
}
}
},
"profileAssociated": {
"type": "object",
"properties": {
"lists": { "type": "integer" },
"feedgens": { "type": "integer" },
"labeler": { "type": "boolean" }
}
},
"viewerState": {
"type": "object",
"description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
Expand Down Expand Up @@ -122,10 +134,15 @@
"type": "object",
"required": ["label", "visibility"],
"properties": {
"labelerDid": {
"type": "string",
"description": "Which labeler does this preference apply to? If undefined, applies globally.",
"format": "did"
},
"label": { "type": "string" },
"visibility": {
"type": "string",
"knownValues": ["show", "warn", "hide"]
"knownValues": ["ignore", "show", "warn", "hide"]
}
}
},
Expand Down Expand Up @@ -270,6 +287,29 @@
"description": "A list of URIs of posts the account owner has hidden."
}
}
},
"modsPref": {
"type": "object",
"required": ["mods"],
"properties": {
"mods": {
"type": "array",
"items": {
"type": "ref",
"ref": "#modPrefItem"
}
}
}
},
"modPrefItem": {
"type": "object",
"required": ["did"],
"properties": {
"did": {
"type": "string",
"format": "did"
}
}
}
}
}
3 changes: 2 additions & 1 deletion lexicons/app/bsky/embed/record.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"#viewNotFound",
"#viewBlocked",
"app.bsky.feed.defs#generatorView",
"app.bsky.graph.defs#listView"
"app.bsky.graph.defs#listView",
"app.bsky.labeler.defs#labelerView"
]
}
}
Expand Down
70 changes: 70 additions & 0 deletions lexicons/app/bsky/labeler/defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"lexicon": 1,
"id": "app.bsky.labeler.defs",
"defs": {
"labelerView": {
"type": "object",
"required": ["uri", "cid", "creator", "indexedAt"],
"properties": {
"uri": { "type": "string", "format": "at-uri" },
"cid": { "type": "string", "format": "cid" },
"creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" },
"likeCount": { "type": "integer", "minimum": 0 },
"viewer": { "type": "ref", "ref": "#labelerViewerState" },
"indexedAt": { "type": "string", "format": "datetime" },
"labels": {
"type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
}
}
},
"labelerViewDetailed": {
"type": "object",
"required": ["uri", "cid", "creator", "policies", "indexedAt"],
"properties": {
"uri": { "type": "string", "format": "at-uri" },
"cid": { "type": "string", "format": "cid" },
"creator": { "type": "ref", "ref": "app.bsky.actor.defs#profileView" },
"policies": {
"type": "ref",
"ref": "app.bsky.labeler.defs#labelerPolicies"
},
"likeCount": { "type": "integer", "minimum": 0 },
"viewer": { "type": "ref", "ref": "#labelerViewerState" },
"indexedAt": { "type": "string", "format": "datetime" },
"labels": {
"type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
}
}
},
"labelerViewerState": {
"type": "object",
"properties": {
"like": { "type": "string", "format": "at-uri" }
}
},
"labelerPolicies": {
"type": "object",
"required": ["labelValues"],
"properties": {
"labelValues": {
"type": "array",
"description": "The label values which this labeler publishes. May include global or custom labels.",
"items": {
"type": "ref",
"ref": "com.atproto.label.defs#labelValue"
}
},
"labelValueDefinitions": {
"type": "array",
"description": "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",
"items": {
"type": "ref",
"ref": "com.atproto.label.defs#labelValueDefinition"
}
}
}
}
}
}
43 changes: 43 additions & 0 deletions lexicons/app/bsky/labeler/getServices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "app.bsky.labeler.getServices",
"defs": {
"main": {
"type": "query",
"description": "Get information about a list of labeler services.",
"parameters": {
"type": "params",
"required": ["dids"],
"properties": {
"dids": {
"type": "array",
"items": { "type": "string", "format": "did" }
},
"detailed": {
"type": "boolean",
"default": false
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["views"],
"properties": {
"views": {
"type": "array",
"items": {
"type": "union",
"refs": [
"app.bsky.labeler.defs#labelerView",
"app.bsky.labeler.defs#labelerViewDetailed"
]
}
}
}
}
}
}
}
}
26 changes: 26 additions & 0 deletions lexicons/app/bsky/labeler/service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"lexicon": 1,
"id": "app.bsky.labeler.service",
"defs": {
"main": {
"type": "record",
"description": "A declaration of the existence of labeler service.",
"key": "literal:self",
"record": {
"type": "object",
"required": ["policies", "createdAt"],
"properties": {
"policies": {
"type": "ref",
"ref": "app.bsky.labeler.defs#labelerPolicies"
},
"labels": {
"type": "union",
"refs": ["com.atproto.label.defs#selfLabels"]
},
"createdAt": { "type": "string", "format": "datetime" }
}
}
}
}
}
67 changes: 67 additions & 0 deletions lexicons/com/atproto/label/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,73 @@
"description": "The short string name of the value or type of this label."
}
}
},
"labelValueDefinition": {
"type": "object",
"description": "Declares a label value and its expected interpertations and behaviors.",
"required": ["identifier", "severity", "blurs", "locales"],
"properties": {
"identifier": {
"type": "string",
"description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
"maxLength": 100,
"maxGraphemes": 100
},
"severity": {
"type": "string",
"description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
"knownValues": ["inform", "alert", "none"]
},
"blurs": {
"type": "string",
"description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",
"knownValues": ["content", "media", "none"]
},
"locales": {
"type": "array",
"items": { "type": "ref", "ref": "#labelValueDefinitionStrings" }
}
}
},
"labelValueDefinitionStrings": {
"type": "object",
"description": "Strings which describe the label in the UI, localized into a specific language.",
"required": ["lang", "name", "description"],
"properties": {
"lang": {
"type": "string",
"description": "The code of the language these strings are written in.",
"format": "language"
},
"name": {
"type": "string",
"description": "A short human-readable name for the label.",
"maxGraphemes": 64,
"maxLength": 640
},
"description": {
"type": "string",
"description": "A longer description of what the label means and why it might be applied.",
"maxGraphemes": 10000,
"maxLength": 100000
}
}
},
"labelValue": {
"type": "string",
"knownValues": [
"!hide",
"!no-promote",
"!warn",
"!no-unauthenticated",
"dmca-violation",
"doxxing",
"porn",
"sexual",
"nudity",
"nsfl",
"gore"
]
}
}
}