@johnny-joster/n9e-plugin 1.0.3 → 1.0.4

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.
@@ -1,38 +1,3 @@
1
1
  {
2
- "id": "n9e-plugin",
3
- "configSchema": {
4
- "type": "object",
5
- "properties": {
6
- "apiBaseUrl": {
7
- "type": "string",
8
- "description": "夜莺API基础地址"
9
- },
10
- "apiKey": {
11
- "type": "string",
12
- "description": "API访问密钥"
13
- },
14
- "timeout": {
15
- "type": "integer",
16
- "minimum": 1000,
17
- "maximum": 120000,
18
- "default": 30000,
19
- "description": "请求超时时间(毫秒)"
20
- }
21
- }
22
- },
23
- "uiHints": {
24
- "apiBaseUrl": {
25
- "label": "API基础地址",
26
- "placeholder": "https://n9e-dev.inner.youdao.com/api/n9e"
27
- },
28
- "apiKey": {
29
- "label": "API密钥",
30
- "sensitive": true,
31
- "placeholder": "输入您的API密钥"
32
- },
33
- "timeout": {
34
- "label": "超时时间(毫秒)",
35
- "placeholder": "30000"
36
- }
37
- }
2
+ "id": "n9e-plugin"
38
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnny-joster/n9e-plugin",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Nightingale alert platform query plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -14,9 +14,6 @@
14
14
  "keywords": ["openclaw", "plugin", "nightingale", "n9e", "alerts"],
15
15
  "author": "Youdao",
16
16
  "license": "MIT",
17
- "dependencies": {
18
- "zod": "^3.23.0"
19
- },
20
17
  "devDependencies": {
21
18
  "@types/node": "^20.11.0",
22
19
  "typescript": "^5.3.3"
@@ -0,0 +1,47 @@
1
+ // Type declarations for openclaw/plugin-sdk
2
+ declare module "openclaw/plugin-sdk" {
3
+ export interface ToolHandler {
4
+ (input: any, context: ToolContext): Promise<ToolResult>;
5
+ }
6
+
7
+ export interface ToolContext {
8
+ config: {
9
+ plugins?: {
10
+ entries?: {
11
+ [key: string]: {
12
+ config?: any;
13
+ };
14
+ };
15
+ };
16
+ };
17
+ logger: {
18
+ info: (...args: any[]) => void;
19
+ error: (...args: any[]) => void;
20
+ warn: (...args: any[]) => void;
21
+ debug: (...args: any[]) => void;
22
+ };
23
+ }
24
+
25
+ export interface ToolResult {
26
+ content: Array<{
27
+ type: string;
28
+ text: string;
29
+ }>;
30
+ isError?: boolean;
31
+ }
32
+
33
+ export interface OpenClawPluginApi {
34
+ registerTool: (tool: {
35
+ name: string;
36
+ description: string;
37
+ inputSchema: any;
38
+ handler: ToolHandler;
39
+ }) => void;
40
+ logger: {
41
+ info: (...args: any[]) => void;
42
+ error: (...args: any[]) => void;
43
+ warn: (...args: any[]) => void;
44
+ debug: (...args: any[]) => void;
45
+ };
46
+ }
47
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes