plugin-undesirables 1.0.5 → 2.0.1
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/LICENSE +21 -0
- package/README.md +7 -3
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +183 -197
- package/dist/index.js.map +1 -1
- package/package.json +20 -8
- package/plugin.json +28 -0
- package/src/index.ts +227 -170
- package/tsconfig.json +2 -2
- package/src/elizaos-core.d.ts +0 -70
package/src/elizaos-core.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Local type declarations for @elizaos/core
|
|
3
|
-
* These are the minimal types needed for the plugin to compile.
|
|
4
|
-
* At runtime, the actual ElizaOS core provides the real implementations.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
declare module "@elizaos/core" {
|
|
8
|
-
export interface Plugin {
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
actions: Action[];
|
|
12
|
-
providers: Provider[];
|
|
13
|
-
evaluators: Evaluator[];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface Action {
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
similes: string[];
|
|
20
|
-
examples: ActionExample[][];
|
|
21
|
-
validate: (runtime: IAgentRuntime, message: Memory) => Promise<boolean>;
|
|
22
|
-
handler: (
|
|
23
|
-
runtime: IAgentRuntime,
|
|
24
|
-
message: Memory,
|
|
25
|
-
state?: State,
|
|
26
|
-
options?: Record<string, unknown>,
|
|
27
|
-
callback?: HandlerCallback
|
|
28
|
-
) => Promise<boolean>;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface ActionExample {
|
|
32
|
-
user: string;
|
|
33
|
-
content: {
|
|
34
|
-
text: string;
|
|
35
|
-
action?: string;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface Provider {
|
|
40
|
-
get: (runtime: IAgentRuntime, message: Memory, state?: State) => Promise<string>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface Evaluator {
|
|
44
|
-
name: string;
|
|
45
|
-
description: string;
|
|
46
|
-
similes: string[];
|
|
47
|
-
examples: ActionExample[][];
|
|
48
|
-
validate: (runtime: IAgentRuntime, message: Memory) => Promise<boolean>;
|
|
49
|
-
handler: (runtime: IAgentRuntime, message: Memory) => Promise<any>;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface IAgentRuntime {
|
|
53
|
-
getSetting?: (key: string) => string | undefined;
|
|
54
|
-
[key: string]: any;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface Memory {
|
|
58
|
-
content: {
|
|
59
|
-
text?: string;
|
|
60
|
-
[key: string]: any;
|
|
61
|
-
};
|
|
62
|
-
[key: string]: any;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface State {
|
|
66
|
-
[key: string]: any;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type HandlerCallback = (response: { text: string; [key: string]: any }) => void;
|
|
70
|
-
}
|