@zhin.js/adapter-kook 1.0.84 → 1.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/CHANGELOG.md +898 -17
- package/PERMITS.md +23 -0
- package/README.md +73 -374
- package/adapters/kook/index.js +41 -0
- package/adapters/kook/index.ts +56 -0
- package/agents/kook/agent.json +20 -0
- package/agents/kook/boundaries.md +3 -0
- package/agents/kook/conventions.md +3 -0
- package/agents/kook/skills/kook/SKILL.md +20 -0
- package/agents/kook/skills/kook/tools/blacklist/index.js +31 -0
- package/agents/kook/skills/kook/tools/blacklist/index.ts +31 -0
- package/agents/kook/skills/kook/tools/create_role/index.js +23 -0
- package/agents/kook/skills/kook/tools/create_role/index.ts +23 -0
- package/agents/kook/skills/kook/tools/delete_role/index.js +19 -0
- package/agents/kook/skills/kook/tools/delete_role/index.ts +19 -0
- package/agents/kook/skills/kook/tools/grant_role/index.js +20 -0
- package/agents/kook/skills/kook/tools/grant_role/index.ts +20 -0
- package/agents/kook/skills/kook/tools/list_roles/index.js +25 -0
- package/agents/kook/skills/kook/tools/list_roles/index.ts +25 -0
- package/agents/kook/skills/kook/tools/revoke_role/index.js +20 -0
- package/agents/kook/skills/kook/tools/revoke_role/index.ts +20 -0
- package/agents/kook/system.md +3 -0
- package/commands/kook/endpoint/add/[id]/index.js +3 -0
- package/commands/kook/endpoint/add/[id]/index.ts +3 -0
- package/commands/kook/endpoint/definition.js +19 -0
- package/commands/kook/endpoint/definition.ts +19 -0
- package/commands/kook/endpoint/list/index.js +3 -0
- package/commands/kook/endpoint/list/index.ts +3 -0
- package/commands/kook/endpoint/remove/[id]/index.js +3 -0
- package/commands/kook/endpoint/remove/[id]/index.ts +3 -0
- package/lib/client.d.ts +11 -0
- package/lib/client.js +2 -0
- package/lib/endpoint.d.ts +59 -0
- package/lib/endpoint.js +374 -0
- package/lib/index.d.ts +6 -18
- package/lib/index.js +6 -342
- package/lib/kook-runtime-state.d.ts +1 -0
- package/lib/kook-runtime-state.js +6 -0
- package/lib/platform-permit.d.ts +22 -0
- package/lib/platform-permit.js +48 -0
- package/lib/protocol.d.ts +126 -0
- package/lib/protocol.js +300 -0
- package/lib/side-event-dispatch.d.ts +3 -0
- package/lib/side-event-dispatch.js +49 -0
- package/lib/webhook.d.ts +16 -0
- package/lib/webhook.js +71 -0
- package/lib/ws.d.ts +56 -0
- package/lib/ws.js +63 -0
- package/package.json +73 -29
- package/plugin.js +19 -0
- package/schema.json +171 -0
- package/src/client.ts +15 -0
- package/src/endpoint.ts +433 -0
- package/src/index.ts +45 -322
- package/src/kook-runtime-state.ts +7 -0
- package/src/platform-permit.ts +75 -0
- package/src/protocol.ts +433 -0
- package/src/side-event-dispatch.ts +54 -0
- package/src/webhook.ts +114 -0
- package/src/ws.ts +131 -0
- package/client/Dashboard.tsx +0 -255
- package/client/index.tsx +0 -11
- package/client/tsconfig.json +0 -7
- package/client/utils/api.ts +0 -17
- package/dist/index.js +0 -31
- package/lib/adapter.d.ts +0 -26
- package/lib/adapter.d.ts.map +0 -1
- package/lib/adapter.js +0 -61
- package/lib/adapter.js.map +0 -1
- package/lib/bot.d.ts +0 -122
- package/lib/bot.d.ts.map +0 -1
- package/lib/bot.js +0 -608
- package/lib/bot.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types.d.ts +0 -32
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -8
- package/lib/types.js.map +0 -1
- package/plugin.yml +0 -3
- package/skills/kook/SKILL.md +0 -80
- package/src/adapter.ts +0 -71
- package/src/bot.ts +0 -693
- package/src/types.ts +0 -36
package/src/types.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* KOOK 适配器类型与配置
|
|
3
|
-
*/
|
|
4
|
-
import type { PrivateMessageEvent, ChannelMessageEvent } from "kook-client";
|
|
5
|
-
import type { LogLevel } from "kook-client";
|
|
6
|
-
|
|
7
|
-
export type { LogLevel };
|
|
8
|
-
|
|
9
|
-
export enum KookPermission {
|
|
10
|
-
Normal = 1,
|
|
11
|
-
Admin = 2,
|
|
12
|
-
Owner = 4,
|
|
13
|
-
ChannelAdmin = 5,
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface KookSenderInfo {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
permission?: KookPermission;
|
|
20
|
-
roles?: number[];
|
|
21
|
-
isGuildOwner?: boolean;
|
|
22
|
-
isAdmin?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface KookBotConfig {
|
|
26
|
-
context: "kook";
|
|
27
|
-
name: string;
|
|
28
|
-
token: string;
|
|
29
|
-
data_dir?: string;
|
|
30
|
-
timeout?: number;
|
|
31
|
-
max_retry?: number;
|
|
32
|
-
ignore?: "bot" | "self";
|
|
33
|
-
logLevel?: LogLevel;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export type KookRawMessage = PrivateMessageEvent | ChannelMessageEvent;
|