A tool for parsing traffic on the jetstream and applying a moderation workstream based on regexp based rules

v2.1.0: Starter pack threshold, label negation, login retry & documentation #4

closed
opened by skywatch.blue targeting main from 2.1.0

Summary#

  • New starter pack threshold monitoring system for detecting follow-farming
  • Account label negation support (remove labels when criteria no longer match)
  • Login retry logic with configurable attempts
  • Configurable time window units (minutes, hours, days) for threshold labeling
  • Refactored profile checking into single unified function

New Features#

Starter Pack Threshold System#

  • New src/starterPackThreshold.ts module
  • Monitors starter pack creation per account within rolling time windows
  • Configurable threshold, window, and actions (label/report/comment)
  • Per-config allowlist support
  • 3 new Prometheus metrics for monitoring

Label Negation#

  • New negateAccountLabel() function in accountModeration
  • New getAllAccountLabels() to retrieve current labels
  • New deleteAccountLabelClaim() for Redis cache invalidation
  • Enables unlabel: true in check configs to auto-remove labels

Configurable Window Units#

  • Changed from windowDays: number to window: number + windowUnit: WindowUnit
  • Supports "minutes", "hours", "days"
  • Applies to both account threshold and starter pack threshold

Login Retry#

  • Agent now retries login up to 3 times with 2s delay
  • Graceful failure after exhausting retries

Profile Check Refactor#

  • Combined checkDescription + checkDisplayName into single checkProfile function
  • Cleaner event handling in main.ts
0
by skywatch.blue 0 comments
expand 1 commit
docs: Update documentation to reflect starter pack threshold feature
sign up or login to add to the discussion
1
by skywatch.blue 0 comments
expand 95 commits
Update lists.ts
Refactor moderation flags for granular control
Updates from private repo to add functionality for unpacking shortened links.
Enhance moderation checks with detailed logging and new monitoring functions for descriptions and display names
Update package.json
Add missing dependency
10: Update constants.ts.example to add const langs
17: Removed skywatch specific label hardcoding from checkPosts
Create FUNDING.yml
16: Update readme.md
16: Minor updates to defaults
Adds a docker-compose file for easier container management and cursor persistence
Updated to account for docker compose
Update language management to be more explicit
Update conditionals
Minor fixes
Minor fixes
Documentation updates
Added support for checking embeds to external sources
Revert "Added support for checking embeds to external sources"
Added support for checking embeds to external sources
Test updates
Fix: Add error handling and cleanup
feat: Handle embeds in posts
fix: resolve unsafe type assertions in main.ts
Added claude instructions
fix: improve async error handling in main.ts
fix: resolve linting issues in moderation.ts
fix: resolve linting issues in checkProfiles.ts
fix: resolve linting issues in check modules
fix: remove unnecessary type check in utils.ts
docs: update CLAUDE.md to reflect completed async error handling fixes
Add eslint and git add to allowed commands
Add ESLint configuration
feat: add comprehensive environment variable validation at startup
Add more tasks to local settings
feat: Add environment variable validation
Reverting
feat: Add workflow guidelines and project documentation
feat(language-detection): replace lande with franc for improved language detection
test: add comprehensive tests for franc language detection
$(cat <<'EOF' refactor: revert franc, improve code quality, and cleanup unused files
$(cat <<'EOF' feat(language-detection): restore franc implementation
Remove GEMINI.md and Update README
Remove TODO section from README
Added rule and logic to detect if accounts are abusing faceting by pushing multiple facets in same byte space
Corrected path name and added tests
non-malicious bots were catching strays over hashtags
Update facet detection to allow for exact duplicates
feat: Add global allowlist for DIDs
Add facet spam allowlist (to allow for test scenarios)
Added functionality to detect accounts created specifically to harrass, spam, or astroturf
Refactor account age module
Fixed stupid mistake in global allow listing
Refactor account age check to use a date window
feat: Add check to avoid duplicate account age labels
Fix: Use plc.directory and improve account age lookups
src/types.ts:68 - added optional expires?: string field to AccountAgeCheck interface 2. src/rules/account/age.ts:117-128 - added logic to skip expired checks by comparing current date against expires date 3. src/rules/account/ageConstants.ts:24 - updated example to show how to use the new field 4. added 3 tests to verify: - expired checks are skipped - non-expired checks still work - checks without expires field work (backward compatible)
src/types.ts:63-64 - added optional monitoredPostURIs field, made monitoredDIDs optional (at least one must be provided) 2. src/rules/account/age.ts:13 - added optional replyToPostURI to ReplyContext interface 3. src/rules/account/age.ts:113-123 - updated logic to check both monitoredDIDs and monitoredPostURIs (matches if either condition is true) 4. src/rules/account/ageConstants.ts:27-38 - added example showing how to monitor specific post URIs 5. added 4 tests covering: - monitoring post URIs - ignoring non-matching post URIs - matching either DIDs OR post URIs - backward compatibility (works without replyToPostURI)
src/rules/account/age.ts:8-22 - renamed ReplyContext โ†’ InteractionContext, added quotedDid and quotedPostURI fields for quote posts, actorDid as the common actor field 2. src/rules/account/age.ts:123-149 - updated matching logic to check both replies (replyToDid/replyToPostURI) AND quotes (quotedDid/quotedPostURI) 3. src/rules/account/ageConstants.ts:3-12 - updated documentation to reflect reply/quote monitoring 4. added 4 new tests covering: - labeling when quoting monitored DID - labeling when quoting monitored post URI - not labeling when quoting different DID - matching either reply OR quote to monitored target
fixed two issues in main.ts:
Update version number
Fix: Remove unused import and formatting
Added tests
Refactor CI to use Bun instead of Node.js and npm
feat: Add @stylistic/eslint-plugin and update dependencies
feat: Add eslint-config-prettier
Disable linting in CI workflow
feat: Add type checking and update tsconfig
Refactor: Move account age checks to rules folder
Use Bun for type checking and testing
Add example config files for CI tests
Add post check constants example
feat: Upgrade dependencies
Add coverage directory to .gitignore
feat: Add Redis caching and connection
feat: Add Redis caching and connection
feat: Add session management and rate limiting
Add tests for agent, session, and rate limits
Linted the whole codebase
Further fixes
feat: Add example rule configurations
Refactor CI setup to use simplified config copying
Remove example config files and CI setup
feat: Add example rule configuration files
Add LINK_SHORTENER constant
Remove unused LINK_SHORTENER constant
Refactor: Move LINK_SHORTENER to constants file
Fix(deps): Update dependencies
feat: Add retry logic to authentication
Bumped version number
docs: Update documentation to reflect starter pack threshold feature
versioning
fix: eliminate fire-and-forget async patterns in moderation actions
fix(auth): convert isLoggedIn to lazy initialization
closed without merging
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:e4elbtctnfqocyfcml6h2lf7/sh.tangled.repo.pull/3mbsrdxeqv722