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

feat: Add example rule configuration files

Adds example configuration files for account age, account threshold,
global allowlist, handle checks, post checks, and profile checks. These
files contain example values and instructions for configuration.

Skywatch ad6ce83b 5ceafed0

+17
rules/accountAge.ts
··· 1 + import type { AccountAgeCheck } from "../src/types.js"; 2 + 3 + /** 4 + * Account age monitoring configurations 5 + * 6 + * This file contains example values. Copy to accountAge.ts and configure with your checks. 7 + */ 8 + export const ACCOUNT_AGE_CHECKS: AccountAgeCheck[] = [ 9 + // Example configuration: 10 + // { 11 + // monitoredDIDs: ["did:plc:example123"], 12 + // anchorDate: "2025-01-15", 13 + // maxAgeDays: 7, 14 + // label: "new-account", 15 + // comment: "Account created within monitored window", 16 + // }, 17 + ];
+20
rules/accountThreshold.ts
··· 1 + import type { AccountThresholdConfig } from "../src/types.js"; 2 + 3 + /** 4 + * Account threshold configurations for automatic labeling 5 + * 6 + * This file contains example values. Copy to accountThreshold.ts and configure with your thresholds. 7 + */ 8 + export const ACCOUNT_THRESHOLD_CONFIGS: AccountThresholdConfig[] = [ 9 + // Example configuration: 10 + // { 11 + // labels: ["example-label"], 12 + // threshold: 3, 13 + // accountLabel: "repeat-offender", 14 + // accountComment: "Account exceeded threshold", 15 + // windowDays: 7, 16 + // reportAcct: false, 17 + // commentAcct: false, 18 + // toLabel: true, 19 + // }, 20 + ];
+8
rules/constants.ts
··· 1 + /** 2 + * Global allowlist for accounts that should bypass all checks 3 + * 4 + * This file contains example values. Copy to constants.ts and configure with your DIDs. 5 + */ 6 + export const GLOBAL_ALLOW: string[] = [ 7 + // Example: "did:plc:example123", 8 + ];
+18
rules/handles.ts
··· 1 + import type { Checks } from "../src/types.js"; 2 + 3 + /** 4 + * Handle-based moderation checks 5 + * 6 + * This file contains example values. Copy to handles.ts and configure with your checks. 7 + */ 8 + export const HANDLE_CHECKS: Checks[] = [ 9 + // Example check: 10 + // { 11 + // label: "example-label", 12 + // comment: "Example check found in handle", 13 + // reportAcct: false, 14 + // commentAcct: false, 15 + // toLabel: true, 16 + // check: new RegExp("example-pattern", "i"), 17 + // }, 18 + ];
+23
rules/posts.ts
··· 1 + import type { Checks } from "../src/types.js"; 2 + 3 + /** 4 + * Post content moderation checks 5 + * 6 + * This file contains example values. Copy to posts.ts and configure with your checks. 7 + */ 8 + export const POST_CHECKS: Checks[] = [ 9 + // Example check: 10 + // { 11 + // label: "example-label", 12 + // comment: "Example content found in post", 13 + // reportAcct: false, 14 + // commentAcct: false, 15 + // toLabel: true, 16 + // check: new RegExp("example-pattern", "i"), 17 + // }, 18 + ]; 19 + 20 + /** 21 + * Link shortener detection pattern 22 + */ 23 + export const LINK_SHORTENER = new RegExp("", "i");
+20
rules/profiles.ts
··· 1 + import type { Checks } from "../src/types.js"; 2 + 3 + /** 4 + * Profile-based moderation checks 5 + * 6 + * This file contains example values. Copy to profiles.ts and configure with your checks. 7 + */ 8 + export const PROFILE_CHECKS: Checks[] = [ 9 + // Example check: 10 + // { 11 + // label: "example-label", 12 + // comment: "Example content found in profile", 13 + // description: true, 14 + // displayName: true, 15 + // reportAcct: false, 16 + // commentAcct: false, 17 + // toLabel: true, 18 + // check: new RegExp("example-pattern", "i"), 19 + // }, 20 + ];