@cxyhhhhh/qraft-pack-moderation 0.0.0-stage → 0.1.0
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/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/policy.d.ts +40 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +74 -0
- package/dist/policy.js.map +1 -0
- package/package.json +22 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PackDefinition } from "@cxyhhhhh/qraft-core";
|
|
2
|
+
import { adminGuard, createModerationMiddleware, createModerationPolicy, type ModerationPolicy, type ModerationPolicyOptions } from "./policy.js";
|
|
3
|
+
export declare const PACK_ID: "@cxyhhhhh/qraft-pack-moderation";
|
|
4
|
+
declare module "@cxyhhhhh/qraft-core" {
|
|
5
|
+
interface QraftServiceMap {
|
|
6
|
+
"moderation.policy": ModerationPolicy;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export interface ModerationPackOptions extends ModerationPolicyOptions {
|
|
10
|
+
}
|
|
11
|
+
export declare function moderationPack(options?: ModerationPackOptions): PackDefinition;
|
|
12
|
+
export { createModerationMiddleware, createModerationPolicy };
|
|
13
|
+
export { adminGuard };
|
|
14
|
+
export type { ModerationDecision, ModerationPolicy, ModerationPolicyOptions, ModerationSubject, } from "./policy.js";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,UAAU,EACV,0BAA0B,EAC1B,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC7B,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,OAAO,EAAG,wBAAiC,CAAC;AAEzD,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,eAAe;QACvB,mBAAmB,EAAE,gBAAgB,CAAC;KACvC;CACF;AAED,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;CAAG;AAEzE,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,cAAc,CASlF;AAED,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { definePack } from "@cxyhhhhh/qraft-core";
|
|
2
|
+
import { adminGuard, createModerationMiddleware, createModerationPolicy, } from "./policy.js";
|
|
3
|
+
export const PACK_ID = "@cxyhhhhh/qraft-pack-moderation";
|
|
4
|
+
export function moderationPack(options = {}) {
|
|
5
|
+
return definePack({
|
|
6
|
+
id: PACK_ID,
|
|
7
|
+
async setup(ctx) {
|
|
8
|
+
const policy = await createModerationPolicy(ctx.storage.namespace(PACK_ID), options);
|
|
9
|
+
const registration = ctx.services.provide("moderation.policy", policy);
|
|
10
|
+
ctx.onDispose(() => registration.dispose());
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export { createModerationMiddleware, createModerationPolicy };
|
|
15
|
+
export { adminGuard };
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyC,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,UAAU,EACV,0BAA0B,EAC1B,sBAAsB,GAGvB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAiC,CAAC;AAUzD,MAAM,UAAU,cAAc,CAAC,UAAiC,EAAE;IAChE,OAAO,UAAU,CAAC;QAChB,EAAE,EAAE,OAAO;QACX,KAAK,CAAC,KAAK,CAAC,GAAgB;YAC1B,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;YACrF,MAAM,YAAY,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;YACvE,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9C,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/policy.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { RouteGuard, StorageNamespace } from "@cxyhhhhh/qraft-core";
|
|
2
|
+
export interface ModerationSubject {
|
|
3
|
+
text: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
groupId?: string;
|
|
6
|
+
feature?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ModerationDecision {
|
|
9
|
+
allowed: boolean;
|
|
10
|
+
reason?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ModerationPolicy {
|
|
13
|
+
isAdmin(userId: string): boolean;
|
|
14
|
+
setAdmin(userId: string, enabled: boolean): Promise<void>;
|
|
15
|
+
isGroupEnabled(groupId: string, feature: string): boolean;
|
|
16
|
+
setGroupEnabled(groupId: string, feature: string, enabled: boolean): Promise<void>;
|
|
17
|
+
addWord(word: string): Promise<void>;
|
|
18
|
+
removeWord(word: string): Promise<void>;
|
|
19
|
+
inspect(subject: ModerationSubject): ModerationDecision;
|
|
20
|
+
}
|
|
21
|
+
/** Protects a route with the persisted administrator set. */
|
|
22
|
+
export declare function adminGuard(policy: Pick<ModerationPolicy, "isAdmin">, message?: string): RouteGuard;
|
|
23
|
+
export interface ModerationPolicyOptions {
|
|
24
|
+
/** Administrators configured by the application owner at startup. */
|
|
25
|
+
adminIds?: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
export declare function createModerationPolicy(storage: StorageNamespace, options?: ModerationPolicyOptions): Promise<ModerationPolicy>;
|
|
28
|
+
/** Stops the SDK middleware chain when the policy rejects the message. */
|
|
29
|
+
export declare function createModerationMiddleware(policy: ModerationPolicy): (ctx: {
|
|
30
|
+
message: {
|
|
31
|
+
content: string;
|
|
32
|
+
kind: string;
|
|
33
|
+
author: {
|
|
34
|
+
id: string;
|
|
35
|
+
};
|
|
36
|
+
groupOpenid?: string;
|
|
37
|
+
};
|
|
38
|
+
stop(reason?: string): void;
|
|
39
|
+
}, next: () => Promise<void>) => Promise<void>;
|
|
40
|
+
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,c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set. */
|
|
2
|
+
export function adminGuard(policy, message = "无权限:只有管理员可以执行此命令") {
|
|
3
|
+
return async (event) => {
|
|
4
|
+
if (event.session && policy.isAdmin(event.session.userId))
|
|
5
|
+
return true;
|
|
6
|
+
await event.session?.reply(message);
|
|
7
|
+
return { matched: true, blocked: true };
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
const STORAGE_KEY = "policy";
|
|
11
|
+
export async function createModerationPolicy(storage, options = {}) {
|
|
12
|
+
const saved = await storage.get(STORAGE_KEY);
|
|
13
|
+
const state = {
|
|
14
|
+
admins: [...new Set([...(saved?.admins ?? []), ...(options.adminIds ?? [])])],
|
|
15
|
+
words: saved?.words ?? [],
|
|
16
|
+
groups: saved?.groups ?? {},
|
|
17
|
+
};
|
|
18
|
+
const persist = () => storage.set(STORAGE_KEY, state);
|
|
19
|
+
return {
|
|
20
|
+
isAdmin: (userId) => state.admins.includes(userId),
|
|
21
|
+
async setAdmin(userId, enabled) {
|
|
22
|
+
state.admins = enabled ? [...new Set([...state.admins, userId])] : state.admins.filter((id) => id !== userId);
|
|
23
|
+
await persist();
|
|
24
|
+
},
|
|
25
|
+
isGroupEnabled(groupId, feature) {
|
|
26
|
+
return state.groups[groupId]?.[feature] !== false;
|
|
27
|
+
},
|
|
28
|
+
async setGroupEnabled(groupId, feature, enabled) {
|
|
29
|
+
const group = { ...state.groups[groupId], [feature]: enabled };
|
|
30
|
+
state.groups = { ...state.groups, [groupId]: group };
|
|
31
|
+
await persist();
|
|
32
|
+
},
|
|
33
|
+
async addWord(word) {
|
|
34
|
+
const normalized = word.trim().toLowerCase();
|
|
35
|
+
if (!normalized || state.words.includes(normalized))
|
|
36
|
+
return;
|
|
37
|
+
state.words = [...state.words, normalized];
|
|
38
|
+
await persist();
|
|
39
|
+
},
|
|
40
|
+
async removeWord(word) {
|
|
41
|
+
const normalized = word.trim().toLowerCase();
|
|
42
|
+
state.words = state.words.filter((item) => item !== normalized);
|
|
43
|
+
await persist();
|
|
44
|
+
},
|
|
45
|
+
inspect(subject) {
|
|
46
|
+
if (state.admins.includes(subject.userId))
|
|
47
|
+
return { allowed: true };
|
|
48
|
+
if (subject.groupId && subject.feature && state.groups[subject.groupId]?.[subject.feature] === false) {
|
|
49
|
+
return { allowed: false, reason: "feature disabled" };
|
|
50
|
+
}
|
|
51
|
+
const haystack = subject.text.toLowerCase();
|
|
52
|
+
const blocked = state.words.find((word) => haystack.includes(word));
|
|
53
|
+
if (blocked)
|
|
54
|
+
return { allowed: false, reason: "blocked word" };
|
|
55
|
+
return { allowed: true };
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** Stops the SDK middleware chain when the policy rejects the message. */
|
|
60
|
+
export function createModerationMiddleware(policy) {
|
|
61
|
+
return async (ctx, next) => {
|
|
62
|
+
const decision = policy.inspect({
|
|
63
|
+
text: ctx.message.content,
|
|
64
|
+
userId: ctx.message.author.id,
|
|
65
|
+
groupId: ctx.message.kind === "group" ? ctx.message.groupOpenid : undefined,
|
|
66
|
+
});
|
|
67
|
+
if (!decision.allowed) {
|
|
68
|
+
ctx.stop(decision.reason);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
await next();
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAwBA,6DAA6D;AAC7D,MAAM,UAAU,UAAU,CACxB,MAAyC,EACzC,OAAO,GAAG,kBAAkB;IAE5B,OAAO,KAAK,EAAE,KAAK,EAAE,EAAE;QACrB,IAAI,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,CAAC;QACvE,MAAM,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,OAAO,EAAE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/qraft-pack-moderation",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Group policy and moderation services.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": ["dist"],
|
|
7
|
+
"publishConfig": { "access": "public" },
|
|
8
|
+
"engines": { "node": ">=22.5" },
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.json",
|
|
19
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@cxyhhhhh/qraft-core": "0.1.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/README.md
DELETED