@chatwarden/core 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +306 -7
- package/dist/src/ai/case.d.ts +4 -3
- package/dist/src/ai/case.d.ts.map +1 -1
- package/dist/src/ai/case.js +1 -1
- package/dist/src/ai/case.js.map +1 -1
- package/dist/src/ai/hash.d.ts +3 -1
- package/dist/src/ai/hash.d.ts.map +1 -1
- package/dist/src/ai/hash.js +5 -2
- package/dist/src/ai/hash.js.map +1 -1
- package/dist/src/ai/prompt.d.ts +13 -2
- package/dist/src/ai/prompt.d.ts.map +1 -1
- package/dist/src/ai/prompt.js +31 -1
- package/dist/src/ai/prompt.js.map +1 -1
- package/dist/src/ai/service.d.ts +21 -6
- package/dist/src/ai/service.d.ts.map +1 -1
- package/dist/src/ai/service.js +14 -7
- package/dist/src/ai/service.js.map +1 -1
- package/dist/src/ai/types.d.ts +33 -2
- package/dist/src/ai/types.d.ts.map +1 -1
- package/dist/src/ai/types.js +3 -2
- package/dist/src/ai/types.js.map +1 -1
- package/dist/src/ai/worker.d.ts +8 -1
- package/dist/src/ai/worker.d.ts.map +1 -1
- package/dist/src/ai/worker.js +17 -3
- package/dist/src/ai/worker.js.map +1 -1
- package/dist/src/appealService.d.ts +105 -0
- package/dist/src/appealService.d.ts.map +1 -0
- package/dist/src/appealService.js +548 -0
- package/dist/src/appealService.js.map +1 -0
- package/dist/src/appeals.d.ts +194 -0
- package/dist/src/appeals.d.ts.map +1 -0
- package/dist/src/appeals.js +107 -0
- package/dist/src/appeals.js.map +1 -0
- package/dist/src/audit.d.ts +7 -3
- package/dist/src/audit.d.ts.map +1 -1
- package/dist/src/audit.js +18 -3
- package/dist/src/audit.js.map +1 -1
- package/dist/src/chat.d.ts +39 -1
- package/dist/src/chat.d.ts.map +1 -1
- package/dist/src/chat.js +85 -6
- package/dist/src/chat.js.map +1 -1
- package/dist/src/chatwarden.d.ts +197 -10
- package/dist/src/chatwarden.d.ts.map +1 -1
- package/dist/src/chatwarden.js +212 -23
- package/dist/src/chatwarden.js.map +1 -1
- package/dist/src/decide.d.ts +2 -0
- package/dist/src/decide.d.ts.map +1 -1
- package/dist/src/decide.js +12 -7
- package/dist/src/decide.js.map +1 -1
- package/dist/src/documents.d.ts +1 -1
- package/dist/src/documents.d.ts.map +1 -1
- package/dist/src/documents.js +5 -1
- package/dist/src/documents.js.map +1 -1
- package/dist/src/events.d.ts +38 -0
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +3 -0
- package/dist/src/events.js.map +1 -1
- package/dist/src/freeze.d.ts +3 -0
- package/dist/src/freeze.d.ts.map +1 -0
- package/dist/src/freeze.js +10 -0
- package/dist/src/freeze.js.map +1 -0
- package/dist/src/index.d.ts +20 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/ladder.d.ts +28 -0
- package/dist/src/ladder.d.ts.map +1 -1
- package/dist/src/ladder.js +37 -1
- package/dist/src/ladder.js.map +1 -1
- package/dist/src/nameService.d.ts +90 -0
- package/dist/src/nameService.d.ts.map +1 -0
- package/dist/src/nameService.js +224 -0
- package/dist/src/nameService.js.map +1 -0
- package/dist/src/names.d.ts +68 -0
- package/dist/src/names.d.ts.map +1 -0
- package/dist/src/names.js +87 -0
- package/dist/src/names.js.map +1 -0
- package/dist/src/notices.d.ts +53 -5
- package/dist/src/notices.d.ts.map +1 -1
- package/dist/src/notices.js +93 -8
- package/dist/src/notices.js.map +1 -1
- package/dist/src/pace.d.ts +66 -0
- package/dist/src/pace.d.ts.map +1 -0
- package/dist/src/pace.js +111 -0
- package/dist/src/pace.js.map +1 -0
- package/dist/src/pacing.d.ts +63 -0
- package/dist/src/pacing.d.ts.map +1 -0
- package/dist/src/pacing.js +198 -0
- package/dist/src/pacing.js.map +1 -0
- package/dist/src/policy.d.ts +66 -1
- package/dist/src/policy.d.ts.map +1 -1
- package/dist/src/policy.js +86 -5
- package/dist/src/policy.js.map +1 -1
- package/dist/src/profile.d.ts +57 -8
- package/dist/src/profile.d.ts.map +1 -1
- package/dist/src/profile.js +69 -25
- package/dist/src/profile.js.map +1 -1
- package/dist/src/profileError.d.ts +10 -0
- package/dist/src/profileError.d.ts.map +1 -0
- package/dist/src/profileError.js +17 -0
- package/dist/src/profileError.js.map +1 -0
- package/dist/src/retention.d.ts +40 -1
- package/dist/src/retention.d.ts.map +1 -1
- package/dist/src/retention.js +50 -3
- package/dist/src/retention.js.map +1 -1
- package/dist/src/sanctions.d.ts +29 -1
- package/dist/src/sanctions.d.ts.map +1 -1
- package/dist/src/sanctions.js +52 -9
- package/dist/src/sanctions.js.map +1 -1
- package/dist/src/signalCounts.d.ts +37 -0
- package/dist/src/signalCounts.d.ts.map +1 -0
- package/dist/src/signalCounts.js +117 -0
- package/dist/src/signalCounts.js.map +1 -0
- package/dist/src/signalInert.d.ts +10 -0
- package/dist/src/signalInert.d.ts.map +1 -0
- package/dist/src/signalInert.js +28 -0
- package/dist/src/signalInert.js.map +1 -0
- package/dist/src/signalService.d.ts +101 -0
- package/dist/src/signalService.d.ts.map +1 -0
- package/dist/src/signalService.js +383 -0
- package/dist/src/signalService.js.map +1 -0
- package/dist/src/signals.d.ts +186 -0
- package/dist/src/signals.d.ts.map +1 -0
- package/dist/src/signals.js +361 -0
- package/dist/src/signals.js.map +1 -0
- package/dist/src/staffViews.d.ts +18 -0
- package/dist/src/staffViews.d.ts.map +1 -1
- package/dist/src/staffViews.js +14 -0
- package/dist/src/staffViews.js.map +1 -1
- package/dist/src/subjects.d.ts +2 -0
- package/dist/src/subjects.d.ts.map +1 -1
- package/dist/src/subjects.js +4 -0
- package/dist/src/subjects.js.map +1 -1
- package/dist/src/team.d.ts +27 -0
- package/dist/src/team.d.ts.map +1 -1
- package/dist/src/team.js +92 -4
- package/dist/src/team.js.map +1 -1
- package/dist/src/types.d.ts +254 -7
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/package.json +2 -2
- package/src/ai/case.ts +6 -4
- package/src/ai/hash.ts +5 -2
- package/src/ai/prompt.ts +39 -2
- package/src/ai/service.ts +29 -14
- package/src/ai/types.ts +31 -2
- package/src/ai/worker.ts +20 -4
- package/src/appealService.ts +584 -0
- package/src/appeals.ts +256 -0
- package/src/audit.ts +18 -3
- package/src/chat.ts +109 -8
- package/src/chatwarden.ts +382 -27
- package/src/decide.ts +13 -7
- package/src/documents.ts +8 -3
- package/src/events.ts +23 -1
- package/src/freeze.ts +8 -0
- package/src/index.ts +52 -3
- package/src/ladder.ts +59 -1
- package/src/nameService.ts +255 -0
- package/src/names.ts +121 -0
- package/src/notices.ts +112 -14
- package/src/pace.ts +139 -0
- package/src/pacing.ts +242 -0
- package/src/policy.ts +125 -8
- package/src/profile.ts +115 -25
- package/src/profileError.ts +17 -0
- package/src/retention.ts +79 -3
- package/src/sanctions.ts +72 -9
- package/src/signalCounts.ts +133 -0
- package/src/signalInert.ts +31 -0
- package/src/signalService.ts +406 -0
- package/src/signals.ts +489 -0
- package/src/staffViews.ts +30 -0
- package/src/subjects.ts +5 -0
- package/src/team.ts +93 -5
- package/src/types.ts +275 -8
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
import { APPEAL_OUTCOMES, APPEAL_RATE_ELEVATED, APPEAL_RATE_HIGH, APPEAL_STATEMENT_MAX, APPEAL_STATS_MIN_SANCTIONS, normalizeStatement, SANCTION_KIND_ORDER, statementLength, } from './appeals.js';
|
|
2
|
+
import { isValidAuditActor } from './audit.js';
|
|
3
|
+
import { randomId } from './crypto.js';
|
|
4
|
+
import { safeWarn } from './log.js';
|
|
5
|
+
import { appliesInRecord } from './notices.js';
|
|
6
|
+
import { parseRuleRef } from './rules.js';
|
|
7
|
+
import { APPEALS_START_TOKEN, MAX_SANCTION_DURATION_MS, writeSanction } from './sanctions.js';
|
|
8
|
+
import { b64urlDecode, b64urlEncode } from './staffReports.js';
|
|
9
|
+
// The appeals service: filing (the player side) here; deciding and the staff reads are added to the same class. It holds no state of its own:
|
|
10
|
+
// every fact is in the store, so two processes on one database agree.
|
|
11
|
+
const WEEK_MS = 7 * 24 * 3_600_000;
|
|
12
|
+
/** The most appeals `mine` answers. */
|
|
13
|
+
export const MINE_MAX = 50;
|
|
14
|
+
/** The store methods appeals need. A store without all of them cannot keep appeals. */
|
|
15
|
+
export const APPEAL_STORE_METHODS = [
|
|
16
|
+
'insertAppeal',
|
|
17
|
+
'loadAppeal',
|
|
18
|
+
'listAppeals',
|
|
19
|
+
'listAppealsBy',
|
|
20
|
+
'countAppealsBy',
|
|
21
|
+
'countOpenAppeals',
|
|
22
|
+
'decideAppeal',
|
|
23
|
+
'closeAppealsForGroup',
|
|
24
|
+
'appealCountsByRule',
|
|
25
|
+
'countSanctionsByRule',
|
|
26
|
+
'loadSanctionSubjectRow',
|
|
27
|
+
];
|
|
28
|
+
/** True when the store has every method appeals need. */
|
|
29
|
+
export function hasAppealMethods(store) {
|
|
30
|
+
const s = store;
|
|
31
|
+
return APPEAL_STORE_METHODS.every((m) => typeof s[m] === 'function');
|
|
32
|
+
}
|
|
33
|
+
/** A decision step that must roll the transaction back and answer something other than success. */
|
|
34
|
+
class Stop extends Error {
|
|
35
|
+
why;
|
|
36
|
+
constructor(why) {
|
|
37
|
+
super(why);
|
|
38
|
+
this.why = why;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const OUTCOME_STATUS = { uphold: 'upheld', reduce: 'reduced', revoke: 'revoked' };
|
|
42
|
+
const OUTCOME_NOTICE = { uphold: 'appeal_upheld', reduce: 'appeal_reduced', revoke: 'appeal_revoked' };
|
|
43
|
+
const INVALID = { ok: false, error: 'invalid' };
|
|
44
|
+
/** The decision as the service reads it, or null when it is not well formed. Each field is read once. */
|
|
45
|
+
function checkDecision(input) {
|
|
46
|
+
if (typeof input !== 'object' || input === null)
|
|
47
|
+
return null;
|
|
48
|
+
const { appealId, outcome, actor, reason, to } = input;
|
|
49
|
+
if (typeof appealId !== 'string' || appealId === '')
|
|
50
|
+
return null;
|
|
51
|
+
if (typeof outcome !== 'string' || !APPEAL_OUTCOMES.includes(outcome))
|
|
52
|
+
return null;
|
|
53
|
+
if (!isValidAuditActor(actor))
|
|
54
|
+
return null;
|
|
55
|
+
const why = typeof reason === 'string' ? reason.trim() : '';
|
|
56
|
+
if (why === '' || why.length > 500)
|
|
57
|
+
return null;
|
|
58
|
+
if (outcome !== 'reduce')
|
|
59
|
+
return to === undefined ? { appealId, outcome: outcome, actor, reason: why, to: null } : null;
|
|
60
|
+
if (typeof to !== 'object' || to === null)
|
|
61
|
+
return null;
|
|
62
|
+
const { kind, durationMs } = to;
|
|
63
|
+
if (typeof kind !== 'string' || !SANCTION_KIND_ORDER.includes(kind))
|
|
64
|
+
return null;
|
|
65
|
+
if (kind === 'warning') {
|
|
66
|
+
if (durationMs !== null)
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
else if (durationMs !== null && (typeof durationMs !== 'number' || !Number.isSafeInteger(durationMs) || durationMs <= 0 || durationMs > MAX_SANCTION_DURATION_MS)) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return { appealId, outcome: 'reduce', actor, reason: why, to: { kind: kind, durationMs: durationMs } };
|
|
73
|
+
}
|
|
74
|
+
/** A refusal that must roll the filing's transaction back (the row was written to test the unique group and the rate). */
|
|
75
|
+
class Refuse extends Error {
|
|
76
|
+
refused;
|
|
77
|
+
retryAfterMs;
|
|
78
|
+
constructor(refused, retryAfterMs) {
|
|
79
|
+
super(refused);
|
|
80
|
+
this.refused = refused;
|
|
81
|
+
this.retryAfterMs = retryAfterMs;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const errName = (err) => {
|
|
85
|
+
try {
|
|
86
|
+
return err instanceof Error ? err.name : typeof err;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return 'unknown';
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
/** The stored rule text as a rule reference, or null for none or a value that is not one. */
|
|
93
|
+
export function ruleRefOf(text) {
|
|
94
|
+
if (text === null)
|
|
95
|
+
return null;
|
|
96
|
+
try {
|
|
97
|
+
return parseRuleRef(text);
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const NOT_FOUND = { ok: false, refused: 'not_found' };
|
|
104
|
+
export class AppealService {
|
|
105
|
+
d;
|
|
106
|
+
constructor(deps) {
|
|
107
|
+
this.d = deps;
|
|
108
|
+
}
|
|
109
|
+
/** Appeals are on in the profile in force AND the store can keep them. */
|
|
110
|
+
enabled() {
|
|
111
|
+
return this.d.settings().enabled && hasAppealMethods(this.d.store);
|
|
112
|
+
}
|
|
113
|
+
warn(err) {
|
|
114
|
+
safeWarn(this.d.logger, 'chatwarden.appeal_failed', { error: errName(err) });
|
|
115
|
+
}
|
|
116
|
+
file(who, input) {
|
|
117
|
+
if (!this.enabled())
|
|
118
|
+
return { ok: false, refused: 'off' };
|
|
119
|
+
try {
|
|
120
|
+
return this.fileInner(who, input);
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
// A store failure reads as "no such notice": the player is told nothing about the kit's health, the operator gets the class.
|
|
124
|
+
this.warn(err);
|
|
125
|
+
return NOT_FOUND;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
fileInner(who, input) {
|
|
129
|
+
if (typeof who !== 'object' || who === null || typeof input !== 'object' || input === null)
|
|
130
|
+
return NOT_FOUND;
|
|
131
|
+
const noticeId = input.noticeId;
|
|
132
|
+
const subject = this.d.personOf(who);
|
|
133
|
+
if (subject === null || typeof noticeId !== 'string' || noticeId === '')
|
|
134
|
+
return NOT_FOUND;
|
|
135
|
+
const notice = this.d.notices.ownRow(subject, noticeId);
|
|
136
|
+
if (notice === null)
|
|
137
|
+
return NOT_FOUND;
|
|
138
|
+
const now = this.d.clock.now();
|
|
139
|
+
if (notice.groupId === null || !appliesInRecord(notice, now))
|
|
140
|
+
return { ok: false, refused: 'not_appealable' };
|
|
141
|
+
const statement = normalizeStatement(input.statement);
|
|
142
|
+
if (statement === '' || statementLength(statement) > APPEAL_STATEMENT_MAX)
|
|
143
|
+
return { ok: false, refused: 'statement_invalid' };
|
|
144
|
+
const group = this.d.store.loadSanctionSubjectRow?.(notice.groupId) ?? null;
|
|
145
|
+
// The notice outlived its sanction rows (retention): there is nothing left to appeal.
|
|
146
|
+
if (group === null || group.revokedAt !== undefined)
|
|
147
|
+
return { ok: false, refused: 'not_appealable' };
|
|
148
|
+
const person = this.d.subjects.canonical(subject);
|
|
149
|
+
const aliases = this.d.subjects.aliasesOf(person);
|
|
150
|
+
const cap = this.d.settings().perPlayerPerWeek;
|
|
151
|
+
const row = {
|
|
152
|
+
id: randomId(16),
|
|
153
|
+
subject: person,
|
|
154
|
+
groupId: notice.groupId,
|
|
155
|
+
noticeId: notice.id,
|
|
156
|
+
reportId: group.reportId ?? null,
|
|
157
|
+
rule: group.rule,
|
|
158
|
+
kind: group.kind,
|
|
159
|
+
statement,
|
|
160
|
+
status: 'open',
|
|
161
|
+
createdAt: now,
|
|
162
|
+
decidedAt: null,
|
|
163
|
+
decidedBy: null,
|
|
164
|
+
decisionReason: null,
|
|
165
|
+
replacementGroupId: null,
|
|
166
|
+
};
|
|
167
|
+
const since = now - WEEK_MS + 1; // a row exactly a week old has left the window
|
|
168
|
+
try {
|
|
169
|
+
this.d.store.transaction(() => {
|
|
170
|
+
// The unique group decides "already appealed" in the same statement that writes the row, so of two filings exactly one wins; the
|
|
171
|
+
// rate is then counted with the new row in it. Either refusal rolls the row back: a refusal writes nothing. The sanction is read
|
|
172
|
+
// again here: a revoke by another process may have committed since the read above, and its hook cannot have closed a row that
|
|
173
|
+
// did not exist yet.
|
|
174
|
+
const live = this.d.store.loadSanctionSubjectRow?.(row.groupId) ?? null;
|
|
175
|
+
if (live === null || live.revokedAt !== undefined)
|
|
176
|
+
throw new Refuse('not_appealable');
|
|
177
|
+
if (this.d.store.insertAppeal?.(row) !== true)
|
|
178
|
+
throw new Refuse('already_appealed');
|
|
179
|
+
const count = this.d.store.countAppealsBy?.(aliases, since) ?? { count: 0, oldestAt: null };
|
|
180
|
+
if (count.count > cap)
|
|
181
|
+
throw new Refuse('rate', Math.max(1, (count.oldestAt ?? now) + WEEK_MS - now));
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
catch (err) {
|
|
185
|
+
if (err instanceof Refuse) {
|
|
186
|
+
if (err.refused === 'rate')
|
|
187
|
+
return { ok: false, refused: 'rate', retryAfterMs: err.retryAfterMs ?? 1 };
|
|
188
|
+
return { ok: false, refused: err.refused };
|
|
189
|
+
}
|
|
190
|
+
throw err;
|
|
191
|
+
}
|
|
192
|
+
try {
|
|
193
|
+
this.d.emit({ type: 'appeal.created', appealId: row.id, createdAt: row.createdAt, target: person, kind: row.kind, rule: ruleRefOf(row.rule) });
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
safeWarn(this.d.logger, 'chatwarden.event_failed', { error: errName(err) });
|
|
197
|
+
}
|
|
198
|
+
return { ok: true, appeal: toPlayerAppeal(row) };
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Decide an open appeal, once. One store transaction: the sanction is revoked (reduce, revoke), the replacement written (reduce), the
|
|
202
|
+
* player's notices made, and the appeal moved from open only, so a second decision, or one made while another process decides, finds it
|
|
203
|
+
* decided and changes nothing. Checks, in order: a well-formed decision (`invalid`), the appeal (`not_found`, `already_decided`), the
|
|
204
|
+
* sanction still standing (`gone`, which also makes the appeal moot), independence (`same_decider`), and for a reduction that `to` is
|
|
205
|
+
* lighter (`invalid`). A STORE failure rejects and writes nothing. After the commit, each fenced: the player is told, the sanction index
|
|
206
|
+
* updated and `appeal.decided` emitted.
|
|
207
|
+
*/
|
|
208
|
+
async decide(input) {
|
|
209
|
+
if (!this.enabled())
|
|
210
|
+
return { ok: false, error: 'not_found' };
|
|
211
|
+
const d = checkDecision(input);
|
|
212
|
+
if (d === null)
|
|
213
|
+
return INVALID;
|
|
214
|
+
try {
|
|
215
|
+
return this.decideChecked(d);
|
|
216
|
+
}
|
|
217
|
+
catch (err) {
|
|
218
|
+
this.warn(err);
|
|
219
|
+
throw err;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
decideChecked(d) {
|
|
223
|
+
const { store, subjects, clock, notices } = this.d;
|
|
224
|
+
const now = clock.now();
|
|
225
|
+
const appeal = store.loadAppeal?.(d.appealId) ?? null;
|
|
226
|
+
if (appeal === null)
|
|
227
|
+
return { ok: false, error: 'not_found' };
|
|
228
|
+
// A moot appeal means its sanction was revoked first: that is `gone`. Any other closed appeal was decided.
|
|
229
|
+
if (appeal.status === 'moot')
|
|
230
|
+
return { ok: false, error: 'gone' };
|
|
231
|
+
if (appeal.status !== 'open')
|
|
232
|
+
return { ok: false, error: 'already_decided' };
|
|
233
|
+
const group = store.loadSanctionSubjectRow?.(appeal.groupId) ?? null;
|
|
234
|
+
// The sanction is gone (retention) or was revoked by a path that did not make the appeal moot: nothing is left to rule on.
|
|
235
|
+
if (group === null || group.revokedAt !== undefined)
|
|
236
|
+
return this.mootGone(appeal, d.actor, now);
|
|
237
|
+
if (!this.d.settings().allowSelfReview && !group.automated && group.actor === d.actor)
|
|
238
|
+
return { ok: false, error: 'same_decider' };
|
|
239
|
+
const plan = d.outcome === 'reduce' ? reductionOf(group, d.to) : null;
|
|
240
|
+
if (d.outcome === 'reduce' && plan === null)
|
|
241
|
+
return INVALID;
|
|
242
|
+
const person = subjects.canonical(appeal.subject);
|
|
243
|
+
const clear = this.d.clearStatements();
|
|
244
|
+
const pending = !this.d.index.isEnabled();
|
|
245
|
+
let written = null;
|
|
246
|
+
try {
|
|
247
|
+
store.transaction(() => {
|
|
248
|
+
if (d.outcome !== 'uphold') {
|
|
249
|
+
// Straight to the store, not `revokeSanction`: that would make this very appeal moot before it is decided.
|
|
250
|
+
if (store.revokeSanctionGroup(appeal.groupId, d.actor, now, d.reason) === 0)
|
|
251
|
+
throw new Stop('gone');
|
|
252
|
+
notices.withdrawGroup(appeal.groupId);
|
|
253
|
+
}
|
|
254
|
+
if (plan !== null) {
|
|
255
|
+
written = writeSanction(store, subjects, {
|
|
256
|
+
kind: plan.kind,
|
|
257
|
+
subject: person,
|
|
258
|
+
includeIp: false,
|
|
259
|
+
durationMs: plan.durationMs,
|
|
260
|
+
reason: d.reason,
|
|
261
|
+
actor: d.actor,
|
|
262
|
+
source: 'moderator',
|
|
263
|
+
automated: false,
|
|
264
|
+
rule: appeal.rule === null ? 'uncovered' : (ruleRefOf(appeal.rule) ?? 'uncovered'),
|
|
265
|
+
roomId: group.roomId,
|
|
266
|
+
startsAt: group.startsAt,
|
|
267
|
+
startsAtToken: APPEALS_START_TOKEN,
|
|
268
|
+
}, now, pending);
|
|
269
|
+
notices.createForSanction({ groupId: written.groupId, refCode: written.refCode, kind: plan.kind, until: plan.kind === 'warning' ? null : written.endsAt, rule: ruleRefOf(appeal.rule), subject: person }, [], { notify: false });
|
|
270
|
+
}
|
|
271
|
+
notices.createMessage(person, OUTCOME_NOTICE[d.outcome], { rule: ruleRefOf(appeal.rule), refCode: group.refCode, notify: false });
|
|
272
|
+
const moved = store.decideAppeal?.(appeal.id, {
|
|
273
|
+
status: OUTCOME_STATUS[d.outcome],
|
|
274
|
+
at: now,
|
|
275
|
+
by: d.actor,
|
|
276
|
+
reason: d.reason,
|
|
277
|
+
replacementGroupId: written === null ? null : written.groupId,
|
|
278
|
+
...(clear ? { clearStatement: true } : {}),
|
|
279
|
+
});
|
|
280
|
+
if (moved !== true)
|
|
281
|
+
throw new Stop('already_decided');
|
|
282
|
+
if (d.outcome !== 'uphold' && appeal.reportId !== null) {
|
|
283
|
+
try {
|
|
284
|
+
this.d.onGranted?.(appeal, d.outcome);
|
|
285
|
+
}
|
|
286
|
+
catch (err) {
|
|
287
|
+
this.warn(err);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
catch (err) {
|
|
293
|
+
if (err instanceof Stop) {
|
|
294
|
+
if (err.why !== 'gone')
|
|
295
|
+
return { ok: false, error: 'already_decided' };
|
|
296
|
+
// The revoke found nothing to revoke. When another process decided this appeal first (and so revoked or replaced the group), this
|
|
297
|
+
// call lost the race and the answer is `already_decided`; only an appeal still open has really lost its sanction.
|
|
298
|
+
const now_ = store.loadAppeal?.(appeal.id) ?? null;
|
|
299
|
+
if (now_ !== null && now_.status !== 'open')
|
|
300
|
+
return { ok: false, error: now_.status === 'moot' ? 'gone' : 'already_decided' };
|
|
301
|
+
return this.mootGone(appeal, d.actor, now);
|
|
302
|
+
}
|
|
303
|
+
throw err;
|
|
304
|
+
}
|
|
305
|
+
// Committed. Each of these is fenced: none can fail a decision that is already made.
|
|
306
|
+
const fenced = (what) => {
|
|
307
|
+
try {
|
|
308
|
+
what();
|
|
309
|
+
}
|
|
310
|
+
catch (err) {
|
|
311
|
+
safeWarn(this.d.logger, 'chatwarden.event_failed', { error: errName(err) });
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
if (d.outcome !== 'uphold')
|
|
315
|
+
fenced(() => this.d.index.remove(appeal.groupId));
|
|
316
|
+
const made = written;
|
|
317
|
+
if (made !== null)
|
|
318
|
+
fenced(() => this.d.index.add(made.rows, now));
|
|
319
|
+
fenced(() => notices.announce(person));
|
|
320
|
+
fenced(() => this.d.emit({ type: 'appeal.decided', appealId: appeal.id, at: now, target: person, outcome: d.outcome, rule: ruleRefOf(appeal.rule) }));
|
|
321
|
+
return { ok: true, status: OUTCOME_STATUS[d.outcome], ...(made === null ? {} : { replacementGroupId: made.groupId }) };
|
|
322
|
+
}
|
|
323
|
+
/** The sanction is gone: close the appeal as moot (committed, unlike a refusal) and say so. Nothing is announced or marked. */
|
|
324
|
+
mootGone(appeal, by, now) {
|
|
325
|
+
this.d.store.transaction(() => this.d.store.closeAppealsForGroup?.(appeal.groupId, by, now, this.d.clearStatements()));
|
|
326
|
+
return { ok: false, error: 'gone' };
|
|
327
|
+
}
|
|
328
|
+
// --- staff reads ----------------------------------------------------------------------------------------------------------
|
|
329
|
+
/** Whether `statement` trips the term filter now. A matcher that throws reads as not flagged (logged by class), like the chat path. */
|
|
330
|
+
flagged(statement) {
|
|
331
|
+
if (statement === null || this.d.matcher === undefined)
|
|
332
|
+
return false;
|
|
333
|
+
try {
|
|
334
|
+
return this.d.matcher.match(statement) !== null;
|
|
335
|
+
}
|
|
336
|
+
catch (err) {
|
|
337
|
+
this.warn(err);
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
summaryOf(r) {
|
|
342
|
+
const g = this.d.store.loadSanctionSubjectRow?.(r.groupId) ?? null;
|
|
343
|
+
return {
|
|
344
|
+
id: r.id,
|
|
345
|
+
createdAt: r.createdAt,
|
|
346
|
+
status: r.status,
|
|
347
|
+
person: this.d.subjects.canonical(r.subject),
|
|
348
|
+
// The sanction rows can be gone (retention): the appeal still lists, from its own row.
|
|
349
|
+
sanction: g === null
|
|
350
|
+
? { groupId: r.groupId, refCode: '', kind: r.kind, rule: ruleRefOf(r.rule), startsAt: r.createdAt, endsAt: null, decidedBy: '', automated: false }
|
|
351
|
+
: { groupId: g.groupId, refCode: g.refCode, kind: g.kind, rule: ruleRefOf(g.rule), startsAt: g.startsAt, endsAt: g.endsAt, decidedBy: g.actor, automated: g.automated },
|
|
352
|
+
statementFlagged: this.flagged(r.statement),
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* The inbox, oldest first: `open` (default), `decided` or `all`; `limit` 1 to 200 (default 50); `cursor` the `next` of the previous page.
|
|
357
|
+
* A summary never carries the statement. A moot appeal is not listed. `RangeError` for a bad status, limit or cursor. Empty with appeals off.
|
|
358
|
+
*/
|
|
359
|
+
list(q) {
|
|
360
|
+
if (!this.enabled())
|
|
361
|
+
return { items: [], next: null };
|
|
362
|
+
const query = typeof q === 'object' && q !== null ? q : {};
|
|
363
|
+
const status = query.status === undefined ? 'open' : query.status;
|
|
364
|
+
if (status !== 'open' && status !== 'decided' && status !== 'all')
|
|
365
|
+
throw new RangeError('appeals.list: status must be open, decided or all');
|
|
366
|
+
const limit = query.limit === undefined ? 50 : query.limit;
|
|
367
|
+
if (typeof limit !== 'number' || !Number.isInteger(limit) || limit < 1 || limit > 200)
|
|
368
|
+
throw new RangeError('appeals.list: limit must be an integer from 1 to 200');
|
|
369
|
+
const after = query.cursor === undefined || query.cursor === null ? undefined : decodeCursor(query.cursor);
|
|
370
|
+
try {
|
|
371
|
+
const rows = this.d.store.listAppeals?.({ status, limit, ...(after === undefined ? {} : { after }) }) ?? [];
|
|
372
|
+
const last = rows[rows.length - 1];
|
|
373
|
+
return { items: rows.map((r) => this.summaryOf(r)), next: rows.length === limit && last !== undefined ? b64urlEncode(`${last.createdAt}:${last.id}`) : null };
|
|
374
|
+
}
|
|
375
|
+
catch (err) {
|
|
376
|
+
this.warn(err);
|
|
377
|
+
return { items: [], next: null };
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* One person's appeals as summaries, newest first, at most 50, a moot one left out. Listed while appeals are off too (what was filed stays
|
|
382
|
+
* visible on the person's page until retention removes it, as with `renamesOf`); empty for a store that cannot keep appeals, an unknown
|
|
383
|
+
* person and on a store failure. Staff only.
|
|
384
|
+
*/
|
|
385
|
+
forPerson(subject) {
|
|
386
|
+
if (!hasAppealMethods(this.d.store) || typeof subject !== 'string' || subject === '')
|
|
387
|
+
return [];
|
|
388
|
+
try {
|
|
389
|
+
const person = this.d.subjects.canonical(subject);
|
|
390
|
+
return (this.d.store.listAppealsBy?.(this.d.subjects.aliasesOf(person), MINE_MAX) ?? []).filter((r) => r.status !== 'moot').map((r) => this.summaryOf(r));
|
|
391
|
+
}
|
|
392
|
+
catch (err) {
|
|
393
|
+
this.warn(err);
|
|
394
|
+
return [];
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
/** One appeal in full (the statement included), or null for an unknown id, a store failure, or with appeals off. */
|
|
398
|
+
get(id) {
|
|
399
|
+
if (!this.enabled() || typeof id !== 'string' || id === '')
|
|
400
|
+
return null;
|
|
401
|
+
try {
|
|
402
|
+
const r = this.d.store.loadAppeal?.(id) ?? null;
|
|
403
|
+
if (r === null)
|
|
404
|
+
return null;
|
|
405
|
+
const aliases = this.d.subjects.aliasesOf(this.d.subjects.canonical(r.subject));
|
|
406
|
+
const notice = this.d.store.loadNotices(aliases).find((n) => n.id === r.noticeId);
|
|
407
|
+
return {
|
|
408
|
+
...this.summaryOf(r),
|
|
409
|
+
statement: r.statement,
|
|
410
|
+
decided: r.decidedAt === null || r.decidedBy === null ? null : { by: r.decidedBy, at: r.decidedAt, reason: r.decisionReason ?? '', replacementGroupId: r.replacementGroupId },
|
|
411
|
+
reportId: r.reportId,
|
|
412
|
+
shown: notice === undefined ? [] : notice.excerpt.map((l) => ({ text: l.text, day: l.day })),
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
catch (err) {
|
|
416
|
+
this.warn(err);
|
|
417
|
+
return null;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
/** How many appeals are waiting. 0 with appeals off or on a store failure. */
|
|
421
|
+
openCount() {
|
|
422
|
+
if (!this.enabled())
|
|
423
|
+
return 0;
|
|
424
|
+
try {
|
|
425
|
+
return this.d.store.countOpenAppeals?.() ?? 0;
|
|
426
|
+
}
|
|
427
|
+
catch (err) {
|
|
428
|
+
this.warn(err);
|
|
429
|
+
return 0;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Per rule over the last 30, 90 (default) or 365 days: the sanctions given, the appeals filed, how many were revoked (`granted`, the
|
|
434
|
+
* only ones that count as wrong) and how many reduced (`lightened`, shown beside the rate, never in it). The rate is granted over
|
|
435
|
+
* sanctions, null below ten sanctions; `high` from 0.30, `elevated` from 0.15. `RangeError` for any other window.
|
|
436
|
+
*/
|
|
437
|
+
stats(q) {
|
|
438
|
+
const days = q === undefined || q === null || q.days === undefined ? 90 : q.days;
|
|
439
|
+
if (days !== 30 && days !== 90 && days !== 365)
|
|
440
|
+
throw new RangeError('appeals.stats: days must be 30, 90 or 365');
|
|
441
|
+
const empty = { windowDays: days, perRule: [], overall: { sanctions: 0, appealed: 0, granted: 0, lightened: 0, rate: null } };
|
|
442
|
+
if (!this.enabled())
|
|
443
|
+
return empty;
|
|
444
|
+
try {
|
|
445
|
+
const since = this.d.clock.now() - days * 86_400_000;
|
|
446
|
+
const byRule = new Map();
|
|
447
|
+
const slot = (rule) => {
|
|
448
|
+
const key = rule === null || rule === 'uncovered' ? 'uncovered' : ruleRefOf(rule) ?? 'uncovered';
|
|
449
|
+
let c = byRule.get(key);
|
|
450
|
+
if (c === undefined)
|
|
451
|
+
byRule.set(key, (c = { sanctions: 0, appealed: 0, granted: 0, lightened: 0 }));
|
|
452
|
+
return c;
|
|
453
|
+
};
|
|
454
|
+
for (const r of this.d.store.countSanctionsByRule?.(since) ?? [])
|
|
455
|
+
slot(r.rule).sanctions += r.count;
|
|
456
|
+
for (const r of this.d.store.appealCountsByRule?.(since) ?? []) {
|
|
457
|
+
const c = slot(r.rule);
|
|
458
|
+
c.appealed += r.appealed;
|
|
459
|
+
c.granted += r.granted;
|
|
460
|
+
c.lightened += r.lightened;
|
|
461
|
+
}
|
|
462
|
+
const perRule = [...byRule.entries()]
|
|
463
|
+
.sort(([a], [b]) => (a === 'uncovered' ? 1 : b === 'uncovered' ? -1 : a - b))
|
|
464
|
+
.map(([rule, c]) => ({ rule, ...c, ...rateOf(c.granted, c.sanctions) }));
|
|
465
|
+
const sum = perRule.reduce((t, r) => ({ sanctions: t.sanctions + r.sanctions, appealed: t.appealed + r.appealed, granted: t.granted + r.granted, lightened: t.lightened + r.lightened }), { sanctions: 0, appealed: 0, granted: 0, lightened: 0 });
|
|
466
|
+
return { windowDays: days, perRule, overall: { ...sum, rate: rateOf(sum.granted, sum.sanctions).rate } };
|
|
467
|
+
}
|
|
468
|
+
catch (err) {
|
|
469
|
+
this.warn(err);
|
|
470
|
+
return empty;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* The rules whose revoke-on-appeal rate over 90 days is `elevated` or `high`, as rule numbers and bands only, for the AI read. A reduction is
|
|
475
|
+
* not a revoke, so a rule with many reduces and no revokes is never listed. Empty with appeals off.
|
|
476
|
+
*/
|
|
477
|
+
cautions() {
|
|
478
|
+
if (!this.enabled())
|
|
479
|
+
return [];
|
|
480
|
+
return this.stats({ days: 90 }).perRule.flatMap((r) => (typeof r.rule === 'number' && (r.band === 'elevated' || r.band === 'high') ? [{ rule: r.rule, band: r.band }] : []));
|
|
481
|
+
}
|
|
482
|
+
mine(who) {
|
|
483
|
+
if (!this.enabled())
|
|
484
|
+
return [];
|
|
485
|
+
try {
|
|
486
|
+
if (typeof who !== 'object' || who === null)
|
|
487
|
+
return [];
|
|
488
|
+
const subject = this.d.personOf(who);
|
|
489
|
+
if (subject === null)
|
|
490
|
+
return [];
|
|
491
|
+
const person = this.d.subjects.canonical(subject);
|
|
492
|
+
return (this.d.store.listAppealsBy?.(this.d.subjects.aliasesOf(person), MINE_MAX) ?? []).filter((r) => r.status !== 'moot').map(toPlayerAppeal);
|
|
493
|
+
}
|
|
494
|
+
catch (err) {
|
|
495
|
+
this.warn(err);
|
|
496
|
+
return [];
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* What a reduction becomes: the kind and length of the replacement, or null when `to` is not lighter than the sanction (a lower kind, or the
|
|
502
|
+
* same kind and shorter, permanent being the longest; a warning cannot be reduced). The replacement keeps the original start and ends at
|
|
503
|
+
* the earlier of the original end and `start + to.durationMs`, so it is never later than the original.
|
|
504
|
+
*/
|
|
505
|
+
function reductionOf(group, to) {
|
|
506
|
+
if (to === null)
|
|
507
|
+
return null;
|
|
508
|
+
const from = SANCTION_KIND_ORDER.indexOf(group.kind);
|
|
509
|
+
const target = SANCTION_KIND_ORDER.indexOf(to.kind);
|
|
510
|
+
if (from <= 0 || target < 0)
|
|
511
|
+
return null; // not an appealable kind, or a warning (the lightest: nothing to reduce to)
|
|
512
|
+
const origLength = group.endsAt === null ? Infinity : group.endsAt - group.startsAt;
|
|
513
|
+
const newLength = to.durationMs === null ? Infinity : to.durationMs;
|
|
514
|
+
if (!(target < from || (target === from && newLength < origLength)))
|
|
515
|
+
return null;
|
|
516
|
+
if (to.kind === 'warning')
|
|
517
|
+
return { kind: 'warning', durationMs: null };
|
|
518
|
+
const end = to.durationMs === null ? group.endsAt : group.endsAt === null ? group.startsAt + to.durationMs : Math.min(group.endsAt, group.startsAt + to.durationMs);
|
|
519
|
+
if (end !== null && end <= group.startsAt)
|
|
520
|
+
return null;
|
|
521
|
+
return { kind: to.kind, durationMs: end === null ? null : end - group.startsAt };
|
|
522
|
+
}
|
|
523
|
+
/** The rate and its band: null below the minimum number of sanctions; `high` from 0.30, `elevated` from 0.15. */
|
|
524
|
+
function rateOf(granted, sanctions) {
|
|
525
|
+
if (sanctions < APPEAL_STATS_MIN_SANCTIONS)
|
|
526
|
+
return { rate: null, band: null };
|
|
527
|
+
const rate = granted / sanctions;
|
|
528
|
+
return { rate, band: rate >= APPEAL_RATE_HIGH ? 'high' : rate >= APPEAL_RATE_ELEVATED ? 'elevated' : 'normal' };
|
|
529
|
+
}
|
|
530
|
+
/** The cursor of a page: base64url of `createdAt:id`. A value that is not one we issued is a `RangeError`. */
|
|
531
|
+
function decodeCursor(cursor) {
|
|
532
|
+
const text = typeof cursor === 'string' ? b64urlDecode(cursor) : null;
|
|
533
|
+
const sep = text === null ? -1 : text.indexOf(':');
|
|
534
|
+
if (text === null || sep < 1 || sep === text.length - 1 || !/^\d{1,16}$/.test(text.slice(0, sep)))
|
|
535
|
+
throw new RangeError('appeals.list: invalid cursor');
|
|
536
|
+
return { createdAt: Number(text.slice(0, sep)), id: text.slice(sep + 1) };
|
|
537
|
+
}
|
|
538
|
+
/** What a player may see of an appeal row: no staff ref, reason, sanction or person id. A moot appeal is never shown to a player. */
|
|
539
|
+
export function toPlayerAppeal(r) {
|
|
540
|
+
return {
|
|
541
|
+
id: r.id,
|
|
542
|
+
noticeId: r.noticeId,
|
|
543
|
+
status: r.status,
|
|
544
|
+
createdAt: r.createdAt,
|
|
545
|
+
decidedAt: r.decidedAt,
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
//# sourceMappingURL=appealService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appealService.js","sourceRoot":"","sources":["../../src/appealService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,GAChB,MAAM,cAAc,CAAC;AActB,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9F,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI/D,8IAA8I;AAC9I,sEAAsE;AAEtE,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;AACnC,uCAAuC;AACvC,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAE3B,uFAAuF;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc;IACd,YAAY;IACZ,aAAa;IACb,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd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