back interdiff of round #1 and #0

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
ERROR
.claude/settings.local.json

Failed to calculate interdiff for this file.

ERROR
CLAUDE.md

Failed to calculate interdiff for this file.

ERROR
README.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/main.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/rules/account/age.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/rules/account/countStarterPacks.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/rules/facets/facets.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/rules/handles/checkHandles.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/rules/posts/checkPosts.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/rules/profiles/checkProfiles.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/utils/getFinalUrl.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/utils/getLanguage.md

Failed to calculate interdiff for this file.

ERROR
docs/automod/utils/normalizeUnicode.md

Failed to calculate interdiff for this file.

ERROR
docs/common/accountModeration.md

Failed to calculate interdiff for this file.

ERROR
docs/common/accountThreshold.md

Failed to calculate interdiff for this file.

ERROR
docs/common/agent.md

Failed to calculate interdiff for this file.

ERROR
docs/common/config.md

Failed to calculate interdiff for this file.

ERROR
docs/common/limits.md

Failed to calculate interdiff for this file.

ERROR
docs/common/logger.md

Failed to calculate interdiff for this file.

ERROR
docs/common/metrics.md

Failed to calculate interdiff for this file.

ERROR
docs/common/moderation.md

Failed to calculate interdiff for this file.

ERROR
docs/common/redis.md

Failed to calculate interdiff for this file.

ERROR
docs/common/session.md

Failed to calculate interdiff for this file.

ERROR
docs/common/starterPackThreshold.md

Failed to calculate interdiff for this file.

ERROR
docs/common/types.md

Failed to calculate interdiff for this file.

ERROR
rules/accountAge.ts

Failed to calculate interdiff for this file.

ERROR
rules/accountThreshold.ts

Failed to calculate interdiff for this file.

ERROR
rules/constants.ts

Failed to calculate interdiff for this file.

ERROR
rules/developing_checks.md

Failed to calculate interdiff for this file.

ERROR
rules/handles.ts

Failed to calculate interdiff for this file.

ERROR
rules/posts.ts

Failed to calculate interdiff for this file.

ERROR
rules/profiles.ts

Failed to calculate interdiff for this file.

ERROR
rules/starterPackThreshold.ts

Failed to calculate interdiff for this file.

ERROR
src/accountModeration.ts

Failed to calculate interdiff for this file.

ERROR
src/accountThreshold.ts

Failed to calculate interdiff for this file.

ERROR
src/agent.ts

Failed to calculate interdiff for this file.

ERROR
src/config.ts

Failed to calculate interdiff for this file.

ERROR
src/main.ts

Failed to calculate interdiff for this file.

ERROR
src/metrics.ts

Failed to calculate interdiff for this file.

ERROR
src/moderation.ts

Failed to calculate interdiff for this file.

ERROR
src/redis.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/account/age.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/account/countStarterPacks.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/facets/facets.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/facets/tests/facets.test.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/handles/checkHandles.test.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/handles/checkHandles.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/posts/checkPosts.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/posts/tests/checkPosts.test.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/profiles/checkProfiles.ts

Failed to calculate interdiff for this file.

ERROR
src/rules/profiles/tests/checkProfiles.test.ts

Failed to calculate interdiff for this file.

ERROR
src/starterPackThreshold.ts

Failed to calculate interdiff for this file.

ERROR
src/tests/accountModeration.test.ts

Failed to calculate interdiff for this file.

ERROR
src/tests/accountThreshold.test.ts

Failed to calculate interdiff for this file.

ERROR
src/tests/agent.test.ts

Failed to calculate interdiff for this file.

ERROR
src/tests/redis.test.ts

Failed to calculate interdiff for this file.

ERROR
src/tests/starterPackThreshold.test.ts

Failed to calculate interdiff for this file.

ERROR
src/types.ts

Failed to calculate interdiff for this file.

NEW
.gitignore
··· 5 5 labels.db* 6 6 .DS_Store 7 7 coverage/ 8 + .session
NEW
package.json
··· 1 1 { 2 2 "name": "skywatch-automod", 3 - "version": "2.0.2", 3 + "version": "2.1.0", 4 4 "type": "module", 5 5 "scripts": { 6 6 "start": "npx tsx src/main.ts",