@chatwarden/core 0.1.0 → 0.1.2
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 +202 -6
- package/dist/src/audit.d.ts +27 -5
- package/dist/src/audit.d.ts.map +1 -1
- package/dist/src/audit.js +59 -8
- package/dist/src/audit.js.map +1 -1
- package/dist/src/chat.d.ts +48 -0
- package/dist/src/chat.d.ts.map +1 -1
- package/dist/src/chat.js +94 -10
- package/dist/src/chat.js.map +1 -1
- package/dist/src/chatwarden.d.ts +209 -12
- package/dist/src/chatwarden.d.ts.map +1 -1
- package/dist/src/chatwarden.js +77 -11
- package/dist/src/chatwarden.js.map +1 -1
- package/dist/src/crypto.d.ts +22 -0
- package/dist/src/crypto.d.ts.map +1 -0
- package/dist/src/crypto.js +193 -0
- package/dist/src/crypto.js.map +1 -0
- package/dist/src/decide.d.ts.map +1 -1
- package/dist/src/decide.js +2 -4
- package/dist/src/decide.js.map +1 -1
- package/dist/src/documents.d.ts +12 -2
- package/dist/src/documents.d.ts.map +1 -1
- package/dist/src/documents.js +56 -34
- package/dist/src/documents.js.map +1 -1
- package/dist/src/events.d.ts +3 -0
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js.map +1 -1
- package/dist/src/hasher.js +2 -2
- package/dist/src/hasher.js.map +1 -1
- package/dist/src/index.d.ts +21 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -6
- package/dist/src/index.js.map +1 -1
- package/dist/src/ladder.d.ts +2 -0
- package/dist/src/ladder.d.ts.map +1 -1
- package/dist/src/ladder.js +1 -1
- package/dist/src/ladder.js.map +1 -1
- package/dist/src/log.d.ts +16 -0
- package/dist/src/log.d.ts.map +1 -1
- package/dist/src/log.js +34 -0
- package/dist/src/log.js.map +1 -1
- package/dist/src/notices.js +2 -2
- package/dist/src/notices.js.map +1 -1
- package/dist/src/policy.d.ts +129 -0
- package/dist/src/policy.d.ts.map +1 -0
- package/dist/src/policy.js +242 -0
- package/dist/src/policy.js.map +1 -0
- package/dist/src/profile.d.ts +120 -7
- package/dist/src/profile.d.ts.map +1 -1
- package/dist/src/profile.js +295 -7
- package/dist/src/profile.js.map +1 -1
- package/dist/src/reporting.d.ts +127 -0
- package/dist/src/reporting.d.ts.map +1 -0
- package/dist/src/reporting.js +172 -0
- package/dist/src/reporting.js.map +1 -0
- package/dist/src/reports.d.ts +80 -4
- package/dist/src/reports.d.ts.map +1 -1
- package/dist/src/reports.js +122 -8
- package/dist/src/reports.js.map +1 -1
- package/dist/src/sanctions.js +3 -3
- package/dist/src/sanctions.js.map +1 -1
- package/dist/src/staffReports.d.ts +17 -5
- package/dist/src/staffReports.d.ts.map +1 -1
- package/dist/src/staffReports.js +22 -5
- package/dist/src/staffReports.js.map +1 -1
- package/dist/src/staffViews.d.ts +138 -0
- package/dist/src/staffViews.d.ts.map +1 -0
- package/dist/src/staffViews.js +205 -0
- package/dist/src/staffViews.js.map +1 -0
- package/dist/src/strikes.js +2 -2
- package/dist/src/strikes.js.map +1 -1
- package/dist/src/subjects.js +2 -2
- package/dist/src/subjects.js.map +1 -1
- package/dist/src/team.d.ts +149 -0
- package/dist/src/team.d.ts.map +1 -0
- package/dist/src/team.js +385 -0
- package/dist/src/team.js.map +1 -0
- package/dist/src/types.d.ts +245 -4
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +5 -0
- package/dist/src/types.js.map +1 -1
- package/package.json +4 -1
- package/src/audit.ts +73 -9
- package/src/chat.ts +109 -9
- package/src/chatwarden.ts +279 -22
- package/src/crypto.ts +206 -0
- package/src/decide.ts +2 -4
- package/src/documents.ts +70 -43
- package/src/events.ts +10 -1
- package/src/hasher.ts +2 -2
- package/src/index.ts +110 -5
- package/src/ladder.ts +1 -1
- package/src/log.ts +37 -0
- package/src/notices.ts +2 -2
- package/src/policy.ts +288 -0
- package/src/profile.ts +369 -14
- package/src/reporting.ts +251 -0
- package/src/reports.ts +165 -12
- package/src/sanctions.ts +3 -3
- package/src/staffReports.ts +33 -7
- package/src/staffViews.ts +325 -0
- package/src/strikes.ts +2 -2
- package/src/subjects.ts +2 -2
- package/src/team.ts +422 -0
- package/src/types.ts +257 -4
package/dist/src/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { safeWarn } from './log.js';
|
|
1
|
+
import { safeWarn, ThrottledWarn } from './log.js';
|
|
2
2
|
import { slidingWindow } from './rateLimit.js';
|
|
3
3
|
import { parseRuleRef } from './rules.js';
|
|
4
4
|
import { applySanction } from './sanctions.js';
|
|
@@ -57,6 +57,8 @@ export class ChatService {
|
|
|
57
57
|
autoRestrictRule;
|
|
58
58
|
maxLength;
|
|
59
59
|
rate;
|
|
60
|
+
/** The typing lookup runs at keystroke rate: its failure line is limited to one a minute. */
|
|
61
|
+
typingWarn;
|
|
60
62
|
/**
|
|
61
63
|
* Automatic restrictions that could not be stored (no subject to put a row on, or the write failed), by
|
|
62
64
|
* room and seat (see `memKey`), with the epoch ms they end and the person they were earned by. The entry
|
|
@@ -80,6 +82,7 @@ export class ChatService {
|
|
|
80
82
|
this.onAutoRestrict = deps.onAutoRestrict;
|
|
81
83
|
this.onAutoRestricted = deps.onAutoRestricted;
|
|
82
84
|
this.logger = deps.logger;
|
|
85
|
+
this.typingWarn = new ThrottledWarn(deps.logger, deps.clock);
|
|
83
86
|
this.notices = deps.notices;
|
|
84
87
|
this.autoRestrictRule = deps.autoRestrictRule ?? DEFAULT_AUTO_RESTRICT_RULE;
|
|
85
88
|
this.maxLength = deps.limits?.maxLength ?? MAX_LEN;
|
|
@@ -122,6 +125,44 @@ export class ChatService {
|
|
|
122
125
|
return true;
|
|
123
126
|
}
|
|
124
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Is this person chat-restricted right now? For a typing indicator: show none while `restricted` is true. It runs
|
|
130
|
+
* the same decision as `accept` (`resolveRestriction`), and equals what `accept` would answer for the seat when
|
|
131
|
+
* `roomId` and `seatId` are both given. Without them the in-memory automatic timeout (the one that could not be
|
|
132
|
+
* stored, and every one earned by a guest with no identity) is looked up by person, over `roomId` or over every
|
|
133
|
+
* room, and a guest (no subject) cannot be found at all, since one guest cannot be told from another. The `gate`
|
|
134
|
+
* hook is not consulted: a gate refusal is not a restriction.
|
|
135
|
+
*
|
|
136
|
+
* Safe for a player's own client: it reveals nothing about others. A restriction that only reaches the person
|
|
137
|
+
* through a shared address of someone else's sanction reads `{ restricted: true, until: null, kind: null }`.
|
|
138
|
+
* Call it after the person is seated, with an identity from the platform and never one sent by the client; the
|
|
139
|
+
* address checked is the one the person last had recorded, as in `accept`.
|
|
140
|
+
*
|
|
141
|
+
* Synchronous and a pure read: no rate budget, nothing written, no event, no strike. It logs only a failure (event
|
|
142
|
+
* and error class), at most once a minute with a count of those held back; a failure reads as not restricted.
|
|
143
|
+
* An empty `roomId` or `seatId` counts as not given.
|
|
144
|
+
*/
|
|
145
|
+
restricted(subject, roomId, seatId) {
|
|
146
|
+
try {
|
|
147
|
+
const now = this.clock.now();
|
|
148
|
+
const room = roomId === undefined || roomId === null || roomId === '' ? null : roomId;
|
|
149
|
+
const seat = seatId === undefined || seatId === null || seatId === '' ? null : seatId;
|
|
150
|
+
const memory = room !== null && seat !== null
|
|
151
|
+
? () => this.memoryHeldAt(room, seat, subject, now, false)
|
|
152
|
+
: () => this.memoryHeldBy(subject, room, now);
|
|
153
|
+
const found = this.resolveRestriction(subject, now, memory, (err) => this.typingWarn.warn('chat.restriction_failed', { error: errName(err) }));
|
|
154
|
+
if (found === null)
|
|
155
|
+
return { restricted: false, until: null, kind: null };
|
|
156
|
+
// Someone else's row reaching this person through a shared address: restricted, nothing more.
|
|
157
|
+
if (!found.own)
|
|
158
|
+
return { restricted: true, until: null, kind: null };
|
|
159
|
+
return { restricted: true, until: found.until, kind: found.kind };
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
this.typingWarn.warn('chat.restriction_failed', { error: errName(err) });
|
|
163
|
+
return { restricted: false, until: null, kind: null };
|
|
164
|
+
}
|
|
165
|
+
}
|
|
125
166
|
// --- internals -----------------------------------------------------------
|
|
126
167
|
run(roomId, seatId, text, opts) {
|
|
127
168
|
if (typeof text !== 'string')
|
|
@@ -250,19 +291,61 @@ export class ChatService {
|
|
|
250
291
|
* failure is logged and reads as "not restricted".
|
|
251
292
|
*/
|
|
252
293
|
activeRestriction(roomId, seatId, subject, now) {
|
|
294
|
+
return this.resolveRestriction(subject, now, () => this.memoryHeldAt(roomId, seatId, subject, now, true));
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* The in-memory automatic timeout on one seat: its end, or null when there is none, it is over, or the seat now holds a
|
|
298
|
+
* different person (two guests count as the same). The one lookup `accept` and a seat-aware `restricted` share; `sweep`
|
|
299
|
+
* drops an expired entry (`accept` does, a read-only lookup does not).
|
|
300
|
+
*/
|
|
301
|
+
memoryHeldAt(roomId, seatId, subject, now, sweep) {
|
|
302
|
+
const key = memKey(roomId, seatId);
|
|
303
|
+
const mem = this.memRestrictions.get(key);
|
|
304
|
+
if (mem === undefined)
|
|
305
|
+
return null;
|
|
306
|
+
if (mem.until <= now) {
|
|
307
|
+
if (sweep)
|
|
308
|
+
this.memRestrictions.delete(key);
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
return this.samePerson(mem.subject, subject) ? mem.until : null;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* The in-memory automatic timeout held by a known person, found without a seat (the longest, over `roomId` or over
|
|
315
|
+
* every room). A guest (no subject) is never matched: with no seat there is no telling one guest from another.
|
|
316
|
+
* Read only: an expired entry is skipped, not swept.
|
|
317
|
+
*/
|
|
318
|
+
memoryHeldBy(subject, roomId, now) {
|
|
319
|
+
if (subject === null)
|
|
320
|
+
return null;
|
|
321
|
+
const prefix = roomId === null ? null : memKey(roomId, '');
|
|
322
|
+
let best = null;
|
|
323
|
+
for (const [key, mem] of this.memRestrictions) {
|
|
324
|
+
if (mem.until <= now || mem.subject === null)
|
|
325
|
+
continue;
|
|
326
|
+
if (prefix !== null && !key.startsWith(prefix))
|
|
327
|
+
continue;
|
|
328
|
+
if (best !== null && mem.until <= best)
|
|
329
|
+
continue;
|
|
330
|
+
if (this.samePerson(mem.subject, subject))
|
|
331
|
+
best = mem.until;
|
|
332
|
+
}
|
|
333
|
+
return best;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* THE restriction decision, shared by `accept` (a seat) and `restricted` (a person): the longest of the stored chat
|
|
337
|
+
* restriction, the stored full ban and the in-memory automatic one, whose end `memory` reports (null = none).
|
|
338
|
+
* Permanent beats timed; on a tie the stored one wins.
|
|
339
|
+
*/
|
|
340
|
+
resolveRestriction(subject, now, memory, failed = (err) => this.warn('chat.restriction_failed', { error: errName(err) })) {
|
|
253
341
|
try {
|
|
254
342
|
// The kill switch silences the in-memory restrictions too: they are sanctions, just never stored.
|
|
255
343
|
if (!this.sanctions.isEnabled())
|
|
256
344
|
return null;
|
|
257
|
-
const key = memKey(roomId, seatId);
|
|
258
345
|
let best = null;
|
|
259
|
-
const
|
|
260
|
-
if (
|
|
261
|
-
|
|
262
|
-
this.memRestrictions.delete(key);
|
|
263
|
-
else if (this.samePerson(mem.subject, subject)) {
|
|
264
|
-
best = { until: mem.until, byModerator: false, groupId: null, rule: String(this.autoRestrictRule), own: true };
|
|
265
|
-
}
|
|
346
|
+
const memUntil = memory();
|
|
347
|
+
if (memUntil !== null) {
|
|
348
|
+
best = { until: memUntil, byModerator: false, groupId: null, rule: String(this.autoRestrictRule), own: true, kind: 'auto' };
|
|
266
349
|
}
|
|
267
350
|
// Only the latest IP of a seated person is known; an IP row speed-bumps them, never links two people.
|
|
268
351
|
const ids = {
|
|
@@ -281,13 +364,14 @@ export class ChatService {
|
|
|
281
364
|
groupId: stored.groupId,
|
|
282
365
|
rule: stored.rule,
|
|
283
366
|
own: stored.own,
|
|
367
|
+
kind: kind === 'ban' ? 'ban' : stored.automated ? 'auto' : 'chat',
|
|
284
368
|
};
|
|
285
369
|
}
|
|
286
370
|
}
|
|
287
371
|
return best;
|
|
288
372
|
}
|
|
289
373
|
catch (err) {
|
|
290
|
-
|
|
374
|
+
failed(err);
|
|
291
375
|
return null;
|
|
292
376
|
}
|
|
293
377
|
}
|
package/dist/src/chat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/chat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAIpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAgB/C,6GAA6G;AAC7G,0EAA0E;AAC1E,8EAA8E;AAC9E,+CAA+C;AAC/C,qGAAqG;AACrG,qDAAqD;AACrD,8FAA8F;AAC9F,mHAAmH;AACnH,iHAAiH;AACjH,8GAA8G;AAC9G,uDAAuD;AACvD,uGAAuG;AACvG,oGAAoG;AAEpG,yFAAyF;AACzF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAC3B,iGAAiG;AACjG,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAC5B,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AAEpC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAEpD,oHAAoH;AACpH,MAAM,0BAA0B,GAAG,CAAC,CAAC;AA4FrC,MAAM,OAAO,GAAG,CAAC,GAAY,EAAU,EAAE,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC;AAEzF,MAAM,MAAM,GAAG,CACb,MAAoB,EACpB,KAA0F,EAC9E,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,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EAAE,GAAG,GAAG,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,8EAA8E;IACtE,UAAU,CAAC,CAAmB,EAAE,CAAmB;QACzD,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IAEO,IAAI,CAAC,KAAa,EAAE,MAAiD;QAC3E,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;CACF"}
|
package/dist/src/chatwarden.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import type { AuditPage, AuditQuery, AuditRecordInput } from './audit.js';
|
|
2
2
|
import type { DecisionInput, DecisionResult } from './decide.js';
|
|
3
|
-
import type { ChatResult } from './chat.js';
|
|
3
|
+
import type { ChatResult, RestrictedAnswer } from './chat.js';
|
|
4
4
|
import type { Documents } from './documents.js';
|
|
5
5
|
import type { DoorKind, DoorRefusal } from './doors.js';
|
|
6
6
|
import type { Subscribe } from './events.js';
|
|
7
7
|
import type { ActionRecord, Suggestion, SuggestContext } from './ladder.js';
|
|
8
8
|
import type { Limits, LimitsInput } from './limits.js';
|
|
9
|
-
import type {
|
|
9
|
+
import type { PolicyPreview, PolicySaveContext, PolicySaveResult, PolicyState } from './policy.js';
|
|
10
|
+
import type { ModerationProfile, PolicyLayer, PolicySection, PresetName, ProfanityConfig, ProfileOverrides, ResolvedProfile } from './profile.js';
|
|
10
11
|
import type { PlayerNotice } from './notices.js';
|
|
11
|
-
import type { ReportCounts, ReportInput, ReportResult } from './reports.js';
|
|
12
|
+
import type { ReportCounts, ReportDetailInput, ReportDetailResult, ReportInput, ReportResult } from './reports.js';
|
|
12
13
|
import type { PurgeResult, RetentionPolicy } from './retention.js';
|
|
13
14
|
import type { CommunityRules, RuleRef } from './rules.js';
|
|
14
15
|
import type { SanctionInput } from './sanctions.js';
|
|
16
|
+
import type { BlockedDays, BlockedItem, ReporterRecord, SanctionGroupView, SanctionListInput, SanctionPage } from './staffViews.js';
|
|
15
17
|
import type { ReportPage, ReportQuery, StaffReport } from './staffReports.js';
|
|
16
|
-
import type {
|
|
18
|
+
import type { CaseClaim, ClaimOutcome, NextCase } from './team.js';
|
|
19
|
+
import type { Clock, DiscordThreadRow, Logger, Matcher, Platform, ProfanityFilter, RawWho, ReasonRow, ReportCategory, ConductLevel, Store, StoredReport, SubjectId, WebhookKeyReservation } from './types.js';
|
|
17
20
|
/**
|
|
18
21
|
* One rule gap, for the moderators' rules review. It names the sanction group and its reference code but never
|
|
19
22
|
* a person: no subject id, key or hash.
|
|
@@ -93,7 +96,8 @@ export interface ChatwardenOptions {
|
|
|
93
96
|
/**
|
|
94
97
|
* The moderation profile: a preset by name (`'relaxed'`, `'standard'` or `'strict'`) or a complete profile from
|
|
95
98
|
* `defineProfile` / `resolveProfile`. Default `'standard'`. It drives `suggest`, the starter rules and the
|
|
96
|
-
* summary
|
|
99
|
+
* summary. This is the BASE profile: a moderator's stored edits (`cw.policy`) are merged on top of it, and `cw.profile` reads
|
|
100
|
+
* the result.
|
|
97
101
|
*/
|
|
98
102
|
profile?: PresetName | ModerationProfile;
|
|
99
103
|
/**
|
|
@@ -154,6 +158,31 @@ export interface Chatwarden {
|
|
|
154
158
|
}): ChatResult;
|
|
155
159
|
/** Should `viewerSeat` be shown a line `senderSeat` sent (mutes applied)? */
|
|
156
160
|
visibleTo(roomId: string, viewerSeat: string, senderSeat: string): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Is this person chat-restricted right now (a chat restriction, a ban or an automatic timeout)? For a typing
|
|
163
|
+
* indicator: show none while `restricted` is true. It runs the same decision as `accept`, and equals what
|
|
164
|
+
* `accept` would answer for the seat when you pass BOTH `roomId` and `seatId`. Without them, an automatic
|
|
165
|
+
* timeout that was only kept in memory (it could not be stored, or a guest with no identity earned it) is looked
|
|
166
|
+
* up by person, over `roomId` or over every room, and a guest with no key and no account is never found: one
|
|
167
|
+
* guest cannot be told from another. The `gate` option is not consulted; a gate refusal is not a restriction.
|
|
168
|
+
* Synchronous and a pure read: no rate budget spent, no evidence, strike, event or notice written. Only a
|
|
169
|
+
* failure is logged (event and error class), at most once a minute with a count of those held back; a failure
|
|
170
|
+
* reads as `restricted: false`.
|
|
171
|
+
*
|
|
172
|
+
* Call it after `cw.rooms.seat`: the address checked is the one `seat` last recorded for the person, as in
|
|
173
|
+
* `accept`, not `who.ip`. Take `who` from your platform's `identify` on the server, never from what the client
|
|
174
|
+
* sends: a client-supplied key or account would let a caller look up another person's restriction.
|
|
175
|
+
*
|
|
176
|
+
* Safe to answer a player about THEMSELVES from their own client, because it reveals nothing about others:
|
|
177
|
+
* `until` (epoch ms, `null` = permanent) and `kind` (`'chat'`, `'ban'` or `'auto'`) are only given for the
|
|
178
|
+
* person's own sanction. When the restriction reaches them only through an address shared with someone else's
|
|
179
|
+
* sanction, the answer is `{ restricted: true, until: null, kind: null }`. `who` is found by key or account (an
|
|
180
|
+
* address alone finds nobody). An empty `roomId` or `seatId` counts as not given. Never carries an identifier.
|
|
181
|
+
*/
|
|
182
|
+
restricted(who: RawWho, opts?: {
|
|
183
|
+
roomId?: string | null;
|
|
184
|
+
seatId?: string | null;
|
|
185
|
+
}): RestrictedAnswer;
|
|
157
186
|
};
|
|
158
187
|
mutes: {
|
|
159
188
|
/** `viewerSeat`'s occupant mutes (`on`) or unmutes `targetSeat`'s occupant. Does nothing if either seat has no subject. */
|
|
@@ -162,12 +191,27 @@ export interface Chatwarden {
|
|
|
162
191
|
mutedSeats(roomId: string, viewerSeat: string): string[];
|
|
163
192
|
};
|
|
164
193
|
reports: {
|
|
194
|
+
/**
|
|
195
|
+
* File a report. `input.reason` (or the 0.1.1 alias `category`) is optional: with the default `one_tap` flow a report with
|
|
196
|
+
* no reason is taken; with `reason_required` it is refused `reason_required`; an unknown or switched-off reason is
|
|
197
|
+
* `reason_unknown` in every flow. The reason is stored as `reportedReason`: a hint for the moderator, never the truth.
|
|
198
|
+
* See {@link ReportInput} and {@link ReportRefusal}. The kit has no player report route: your game's own route calls this.
|
|
199
|
+
*/
|
|
165
200
|
submit(input: ReportInput): Promise<ReportResult>;
|
|
201
|
+
/**
|
|
202
|
+
* The reporter's one optional follow-up after a report: `{ reason?, note? }` attached to the same report. Only the original
|
|
203
|
+
* reporter (the same seat, still in the report's room), once, within ten minutes, and while the report is open; it never
|
|
204
|
+
* changes the target or the excerpt. Refusals: `off`, `not_found`, `not_reporter`, `too_late`, `already_added`,
|
|
205
|
+
* `reason_unknown`. Never rejects. The kit has no player report route: expose this from your own, the way you expose
|
|
206
|
+
* `submit`, with the seat taken from your own session and never from the request body.
|
|
207
|
+
*/
|
|
208
|
+
addDetail(reportId: string, reporterSeat: string, detail: ReportDetailInput): Promise<ReportDetailResult>;
|
|
166
209
|
/**
|
|
167
210
|
* The staff report queue, newest first (ties broken by id), one page at a time. Filter with `status`; pass the
|
|
168
211
|
* previous page's `next` as `before` for the next page; `limit` defaults to 50 and is clamped to 1..200. Each item
|
|
169
212
|
* is a {@link StaffReport}: the whole record plus the canonical staff refs and the own line ids of every person.
|
|
170
|
-
*
|
|
213
|
+
* `reason` keeps only the reports filed under that reported reason (`null`: none given). Throws `ReportQueryError` for an
|
|
214
|
+
* unknown status, a malformed reason or a cursor that is not one of ours, and the store's own error
|
|
171
215
|
* if it fails, so a route handler should catch both.
|
|
172
216
|
* Carries subject ids: staff channels only, never send to a player.
|
|
173
217
|
*/
|
|
@@ -177,6 +221,113 @@ export interface Chatwarden {
|
|
|
177
221
|
* Carries subject ids: staff channels only, never send to a player.
|
|
178
222
|
*/
|
|
179
223
|
get(id: string): StaffReport | null;
|
|
224
|
+
/**
|
|
225
|
+
* How the reports this person FILED stand (total, open, actioned, dismissed, bad faith) and when their reporting
|
|
226
|
+
* suspension ends (null if none), under the same rule intake uses, and how often their reported reason was borne out
|
|
227
|
+
* (`reasonMatched` of `reasonDecided`). Folds in the person's merged aliases. Staff only:
|
|
228
|
+
* never send to a player (a player is not told who reported or how often).
|
|
229
|
+
*/
|
|
230
|
+
reporterRecord(subject: SubjectId): ReporterRecord;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Blocked chat lines, from the slur filter's strikes (purged after 30 days). Staff only: the lines are raw chat text
|
|
234
|
+
* and `person` is a subject id; never send either to a player.
|
|
235
|
+
*/
|
|
236
|
+
blocked: {
|
|
237
|
+
/** The last `days` days (1, 7 or 30, else `RangeError`), newest first, at most 500. */
|
|
238
|
+
list(q: {
|
|
239
|
+
days: BlockedDays;
|
|
240
|
+
}): BlockedItem[];
|
|
241
|
+
/** Strikes per term id over the same window; a term with none is absent. */
|
|
242
|
+
countsByTerm(q: {
|
|
243
|
+
days: BlockedDays;
|
|
244
|
+
}): Record<string, number>;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* The team workbench: soft claims on a person's case, take next, and who has a case open. Staff only; every `person` is
|
|
248
|
+
* a staff ref (an alias is folded into the surviving person) and every `actor` a staff ref the audit trail accepts
|
|
249
|
+
* (`RangeError` otherwise). Claims live in the store and last 10 minutes from the last beat (`CLAIM_TTL_MS`), on the
|
|
250
|
+
* injected clock; an expired claim reads as absent everywhere. They are a courtesy, not a security boundary: nothing
|
|
251
|
+
* in the core refuses a decision because of one (`@chatwarden/http` does, with a 409 `claimed`).
|
|
252
|
+
* Carries subject ids: staff channels only, never send to a player.
|
|
253
|
+
*/
|
|
254
|
+
cases: {
|
|
255
|
+
/** The live claim on the person's case, or null. */
|
|
256
|
+
holder(person: SubjectId): CaseClaim | null;
|
|
257
|
+
/** The live claims among these people in one read, keyed by their canonical person. */
|
|
258
|
+
holders(people: readonly SubjectId[]): Map<SubjectId, CaseClaim>;
|
|
259
|
+
/**
|
|
260
|
+
* Claim the person's case, or beat the claim `actor` already holds (the claim then lasts 10 minutes from now; `since`
|
|
261
|
+
* is kept). Needs an open report against the person (`no_case` otherwise). Somebody else's live claim answers
|
|
262
|
+
* `claimed` with it, unless `takeOver` is true, which moves it to `actor` (`tookOverFrom` names the previous holder).
|
|
263
|
+
* `takeOver` is not permission-checked here: the caller decides who may use it. The write is one atomic conditional
|
|
264
|
+
* statement, so two moderators racing for one case never both win, even from two processes on one database. A
|
|
265
|
+
* process that loses the database lock race in between (SQLite BUSY) is retried up to `CLAIM_BUSY_TRIES` times with
|
|
266
|
+
* a fresh read, so it answers `claimed` with the winner, not an error.
|
|
267
|
+
*/
|
|
268
|
+
claim(person: SubjectId, actor: string, opts?: {
|
|
269
|
+
takeOver?: boolean;
|
|
270
|
+
}): ClaimOutcome;
|
|
271
|
+
/** End `actor`'s own claim. True only when it ended a live one; never touches another moderator's. */
|
|
272
|
+
release(person: SubjectId, actor: string): boolean;
|
|
273
|
+
/**
|
|
274
|
+
* What a decision does to the claim: end `actor`'s own claim only when the person has no other open report (one case per
|
|
275
|
+
* person: deciding one report of several keeps the claim, and the last one releases it). While reports remain the claim is
|
|
276
|
+
* not touched at all. True only when it ended a live claim.
|
|
277
|
+
*/
|
|
278
|
+
releaseWhenDone(person: SubjectId, actor: string): boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Claim and return the oldest OPEN case nobody holds, optionally only cases with an open report of `category`
|
|
281
|
+
* or that gave `reason` (an id, the old `disruption` reading as `griefing`; `null`: none given; `RangeError` for an unknown category or a
|
|
282
|
+
* malformed id), or null. A case is a person, ranked by their oldest open report and opened on
|
|
283
|
+
* their newest. A case anyone holds is skipped without a write (held cases are read once per page of reports). `category` and
|
|
284
|
+
* `reason` are the only filters: the order is already oldest first. A candidate lost to a rival in between is retried like `claim`.
|
|
285
|
+
*/
|
|
286
|
+
next(actor: string, filter?: {
|
|
287
|
+
category?: ReportCategory;
|
|
288
|
+
reason?: string | null;
|
|
289
|
+
}): NextCase | null;
|
|
290
|
+
/**
|
|
291
|
+
* `actor` has the person's case open now. A hint for 30 seconds (`VIEWING_TTL_MS`), in this process's memory only.
|
|
292
|
+
* Only a person with an open report is tracked (false otherwise, nothing recorded); one actor keeps at most 20 cases
|
|
293
|
+
* (`VIEWING_PER_ACTOR_MAX`), a newer beat dropping their oldest. True when the beat was recorded.
|
|
294
|
+
*/
|
|
295
|
+
view(person: SubjectId, actor: string): boolean;
|
|
296
|
+
/** Who has the person's case open now (sorted), leaving `except` out. In this process's memory: other processes are not seen. */
|
|
297
|
+
viewers(person: SubjectId, except?: string): string[];
|
|
298
|
+
/** `viewers` for several people at once; people nobody is viewing are absent. */
|
|
299
|
+
viewersOf(people: readonly SubjectId[], except?: string): Map<SubjectId, string[]>;
|
|
300
|
+
};
|
|
301
|
+
/** A cheap "did anything change?" for the moderator queue. */
|
|
302
|
+
changes: {
|
|
303
|
+
/**
|
|
304
|
+
* An opaque token, persisted in the store (the in-memory store starts again at "0" when the process restarts), that is different after any report filed or decided, sanction applied or
|
|
305
|
+
* revoked, rule gap closed, claim taken, taken over or released, or saved reason changed, and the same otherwise
|
|
306
|
+
* (a claim heartbeat, a refused claim, viewing and every read leave it alone). A claim that merely expires does not
|
|
307
|
+
* move it. Compare it for equality only; one read of one row, no audit, no other reads.
|
|
308
|
+
*/
|
|
309
|
+
token(): string;
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* Saved decision reasons (label up to 40 characters, text up to 500, at most 200 of them), shared by the team and
|
|
313
|
+
* kept in the store. Text is staff-written and may be quoted into a decision; it is not player-facing by itself.
|
|
314
|
+
* `ReasonError` for a label, text or id outside its limits, or when the list is full.
|
|
315
|
+
*/
|
|
316
|
+
reasons: {
|
|
317
|
+
/** Every reason, active or not, in the order they were added. */
|
|
318
|
+
list(): ReasonRow[];
|
|
319
|
+
/** Add an active reason (trimmed). */
|
|
320
|
+
add(input: {
|
|
321
|
+
label: string;
|
|
322
|
+
text: string;
|
|
323
|
+
}): ReasonRow;
|
|
324
|
+
/** Change the label and/or text (at least one). Null for an unknown id. */
|
|
325
|
+
update(id: string, patch: {
|
|
326
|
+
label?: string;
|
|
327
|
+
text?: string;
|
|
328
|
+
}): ReasonRow | null;
|
|
329
|
+
/** Switch a reason on or off. Null for an unknown id. */
|
|
330
|
+
setActive(id: string, active: boolean): ReasonRow | null;
|
|
180
331
|
};
|
|
181
332
|
doors: {
|
|
182
333
|
check(kind: DoorKind, who: RawWho): DoorRefusal | null;
|
|
@@ -195,6 +346,18 @@ export interface Chatwarden {
|
|
|
195
346
|
* a seen one leaves "My record". Resolves true when this call revoked something.
|
|
196
347
|
*/
|
|
197
348
|
revoke(groupId: string, actor: string, reason: string): Promise<boolean>;
|
|
349
|
+
/**
|
|
350
|
+
* A person's sanctions as staff see them, newest first: the last 90 days plus every unrevoked permanent one, across
|
|
351
|
+
* the aliases merged into them, at most 200. Each is a {@link SanctionGroupView} built from the group's subject row
|
|
352
|
+
* (never an IP row, never a hashed identifier). Carries staff-only text (reason, actor): never send to a player.
|
|
353
|
+
*/
|
|
354
|
+
forPerson(subject: SubjectId): SanctionGroupView[];
|
|
355
|
+
/**
|
|
356
|
+
* Every person's sanctions, newest first, one page at a time (`limit` default 50, clamped to 1..200; `cursor` is the
|
|
357
|
+
* previous `next`; `source` filters). Not windowed. Throws {@link SanctionQueryError} for a cursor that is not ours or an
|
|
358
|
+
* unknown source. Carries subject ids and staff-only text: never send to a player.
|
|
359
|
+
*/
|
|
360
|
+
list(q?: SanctionListInput): SanctionPage;
|
|
198
361
|
};
|
|
199
362
|
/**
|
|
200
363
|
* Subscribe to what happens in the kit: `'report.created'`, `'report.closed'`, `'sanction.applied'`,
|
|
@@ -228,15 +391,49 @@ export interface Chatwarden {
|
|
|
228
391
|
};
|
|
229
392
|
/** The registry in use (the one given, or the starter rules for the profile). Retired rules stay listed. */
|
|
230
393
|
rules: CommunityRules;
|
|
231
|
-
/**
|
|
232
|
-
|
|
394
|
+
/**
|
|
395
|
+
* The profile in force: the preset, the code overrides and the stored layer from `cw.policy`, validated. Deep-frozen. A
|
|
396
|
+
* getter, read live: after a save (or a change another process saved, within 10 seconds) it is a new object, so never keep
|
|
397
|
+
* one across calls. Everything in the kit that reads the profile reads it through this.
|
|
398
|
+
*/
|
|
399
|
+
readonly profile: ResolvedProfile;
|
|
400
|
+
/**
|
|
401
|
+
* The editable profile. The profile from code is the base; a moderator's edits to the durations offered, the ladder, the first
|
|
402
|
+
* offences, the repeat rule, the area and severe rules and the guideline outcome texts are stored in your store as a
|
|
403
|
+
* versioned layer. Needs a store with `loadPolicyLayer` and `savePolicyLayer` (the memory and SQLite stores have them);
|
|
404
|
+
* without them `save` and `reset` answer `{ ok: false, error: 'unsupported' }` and everything else works from code.
|
|
405
|
+
*/
|
|
406
|
+
policy: {
|
|
407
|
+
/** `{ effective, base, layer, version, canSave }`, plus `layerError` when the stored layer cannot be used (it is then ignored). */
|
|
408
|
+
get(): PolicyState;
|
|
409
|
+
/**
|
|
410
|
+
* Replace the stored layer (the whole layer: a section left out goes back to the base) if `version` is still the stored
|
|
411
|
+
* one. `{ ok: true, version, changed }`, or `{ ok: false, error: 'conflict' | 'unsupported' }`, or `{ ok: false, error:
|
|
412
|
+
* 'invalid', path }` for a layer that touches anything outside the editable sections (profanity stays in code) or would
|
|
413
|
+
* make the profile invalid. `actor` and `reason` are checked (path `actor` / `reason`); the staff routes write them to
|
|
414
|
+
* the audit trail. Takes effect at once here, and within 10 seconds in other processes on the same store.
|
|
415
|
+
*/
|
|
416
|
+
save(layer: PolicyLayer, ctx: PolicySaveContext): PolicySaveResult;
|
|
417
|
+
/**
|
|
418
|
+
* What `layer` would suggest for four sample records (`clean`, `oneWarning`, `chat24h`, `ban7d`) and each conduct level,
|
|
419
|
+
* without saving. Pass `rule` to see an area or severe rule take effect.
|
|
420
|
+
*/
|
|
421
|
+
preview(layer: PolicyLayer, rule?: RuleRef): PolicyPreview;
|
|
422
|
+
/** Put one section (or all of them) back to the base. Stores the layer without it; a no-op when nothing is stored for it. */
|
|
423
|
+
reset(section?: PolicySection, o?: {
|
|
424
|
+
version?: number;
|
|
425
|
+
}): PolicySaveResult;
|
|
426
|
+
/** Look at the store now, instead of waiting for the 10 second interval. */
|
|
427
|
+
refresh(): void;
|
|
428
|
+
};
|
|
233
429
|
/** The limits in force, defaults filled in. Deep-frozen. */
|
|
234
430
|
limits: Limits;
|
|
235
|
-
/** The profile's one-line summary, for the report dialog and the rules page. Same as `profile.summary`. */
|
|
236
|
-
summary: string;
|
|
431
|
+
/** The profile's one-line summary, for the report dialog and the rules page. Same as `profile.summary`. A getter, read live. */
|
|
432
|
+
readonly summary: string;
|
|
237
433
|
/**
|
|
238
434
|
* Generated policy documents, bound to the profile and rules in force: a player code of conduct, a moderator guide,
|
|
239
|
-
* an agent brief and the policy as JSON.
|
|
435
|
+
* an agent brief and the policy as JSON. Each call is generated from the effective profile at that moment, so a save shows
|
|
436
|
+
* in the very next call.
|
|
240
437
|
*/
|
|
241
438
|
documents: Documents;
|
|
242
439
|
/**
|
|
@@ -285,7 +482,7 @@ export interface Chatwarden {
|
|
|
285
482
|
};
|
|
286
483
|
/**
|
|
287
484
|
* The staff audit trail: who (actor and role) did what to which id, and when. Staff only. Stores ids and the action
|
|
288
|
-
* name, never chat text
|
|
485
|
+
* name, never chat text or a note (a `policy.update` / `policy.reset` row also holds the sections changed and the owner's reason). Rows from the term editor and from `gaps.close` read here too (role
|
|
289
486
|
* null). Kept `retention.auditMs` (default 365 days, at least 90).
|
|
290
487
|
*/
|
|
291
488
|
audit: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatwarden.d.ts","sourceRoot":"","sources":["../../src/chatwarden.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG1E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,U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