@elvatis_com/openclaw-ispconfig 0.1.3 β 0.3.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/README.md +153 -38
- package/dist/index.d.ts +54 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +90 -1
- package/dist/index.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +437 -13
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +49 -0
- package/dist/validate.js.map +1 -1
- package/openclaw.plugin.json +76 -49
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# @elvatis_com/openclaw-ispconfig
|
|
2
2
|
|
|
3
|
+
**Current version:** 0.3.0
|
|
4
|
+
|
|
3
5
|
OpenClaw plugin to manage ISPConfig via the Remote JSON API.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
9
|
- Session-based API client with auto-reconnect
|
|
8
|
-
-
|
|
10
|
+
- 51 tools for read, write, update, delete, and one-command provisioning
|
|
11
|
+
- `/ispconfig` chat command for quick help and tool reference
|
|
9
12
|
- Safety guards via `readOnly` and `allowedOperations`
|
|
10
13
|
- Live integration tests against a real ISPConfig host (read-only)
|
|
11
14
|
|
|
@@ -54,45 +57,115 @@ npm install @elvatis_com/openclaw-ispconfig
|
|
|
54
57
|
- `allowedOperations` (default `[]`): whitelist of tool names
|
|
55
58
|
- `verifySsl` (default `true`): TLS certificate verification
|
|
56
59
|
|
|
60
|
+
## Chat Command
|
|
61
|
+
|
|
62
|
+
### `/ispconfig`
|
|
63
|
+
|
|
64
|
+
Type `/ispconfig` in any connected chat to display the full list of available tools, the plugin version, and the connected ISPConfig hostname (credentials are never shown).
|
|
65
|
+
|
|
66
|
+
Example output:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
π₯οΈ ISPConfig Plugin
|
|
70
|
+
Version 0.3.0 | Connected to isp.elvatis.com
|
|
71
|
+
|
|
72
|
+
π Read (17)
|
|
73
|
+
β’ isp_system_info - Server-Info
|
|
74
|
+
β’ isp_client_list - Alle Clients
|
|
75
|
+
...
|
|
76
|
+
|
|
77
|
+
βοΈ Write (20+)
|
|
78
|
+
β’ isp_client_add / _update / _delete - Clients
|
|
79
|
+
...
|
|
80
|
+
|
|
81
|
+
π Provisioning
|
|
82
|
+
β’ isp_provision_site - Domain + DNS + Mail + DB in einem Schritt
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## OpenClaw Plugin API
|
|
86
|
+
|
|
87
|
+
This plugin uses the modern OpenClaw Plugin API (`api.*`) instead of the legacy `(runtime, config)` registration pattern.
|
|
88
|
+
|
|
89
|
+
The entry point exports a default plugin object with a `register(api)` function:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
export default {
|
|
93
|
+
manifest: pluginManifest,
|
|
94
|
+
register(api: PluginApi): void {
|
|
95
|
+
// Register tools
|
|
96
|
+
api.registerTool({ name, description, parameters, execute });
|
|
97
|
+
|
|
98
|
+
// Register chat commands
|
|
99
|
+
api.registerCommand({ name, description, usage, handler });
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Key API methods used:
|
|
105
|
+
|
|
106
|
+
- `api.registerTool({ name, description, parameters, execute })` - exposes an AI-callable tool with JSON Schema parameters
|
|
107
|
+
- `api.registerCommand({ name, description, usage, handler })` - registers a `/command` for chat
|
|
108
|
+
- `api.pluginConfig` - typed plugin configuration from `openclaw.json`
|
|
109
|
+
- `api.logger` - structured logger (info, warn, error)
|
|
110
|
+
|
|
57
111
|
## Tools
|
|
58
112
|
|
|
59
|
-
### Read tools
|
|
60
|
-
|
|
61
|
-
- `
|
|
62
|
-
- `
|
|
63
|
-
- `isp_client_list` params: optional filter fields
|
|
64
|
-
- `isp_client_get` params: `client_id`
|
|
65
|
-
- `isp_sites_list` params: optional filters accepted by `sites_web_domain_get`
|
|
66
|
-
- `isp_site_get` params: `primary_id` (or `site_id`, `domain_id`)
|
|
67
|
-
- `isp_domains_list` params: none
|
|
68
|
-
- `isp_dns_zone_list` params: user-related filter params
|
|
69
|
-
- `isp_dns_record_list` params: `zone_id`
|
|
70
|
-
- `isp_mail_domain_list` params: optional filters
|
|
71
|
-
- `isp_mail_user_list` params: optional filters
|
|
72
|
-
- `
|
|
73
|
-
- `
|
|
74
|
-
- `
|
|
75
|
-
- `
|
|
76
|
-
- `
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- `
|
|
82
|
-
- `
|
|
83
|
-
- `
|
|
84
|
-
- `
|
|
85
|
-
- `
|
|
86
|
-
- `
|
|
87
|
-
- `
|
|
88
|
-
- `
|
|
89
|
-
- `
|
|
90
|
-
- `
|
|
91
|
-
- `
|
|
92
|
-
- `
|
|
93
|
-
- `
|
|
94
|
-
|
|
95
|
-
|
|
113
|
+
### Read tools (17)
|
|
114
|
+
|
|
115
|
+
- `isp_system_info` - params: none
|
|
116
|
+
- `isp_methods_list` - params: none
|
|
117
|
+
- `isp_client_list` - params: optional filter fields
|
|
118
|
+
- `isp_client_get` - params: `client_id`
|
|
119
|
+
- `isp_sites_list` - params: optional filters accepted by `sites_web_domain_get`
|
|
120
|
+
- `isp_site_get` - params: `primary_id` (or `site_id`, `domain_id`)
|
|
121
|
+
- `isp_domains_list` - params: none
|
|
122
|
+
- `isp_dns_zone_list` - params: user-related filter params
|
|
123
|
+
- `isp_dns_record_list` - params: `zone_id`
|
|
124
|
+
- `isp_mail_domain_list` - params: optional filters
|
|
125
|
+
- `isp_mail_user_list` - params: optional filters
|
|
126
|
+
- `isp_mail_alias_list` - params: optional filters
|
|
127
|
+
- `isp_mail_forward_list` - params: optional filters
|
|
128
|
+
- `isp_db_list` - params: user-related filters
|
|
129
|
+
- `isp_ssl_status` - params: none
|
|
130
|
+
- `isp_quota_check` - params: `client_id`
|
|
131
|
+
- `isp_cron_list` - params: optional filters
|
|
132
|
+
|
|
133
|
+
### Write tools (33)
|
|
134
|
+
|
|
135
|
+
- `isp_client_add` - params: ISPConfig `client_add` payload
|
|
136
|
+
- `isp_client_update` - params: `client_id`, `params` object with fields to update
|
|
137
|
+
- `isp_client_delete` - params: `client_id`
|
|
138
|
+
- `isp_site_add` - params: ISPConfig `sites_web_domain_add` payload
|
|
139
|
+
- `isp_site_update` - params: `client_id`, `primary_id`, `params` object with fields to update
|
|
140
|
+
- `isp_site_delete` - params: `primary_id`
|
|
141
|
+
- `isp_domain_add` - alias for `isp_site_add`
|
|
142
|
+
- `isp_dns_zone_add` - params: ISPConfig `dns_zone_add` payload
|
|
143
|
+
- `isp_dns_zone_delete` - params: `primary_id`
|
|
144
|
+
- `isp_dns_record_add` - params: include `type` (`A`, `AAAA`, `MX`, `TXT`, `CNAME`) and matching payload
|
|
145
|
+
- `isp_dns_record_update` - params: `type`, `primary_id`, `params` object with fields to update
|
|
146
|
+
- `isp_dns_record_delete` - params: include `type` and matching delete payload
|
|
147
|
+
- `isp_mail_domain_add` - params: ISPConfig `mail_domain_add` payload
|
|
148
|
+
- `isp_mail_domain_delete` - params: `primary_id`
|
|
149
|
+
- `isp_mail_user_add` - params: ISPConfig `mail_user_add` payload
|
|
150
|
+
- `isp_mail_user_delete` - params: `primary_id`
|
|
151
|
+
- `isp_mail_alias_add` - params: ISPConfig `mail_alias_add` payload
|
|
152
|
+
- `isp_mail_alias_delete` - params: `primary_id`
|
|
153
|
+
- `isp_mail_forward_add` - params: ISPConfig `mail_forward_add` payload
|
|
154
|
+
- `isp_mail_forward_delete` - params: `primary_id`
|
|
155
|
+
- `isp_db_add` - params: ISPConfig `sites_database_add` payload
|
|
156
|
+
- `isp_db_delete` - params: `primary_id`
|
|
157
|
+
- `isp_db_user_add` - params: ISPConfig `sites_database_user_add` payload
|
|
158
|
+
- `isp_db_user_delete` - params: `primary_id`
|
|
159
|
+
- `isp_shell_user_add` - params: ISPConfig `sites_shell_user_add` payload
|
|
160
|
+
- `isp_shell_user_delete` - params: `primary_id`
|
|
161
|
+
- `isp_ftp_user_add` - params: ISPConfig `sites_ftp_user_add` payload
|
|
162
|
+
- `isp_ftp_user_delete` - params: `primary_id`
|
|
163
|
+
- `isp_cron_add` - params: ISPConfig `sites_cron_add` payload
|
|
164
|
+
- `isp_cron_update` - params: `client_id`, `primary_id`, `params` object with fields to update
|
|
165
|
+
- `isp_cron_delete` - params: `primary_id`
|
|
166
|
+
- `isp_backup_list` - params: none (returns skipped if API method unavailable)
|
|
167
|
+
|
|
168
|
+
### Provisioning tool (1)
|
|
96
169
|
|
|
97
170
|
- `isp_provision_site`
|
|
98
171
|
- Required params:
|
|
@@ -115,6 +188,8 @@ Workflow:
|
|
|
115
188
|
6. Optionally create DB user and database
|
|
116
189
|
7. Ensure SSL flags are enabled on the site
|
|
117
190
|
|
|
191
|
+
**Total: 51 tools** (17 read + 32 write + 1 alias + 1 provisioning)
|
|
192
|
+
|
|
118
193
|
## Safety
|
|
119
194
|
|
|
120
195
|
- `readOnly=true` blocks all write and provisioning tools
|
|
@@ -138,6 +213,46 @@ For live tests, provide environment variables:
|
|
|
138
213
|
For automation that creates GitHub issues, use `src/templates/github-issue-helper.ts`.
|
|
139
214
|
It provides `isValidIssueRepoSlug()`, `resolveIssueRepo()`, and `buildGhIssueCreateCommand()`.
|
|
140
215
|
|
|
216
|
+
## Changelog
|
|
217
|
+
|
|
218
|
+
### 0.3.0 (2026-03-15)
|
|
219
|
+
|
|
220
|
+
**20 new tools** - update, delete, aliases, forwards.
|
|
221
|
+
|
|
222
|
+
New tools added:
|
|
223
|
+
|
|
224
|
+
- **Client:** `isp_client_update`, `isp_client_delete`
|
|
225
|
+
- **Sites:** `isp_site_update`, `isp_site_delete`
|
|
226
|
+
- **Mail:** `isp_mail_domain_delete`, `isp_mail_alias_list`, `isp_mail_alias_add`, `isp_mail_alias_delete`, `isp_mail_forward_list`, `isp_mail_forward_add`, `isp_mail_forward_delete`
|
|
227
|
+
- **DNS:** `isp_dns_zone_delete`, `isp_dns_record_update`
|
|
228
|
+
- **Database:** `isp_db_delete`, `isp_db_user_delete`
|
|
229
|
+
- **FTP/Shell:** `isp_ftp_user_delete`, `isp_shell_user_delete`
|
|
230
|
+
- **Cron:** `isp_cron_delete`, `isp_cron_update`
|
|
231
|
+
|
|
232
|
+
Other changes:
|
|
233
|
+
|
|
234
|
+
- Extended `dnsMethodForType()` to support `update` action
|
|
235
|
+
- Added validation schemas for all new delete/update tools
|
|
236
|
+
- Updated KNOWN_METHODS list to include all new API methods
|
|
237
|
+
- Updated `/ispconfig` command with full tool list and usage examples
|
|
238
|
+
- Removed em dashes from all output strings and comments
|
|
239
|
+
|
|
240
|
+
**Total: 51 tools** (was 31)
|
|
241
|
+
|
|
242
|
+
### 0.2.1 (2026-03-15)
|
|
243
|
+
|
|
244
|
+
**Bug fix:** Resolve `"Cannot read properties of undefined (reading 'properties')"` crash in OpenClaw UI.
|
|
245
|
+
|
|
246
|
+
- **Added JSON Schema `parameters` to all 31 tool definitions** - previously tools only had `name`, `description`, and `run`, causing the UI to crash when accessing `tool.parameters.properties`
|
|
247
|
+
- **Fixed `registerViaApi()` to pass `parameters` through** to `api.registerTool()` - schemas were defined but never forwarded to OpenClaw
|
|
248
|
+
- **Changed tool registration from `run` to `execute`** - OpenClaw's plugin API expects `execute(params)`, not `run(params)`
|
|
249
|
+
- **Updated `BoundTool` interface** to include optional `parameters` field
|
|
250
|
+
- **Updated `ToolDefinition` interface** to include optional `parameters` field
|
|
251
|
+
|
|
252
|
+
### 0.2.0 (2026-03-07)
|
|
253
|
+
|
|
254
|
+
- Initial release with 31 tools, `/ispconfig` command, safety guards
|
|
255
|
+
|
|
141
256
|
## License
|
|
142
257
|
|
|
143
258
|
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -3,69 +3,80 @@ import { ISPConfigPluginConfig, JsonMap } from "./types";
|
|
|
3
3
|
export interface OpenClawRuntimeLike {
|
|
4
4
|
registerTool: (name: string, definition: {
|
|
5
5
|
description: string;
|
|
6
|
+
parameters?: Record<string, unknown>;
|
|
6
7
|
run: (params: JsonMap) => Promise<unknown>;
|
|
7
8
|
}) => void;
|
|
8
9
|
}
|
|
9
10
|
export interface BoundTool {
|
|
10
11
|
name: string;
|
|
11
12
|
description: string;
|
|
13
|
+
parameters?: {
|
|
14
|
+
type: "object";
|
|
15
|
+
properties: Record<string, unknown>;
|
|
16
|
+
required?: string[];
|
|
17
|
+
};
|
|
12
18
|
run: (params: JsonMap) => Promise<unknown>;
|
|
13
19
|
}
|
|
14
20
|
export declare function buildToolset(config: Partial<ISPConfigPluginConfig>): BoundTool[];
|
|
15
21
|
export declare function registerAllTools(runtime: OpenClawRuntimeLike, config: Partial<ISPConfigPluginConfig>): void;
|
|
22
|
+
declare function registerViaApi(api: any): void;
|
|
16
23
|
declare const plugin: {
|
|
17
24
|
manifest: {
|
|
18
25
|
name: string;
|
|
26
|
+
id: string;
|
|
19
27
|
version: string;
|
|
20
28
|
description: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
description: string;
|
|
30
|
-
required: boolean;
|
|
31
|
-
};
|
|
32
|
-
password: {
|
|
33
|
-
type: string;
|
|
34
|
-
description: string;
|
|
35
|
-
required: boolean;
|
|
36
|
-
secret: boolean;
|
|
37
|
-
};
|
|
38
|
-
serverId: {
|
|
39
|
-
type: string;
|
|
40
|
-
description: string;
|
|
41
|
-
default: number;
|
|
42
|
-
};
|
|
43
|
-
defaultServerIp: {
|
|
44
|
-
type: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
readOnly: {
|
|
48
|
-
type: string;
|
|
49
|
-
description: string;
|
|
50
|
-
default: boolean;
|
|
51
|
-
};
|
|
52
|
-
allowedOperations: {
|
|
53
|
-
type: string;
|
|
54
|
-
description: string;
|
|
55
|
-
items: {
|
|
29
|
+
tools: string[];
|
|
30
|
+
configSchema: {
|
|
31
|
+
$schema: string;
|
|
32
|
+
type: string;
|
|
33
|
+
additionalProperties: boolean;
|
|
34
|
+
required: string[];
|
|
35
|
+
properties: {
|
|
36
|
+
apiUrl: {
|
|
56
37
|
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
username: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
password: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
secret: boolean;
|
|
48
|
+
};
|
|
49
|
+
serverId: {
|
|
50
|
+
type: string;
|
|
51
|
+
description: string;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
defaultServerIp: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
readOnly: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
allowedOperations: {
|
|
64
|
+
type: string;
|
|
65
|
+
description: string;
|
|
66
|
+
default: never[];
|
|
67
|
+
items: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
verifySsl: {
|
|
72
|
+
type: string;
|
|
73
|
+
description: string;
|
|
74
|
+
default: boolean;
|
|
57
75
|
};
|
|
58
|
-
default: never[];
|
|
59
|
-
};
|
|
60
|
-
verifySsl: {
|
|
61
|
-
type: string;
|
|
62
|
-
description: string;
|
|
63
|
-
default: boolean;
|
|
64
76
|
};
|
|
65
77
|
};
|
|
66
|
-
tools: string[];
|
|
67
78
|
};
|
|
68
|
-
register: typeof
|
|
79
|
+
register: typeof registerViaApi;
|
|
69
80
|
};
|
|
70
81
|
export default plugin;
|
|
71
82
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE9E,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE9E,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CAC7J;AAoBD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,SAAS,EAAE,CAShF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAS3G;AAGD,iBAAS,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAwFtC;AAED,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ function buildToolset(config) {
|
|
|
33
33
|
return (0, tools_1.createTools)().map((tool) => ({
|
|
34
34
|
name: tool.name,
|
|
35
35
|
description: tool.description,
|
|
36
|
+
parameters: tool.parameters ?? { type: "object", properties: {} },
|
|
36
37
|
run: (params) => tool.run(params, context),
|
|
37
38
|
}));
|
|
38
39
|
}
|
|
@@ -41,13 +42,101 @@ function registerAllTools(runtime, config) {
|
|
|
41
42
|
for (const tool of tools) {
|
|
42
43
|
runtime.registerTool(tool.name, {
|
|
43
44
|
description: tool.description,
|
|
45
|
+
parameters: tool.parameters,
|
|
44
46
|
run: (params) => tool.run(params),
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
}
|
|
50
|
+
// OpenClaw PluginApi adapter
|
|
51
|
+
function registerViaApi(api) {
|
|
52
|
+
const config = (api.pluginConfig ?? {});
|
|
53
|
+
const tools = buildToolset(config);
|
|
54
|
+
for (const tool of tools) {
|
|
55
|
+
api.registerTool({
|
|
56
|
+
name: tool.name,
|
|
57
|
+
description: tool.description,
|
|
58
|
+
parameters: tool.parameters,
|
|
59
|
+
execute: (...args) => {
|
|
60
|
+
// OpenClaw may pass (toolCallId, params) or just (params)
|
|
61
|
+
const params = (typeof args[0] === "string" && args.length > 1 ? args[1] : args[0]) ?? {};
|
|
62
|
+
return tool.run(params);
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Command: /ispconfig - show plugin help
|
|
67
|
+
api.registerCommand({
|
|
68
|
+
name: "ispconfig",
|
|
69
|
+
description: "Show ISPConfig plugin help and list of available tools.",
|
|
70
|
+
usage: "/ispconfig",
|
|
71
|
+
requireAuth: false,
|
|
72
|
+
acceptsArgs: false,
|
|
73
|
+
handler: async () => {
|
|
74
|
+
const rawUrl = (config.apiUrl ?? "").trim();
|
|
75
|
+
// Extract hostname only - never expose credentials
|
|
76
|
+
let displayHost = "(not configured)";
|
|
77
|
+
try {
|
|
78
|
+
if (rawUrl) {
|
|
79
|
+
displayHost = new URL(rawUrl).hostname;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
displayHost = rawUrl.replace(/^https?:\/\//, "").split("/")[0] ?? rawUrl;
|
|
84
|
+
}
|
|
85
|
+
const version = openclaw_plugin_json_1.default.version ?? "0.3.0";
|
|
86
|
+
const text = [
|
|
87
|
+
`π₯οΈ *ISPConfig Plugin*`,
|
|
88
|
+
`Version ${version} | Connected to ${displayHost}`,
|
|
89
|
+
``,
|
|
90
|
+
`π *Read (17)*`,
|
|
91
|
+
`β’ isp_system_info - Server-Info`,
|
|
92
|
+
`β’ isp_client_list - Alle Clients`,
|
|
93
|
+
`β’ isp_client_get - Client Details (client_id)`,
|
|
94
|
+
`β’ isp_sites_list - Alle Websites`,
|
|
95
|
+
`β’ isp_site_get - Site Details (site_id)`,
|
|
96
|
+
`β’ isp_domains_list - Alle Domains`,
|
|
97
|
+
`β’ isp_dns_zone_list - DNS Zonen`,
|
|
98
|
+
`β’ isp_dns_record_list - DNS Records (zone_id)`,
|
|
99
|
+
`β’ isp_mail_domain_list - Mail-Domains`,
|
|
100
|
+
`β’ isp_mail_user_list - Mail-User`,
|
|
101
|
+
`β’ isp_mail_alias_list - Mail-Aliase`,
|
|
102
|
+
`β’ isp_mail_forward_list - Mail-Forwards`,
|
|
103
|
+
`β’ isp_db_list - Datenbanken`,
|
|
104
|
+
`β’ isp_cron_list - Cron Jobs`,
|
|
105
|
+
`β’ isp_ssl_status - SSL/LE Status`,
|
|
106
|
+
`β’ isp_quota_check - Quota (client_id)`,
|
|
107
|
+
`β’ isp_methods_list - API-Methoden`,
|
|
108
|
+
``,
|
|
109
|
+
`βοΈ *Write (20+)*`,
|
|
110
|
+
`β’ isp_client_add / _update / _delete - Clients`,
|
|
111
|
+
`β’ isp_site_add / _update / _delete - Websites`,
|
|
112
|
+
`β’ isp_dns_zone_add / _delete - DNS Zonen`,
|
|
113
|
+
`β’ isp_dns_record_add / _update / _delete - DNS Records`,
|
|
114
|
+
`β’ isp_mail_domain_add / _delete - Mail-Domains`,
|
|
115
|
+
`β’ isp_mail_user_add / _delete - Mail-User`,
|
|
116
|
+
`β’ isp_mail_alias_add / _delete - Mail-Aliase`,
|
|
117
|
+
`β’ isp_mail_forward_add / _delete - Mail-Forwards`,
|
|
118
|
+
`β’ isp_db_add / _delete - Datenbanken`,
|
|
119
|
+
`β’ isp_db_user_add / _delete - DB User`,
|
|
120
|
+
`β’ isp_ftp_user_add / _delete - FTP User`,
|
|
121
|
+
`β’ isp_shell_user_add / _delete - Shell User`,
|
|
122
|
+
`β’ isp_cron_add / _update / _delete - Cron Jobs`,
|
|
123
|
+
``,
|
|
124
|
+
`π *Provisioning*`,
|
|
125
|
+
`β’ isp_provision_site - Domain + DNS + Mail + DB in einem Schritt`,
|
|
126
|
+
``,
|
|
127
|
+
`π *Beispiele*`,
|
|
128
|
+
`"Zeig mir alle Websites" -> isp_sites_list`,
|
|
129
|
+
`"DNS Records fΓΌr Zone 1" -> isp_dns_record_list zone_id=1`,
|
|
130
|
+
`"Neue Domain anlegen" -> isp_provision_site domain=example.com clientName=Test clientEmail=test@example.com`,
|
|
131
|
+
`"Security Headers updaten" -> isp_site_update client_id=1 primary_id=3 params={apache_directives: "..."}`,
|
|
132
|
+
].join("\n");
|
|
133
|
+
return { text };
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
48
137
|
const plugin = {
|
|
49
138
|
manifest: openclaw_plugin_json_1.default,
|
|
50
|
-
register:
|
|
139
|
+
register: registerViaApi,
|
|
51
140
|
};
|
|
52
141
|
exports.default = plugin;
|
|
53
142
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAsCA,oCASC;AAED,4CASC;AA1DD,mFAAqD;AACrD,mCAA8E;AAArE,wGAAA,cAAc,OAAA;AAAsB,wGAAA,cAAc,OAAA;AAC3D,mCAAsC;AAOtC,SAAS,YAAY,CAAC,MAAsC;IAC1D,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC;QAC9B,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,KAAK;QAClC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,IAAI,EAAE;QACjD,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI;QACnC,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAC;AACJ,CAAC;AAaD,SAAgB,YAAY,CAAC,MAAsC;IACjE,M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B,iCAAiC;gBACjC,kCAAkC;gBAClC,+CAA+C;gBAC/C,kCAAkC;gBAClC,yCAAyC;gBACzC,mCAAmC;gBACnC,iCAAiC;gBACjC,+CAA+C;gBAC/C,uCAAuC;gBACvC,kCAAkC;gBAClC,qCAAqC;gBACrC,yCAAyC;gBACzC,6BAA6B;gBAC7B,6BAA6B;gBAC7B,kCAAkC;gBAClC,uCAAuC;gBACvC,mCAAmC;gBACnC,EAAE;gBACF,kBAAkB;gBAClB,gDAAgD;gBAChD,+CAA+C;gBAC/C,0CAA0C;gBAC1C,wDAAwD;gBACxD,gDAAgD;gBAChD,2CAA2C;gBAC3C,8CAA8C;gBAC9C,kDAAkD;gBAClD,sCAAsC;gBACtC,uCAAuC;gBACvC,yCAAyC;gBACzC,6CAA6C;gBAC7C,gDAAgD;gBAChD,EAAE;gBACF,mBAAmB;gBACnB,kEAAkE;gBAClE,EAAE;gBACF,gBAAgB;gBAChB,4CAA4C;gBAC5C,2DAA2D;gBAC3D,6GAA6G;gBAC7G,0GAA0G;aAC3G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAEb,OAAO,EAAE,IAAI,EAAE,CAAC;QAClB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,MAAM,GAAG;IACb,QAAQ,EAAE,8BAAc;IACxB,QAAQ,EAAE,cAAc;CACzB,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,cAAc,EAAE,MAAM,SAAS,CAAC;AAyE/D,wBAAgB,WAAW,IAAI,cAAc,EAAE,CAyxB9C"}
|