···11+# Label Watcher
22+33+>WIP: Will share with a few people, and ofc it's public if you are reading this. But going run locally before telling the whole atmosphere about it and make a docker container
44+55+66+Does what it says. Watches for labels. Okay really it watches for labelers and labels you set. And if it sees a label applied to an account on the PDS it notifies you via email. And will one day do auto take downs as well.
77+88+The idea is we have some awesome labelers like [skywatch.blue](https://bsky.app/profile/skywatch.blue) and [Hailey's Labeler](https://bsky.app/profile/did:plc:saslbwamakedc4h6c5bmshvz) that are doing an amazing job of catching troubled accounts that PDS admins may want to know if they are doing these things on their PDS. This gives an easy way to use these resources to help moderate your PDS. And once auto takedowns are added I think it will be great for PDSs that also run their own labeler to be able to issue takedowns from a manual label added via ozone.
99+1010+1111+1212+1313+1414+# Setup
1515+Got some configs to setup. Use toml to set it up and have an example one at [settings.toml.example](./settings.toml.example). Here you can set
1616+- Which PDSs to follow
1717+- Which labelers and labels
1818+1919+Also have a .env for some shared secrets at [.env.example](.env.example)
2020+2121+2222+Can use pnpm or npm and just do
2323+```bash
2424+pnpm i
2525+pnpm run start
2626+```
2727+2828+2929+# Features
3030+3131+## PDS
3232+- Can backfill and get all active accounts on start up
3333+- Can listen to the PDSs firehose to add new identities as they are created on the PDS
3434+- Does not keep a cursor of the firehose during reboots since it can backfill on start up
3535+- Can set a list of emails to send notifications to of actions taken
3636+- Works for multiple PDSs configured in the settings.toml
3737+3838+## Labeler
3939+- Can subscribe to labels from a labeler. Multiple of each set up in the settings.toml
4040+- Does support backfilling of labels via the cursor on restart so you do not miss any
4141+- Will support full backfill at some point
4242+- Can give each label an action like notify or takedown (will come later). It will take the action and send you an email
+20-14
settings.toml.example
···11[label-watcher.settings]
22-#PDSs to watch
33-pds = ['selfhosted.social']
22+33+#PDSs to watch can have multiple ones
44+[pds.your-pds]
55+host = "your-pds.com"
66+notifyEmails = ["admin@example.com", "another@example.com"]
77+# Will be used for auto take downs on down the road
88+pdsAdminPassword = "secure"
99+# Loads all the historic accounts in
1010+backfillAccounts = true
1111+# Listens for new accounts
1212+listenForNewAccounts = true
41355-# Define the labeler
1414+1515+# Define the labeler. Can do multiple labelers
616[labeler.skywatch]
717host = "ozone.skywatch.blue"
81899-# Can have multiple labels
1010-[labeler.skywatch.labels.test-label]
1111-label_name = "test-label"
1919+# Notifies if an account has elon musk in their description or display name
2020+[labeler.skywatch.labels.elon-musk]
2121+label_name = "elon-musk"
1222action = "notify"
13231414-1515-[labeler.bsky]
1616-host = "mod.bsky.app"
1717-1818-# Can have multiple labels
1919-[labeler.bsky.labels.test-two]
2020-label_name = "test-two"
2121-action = "takedown"
2424+# Notifies if an account has the platform-manipulation label applied
2525+[labeler.skywatch.labels.platform-manipulation]
2626+label_name = "platform-manipulation"
2727+action = "notify"