PDS Admin tool make it easier to moderate your PDS with labels

Add an `ozone-tag` action to surface external labels in an Ozone queue #18

targeting main from spotchi.eurosky.social/label-watcher:ozone-tag
Merged opened by and assigned to spotchi.eurosky.social
targeting main from spotchi.eurosky.social/label-watcher:ozone-tag

For PDS operators who also run their own Ozone instance: this adds a third label action, ozone-tag, that emits a tools.ozone.moderation.defs#modEventTag event for the labeled account into a configured Ozone.

Why: Ozone's queryStatuses can only filter on tags/excludeTags, not labels, and a subject only shows up in the queue at all if it has a status row in that Ozone's own database — which labels from external labelers never create. Converting a watched label into a tag bridges that: the account lands in the moderation queue and can be filtered with ?tags=<tag>.

Config #

[ozone]
serviceDid = "did:plc:yourozoneservice"   # #atproto_labeler fragment optional
pdsHost = "your-pds.com"                  # PDS the mod account lives on
handle = "mod.your-pds.com"
appPassword = "xxxx-xxxx-xxxx-xxxx"

[labeler.bluesky.labels.takedown]
label_name = "!takedown"
action = "ozone-tag"
tag = "ext:bluesky:takedown"    # default: ext:<labeler-key>:<label-value>
# requireWatchedRepo = false    # set to tag accounts beyond your own PDSs
Commits 6

refactor: move label actions behind per-action handlers built by a factory
refactor: turn labels_applied into an event log keyed on the label event
perf: throttle labeler cursor writes to every 100 messages
feat: add ozone-tag action to surface labels in an Ozone queue
fix: return the handleNewLabel promise to the label queue
fix: match labels on label_name instead of the config key