config.ts#
This module is responsible for loading and exporting all configuration variables for the application. It uses the dotenv library to load environment variables from a .env file into process.env.
It provides default values for most variables, ensuring the application can run in a development environment with minimal setup.
Configuration Variables#
-
MOD_DID: The DID of the moderation account that will be performing the labeling and reporting actions.- Loaded from
process.env.DID. - Default:
""
- Loaded from
-
OZONE_URL: The URL for the Ozone service. (Note: This variable is exported but does not appear to be used in the current codebase).- Loaded from
process.env.OZONE_URL. - Default:
""
- Loaded from
-
OZONE_PDS: The hostname of the PDS (Personal Data Server) where the Ozone service is hosted. This is used to configure theAtpAgent.- Loaded from
process.env.OZONE_PDS. - Default:
""
- Loaded from
-
BSKY_HANDLE: The handle (username) of the moderation bot account used for logging in.- Loaded from
process.env.BSKY_HANDLE. - Default:
""
- Loaded from
-
BSKY_PASSWORD: The application password for the moderation bot account.- Loaded from
process.env.BSKY_PASSWORD. - Default:
""
- Loaded from
-
HOST: The hostname that the metrics server will bind to.- Loaded from
process.env.HOST. - Default:
"0.0.0.0"
- Loaded from
-
METRICS_PORT: The port for the Prometheus metrics server.- Loaded from
process.env.METRICS_PORT. - Default:
4101
- Loaded from
-
FIREHOSE_URL: The WebSocket URL for the Bluesky firehose (Jetstream) service.- Loaded from
process.env.FIREHOSE_URL. - Default:
"wss://jetstream.atproto.tools/subscribe"
- Loaded from
-
PLC_URL: The hostname of the PLC directory (DID registry) used for resolvingdid:plc:creation dates.- Loaded from
process.env.PLC_URL. - Default:
"plc.directory"
- Loaded from
-
WANTED_COLLECTION: An array of AT Protocol collection names that the firehose client should subscribe to. The bot will only receive events for these collections.- Default:
["app.bsky.feed.post", "app.bsky.actor.defs", "app.bsky.actor.profile"]
- Default:
-
CURSOR_UPDATE_INTERVAL: The interval in milliseconds at which the firehose cursor position is saved to disk.- Loaded from
process.env.CURSOR_UPDATE_INTERVAL. - Default:
60000(1 minute)
- Loaded from
-
LABEL_LIMITandLABEL_LIMIT_WAIT: These appear to be legacy or unused configuration variables related to a previous rate-limiting implementation. They are destructured fromprocess.envbut are not used elsewhere in the code. -
REDIS_URL: The connection URL for the Redis server.- Loaded from
process.env.REDIS_URL. - Default:
"redis://redis:6379"
- Loaded from