-9
.github/workflows/ci.yml
-9
.github/workflows/ci.yml
···
21
21
- name: Install dependencies
22
22
run: bun install
23
23
24
-
- name: Setup example config files for CI
25
-
run: |
26
-
cp rules/constants.example.ts rules/constants.ts
27
-
cp rules/handles.example.ts rules/handles.ts
28
-
cp rules/posts.example.ts rules/posts.ts
29
-
cp rules/profiles.example.ts rules/profiles.ts
30
-
cp rules/accountAge.example.ts rules/accountAge.ts
31
-
cp rules/accountThreshold.example.ts rules/accountThreshold.ts
32
-
33
24
- name: Run linter
34
25
run: bun run lint
35
26
-2
.gitignore
-2
.gitignore
-17
rules/accountAge.example.ts
-17
rules/accountAge.example.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.example.ts
-20
rules/accountThreshold.example.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.example.ts
-8
rules/constants.example.ts
-18
rules/handles.example.ts
-18
rules/handles.example.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.example.ts
-23
rules/posts.example.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.example.ts
-20
rules/profiles.example.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
-
];