xserver-mcp 1.0.2 → 1.2.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 +1 -0
- package/dist/index.js +931 -77
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112,6 +112,81 @@ var ApiClient = class {
|
|
|
112
112
|
return this.delete(`${this.serverPath()}/mail-filter/${enc(filterId)}`);
|
|
113
113
|
}
|
|
114
114
|
// ================================================================
|
|
115
|
+
// 迷惑メールフィルタ設定
|
|
116
|
+
// ================================================================
|
|
117
|
+
async listSpamFilter(params) {
|
|
118
|
+
return this.get(`${this.serverPath()}/spam-filter`, params);
|
|
119
|
+
}
|
|
120
|
+
async updateSpamFilter(domain, data) {
|
|
121
|
+
return this.put(`${this.serverPath()}/spam-filter/${enc(domain)}`, data);
|
|
122
|
+
}
|
|
123
|
+
async updateSpamFilterDmarcReceiver(domain, data) {
|
|
124
|
+
return this.put(`${this.serverPath()}/spam-filter/${enc(domain)}/dmarc-receiver`, data);
|
|
125
|
+
}
|
|
126
|
+
// ================================================================
|
|
127
|
+
// 自動応答設定
|
|
128
|
+
// ================================================================
|
|
129
|
+
async listAutoReply(params) {
|
|
130
|
+
return this.get(`${this.serverPath()}/auto-reply`, params);
|
|
131
|
+
}
|
|
132
|
+
async getAutoReply(mailAddress) {
|
|
133
|
+
return this.get(`${this.serverPath()}/auto-reply/${enc(mailAddress)}`);
|
|
134
|
+
}
|
|
135
|
+
async addAutoReply(data) {
|
|
136
|
+
return this.post(`${this.serverPath()}/auto-reply`, data);
|
|
137
|
+
}
|
|
138
|
+
async updateAutoReply(mailAddress, data) {
|
|
139
|
+
return this.put(`${this.serverPath()}/auto-reply/${enc(mailAddress)}`, data);
|
|
140
|
+
}
|
|
141
|
+
async deleteAutoReply(mailAddress) {
|
|
142
|
+
return this.delete(`${this.serverPath()}/auto-reply/${enc(mailAddress)}`);
|
|
143
|
+
}
|
|
144
|
+
// ================================================================
|
|
145
|
+
// SMTP認証国外アクセス制限
|
|
146
|
+
// ================================================================
|
|
147
|
+
async listSmtpAbroadRestriction(params) {
|
|
148
|
+
return this.get(`${this.serverPath()}/smtp-abroad-restriction`, params);
|
|
149
|
+
}
|
|
150
|
+
async updateSmtpAbroadRestriction(domain, data) {
|
|
151
|
+
return this.put(`${this.serverPath()}/smtp-abroad-restriction/${enc(domain)}`, data);
|
|
152
|
+
}
|
|
153
|
+
// ================================================================
|
|
154
|
+
// DKIM設定
|
|
155
|
+
// ================================================================
|
|
156
|
+
async listDkim(params) {
|
|
157
|
+
return this.get(`${this.serverPath()}/dkim`, params);
|
|
158
|
+
}
|
|
159
|
+
async getDkim(fqdn) {
|
|
160
|
+
return this.get(`${this.serverPath()}/dkim/${enc(fqdn)}`);
|
|
161
|
+
}
|
|
162
|
+
async updateDkim(fqdn, data) {
|
|
163
|
+
return this.put(`${this.serverPath()}/dkim/${enc(fqdn)}`, data);
|
|
164
|
+
}
|
|
165
|
+
// ================================================================
|
|
166
|
+
// SPF設定
|
|
167
|
+
// ================================================================
|
|
168
|
+
async listSpf(params) {
|
|
169
|
+
return this.get(`${this.serverPath()}/spf`, params);
|
|
170
|
+
}
|
|
171
|
+
async addSpf(data) {
|
|
172
|
+
return this.post(`${this.serverPath()}/spf`, data);
|
|
173
|
+
}
|
|
174
|
+
async updateSpf(fqdn, data) {
|
|
175
|
+
return this.put(`${this.serverPath()}/spf/${enc(fqdn)}`, data);
|
|
176
|
+
}
|
|
177
|
+
async deleteSpf(fqdn) {
|
|
178
|
+
return this.delete(`${this.serverPath()}/spf/${enc(fqdn)}`);
|
|
179
|
+
}
|
|
180
|
+
// ================================================================
|
|
181
|
+
// DMARC設定(送信側)
|
|
182
|
+
// ================================================================
|
|
183
|
+
async listDmarc(params) {
|
|
184
|
+
return this.get(`${this.serverPath()}/dmarc`, params);
|
|
185
|
+
}
|
|
186
|
+
async updateDmarc(domain, data) {
|
|
187
|
+
return this.put(`${this.serverPath()}/dmarc/${enc(domain)}`, data);
|
|
188
|
+
}
|
|
189
|
+
// ================================================================
|
|
115
190
|
// FTP
|
|
116
191
|
// ================================================================
|
|
117
192
|
async listFtp(params) {
|
|
@@ -256,6 +331,138 @@ var ApiClient = class {
|
|
|
256
331
|
return this.delete(`${this.serverPath()}/ssh/key/${enc(keyId)}`);
|
|
257
332
|
}
|
|
258
333
|
// ================================================================
|
|
334
|
+
// リソースモニター
|
|
335
|
+
// ================================================================
|
|
336
|
+
async getResourceMonitor(date) {
|
|
337
|
+
return this.get(`${this.serverPath()}/resource-monitor`, { date });
|
|
338
|
+
}
|
|
339
|
+
// ================================================================
|
|
340
|
+
// WAF設定
|
|
341
|
+
// ================================================================
|
|
342
|
+
async listWaf(params) {
|
|
343
|
+
return this.get(`${this.serverPath()}/waf`, params);
|
|
344
|
+
}
|
|
345
|
+
async updateWaf(domain, data) {
|
|
346
|
+
return this.put(`${this.serverPath()}/waf/${enc(domain)}`, data);
|
|
347
|
+
}
|
|
348
|
+
// ================================================================
|
|
349
|
+
// php.ini設定
|
|
350
|
+
// ================================================================
|
|
351
|
+
async listPhpIni(params) {
|
|
352
|
+
return this.get(`${this.serverPath()}/php-ini`, params);
|
|
353
|
+
}
|
|
354
|
+
async updatePhpIni(domain, data) {
|
|
355
|
+
return this.put(`${this.serverPath()}/php-ini/${enc(domain)}`, data);
|
|
356
|
+
}
|
|
357
|
+
async resetPhpIni(domain) {
|
|
358
|
+
return this.post(`${this.serverPath()}/php-ini/${enc(domain)}/reset`);
|
|
359
|
+
}
|
|
360
|
+
// ================================================================
|
|
361
|
+
// WordPressセキュリティ設定
|
|
362
|
+
// ================================================================
|
|
363
|
+
async getWordPressSecurity(params) {
|
|
364
|
+
return this.get(`${this.serverPath()}/wordpress-security`, params);
|
|
365
|
+
}
|
|
366
|
+
async updateWordPressSecurity(data) {
|
|
367
|
+
return this.post(`${this.serverPath()}/wordpress-security`, data);
|
|
368
|
+
}
|
|
369
|
+
// ================================================================
|
|
370
|
+
// Xアクセラレータ設定
|
|
371
|
+
// ================================================================
|
|
372
|
+
async listXAccelerator(params) {
|
|
373
|
+
return this.get(`${this.serverPath()}/x-accelerator`, params);
|
|
374
|
+
}
|
|
375
|
+
async updateXAccelerator(domain, data) {
|
|
376
|
+
return this.put(`${this.serverPath()}/x-accelerator/${enc(domain)}`, data);
|
|
377
|
+
}
|
|
378
|
+
// ================================================================
|
|
379
|
+
// サーバーキャッシュ設定
|
|
380
|
+
// ================================================================
|
|
381
|
+
async listServerCache(params) {
|
|
382
|
+
return this.get(`${this.serverPath()}/server-cache`, params);
|
|
383
|
+
}
|
|
384
|
+
async updateServerCache(domain, data) {
|
|
385
|
+
return this.put(`${this.serverPath()}/server-cache/${enc(domain)}`, data);
|
|
386
|
+
}
|
|
387
|
+
async clearServerCache(domain) {
|
|
388
|
+
return this.delete(`${this.serverPath()}/server-cache/${enc(domain)}/cache`);
|
|
389
|
+
}
|
|
390
|
+
// ================================================================
|
|
391
|
+
// ブラウザキャッシュ設定
|
|
392
|
+
// ================================================================
|
|
393
|
+
async listBrowserCache(params) {
|
|
394
|
+
return this.get(`${this.serverPath()}/browser-cache`, params);
|
|
395
|
+
}
|
|
396
|
+
async updateBrowserCache(domain, data) {
|
|
397
|
+
return this.put(`${this.serverPath()}/browser-cache/${enc(domain)}`, data);
|
|
398
|
+
}
|
|
399
|
+
// ================================================================
|
|
400
|
+
// サイト転送設定
|
|
401
|
+
// ================================================================
|
|
402
|
+
async listUrlRedirect(params) {
|
|
403
|
+
return this.get(`${this.serverPath()}/url-redirect`, params);
|
|
404
|
+
}
|
|
405
|
+
async addUrlRedirect(data) {
|
|
406
|
+
return this.post(`${this.serverPath()}/url-redirect`, data);
|
|
407
|
+
}
|
|
408
|
+
async deleteUrlRedirect(redirectId) {
|
|
409
|
+
return this.delete(`${this.serverPath()}/url-redirect/${enc(redirectId)}`);
|
|
410
|
+
}
|
|
411
|
+
// ================================================================
|
|
412
|
+
// アクセス拒否設定
|
|
413
|
+
// ================================================================
|
|
414
|
+
async listAccessDeny(params) {
|
|
415
|
+
return this.get(`${this.serverPath()}/access-deny`, params);
|
|
416
|
+
}
|
|
417
|
+
async addAccessDeny(data) {
|
|
418
|
+
return this.post(`${this.serverPath()}/access-deny`, data);
|
|
419
|
+
}
|
|
420
|
+
async updateAccessDeny(denyId, data) {
|
|
421
|
+
return this.put(`${this.serverPath()}/access-deny/${enc(denyId)}`, data);
|
|
422
|
+
}
|
|
423
|
+
async deleteAccessDeny(denyId) {
|
|
424
|
+
return this.delete(`${this.serverPath()}/access-deny/${enc(denyId)}`);
|
|
425
|
+
}
|
|
426
|
+
// ================================================================
|
|
427
|
+
// XPageSpeed設定
|
|
428
|
+
// ================================================================
|
|
429
|
+
async listXPageSpeed(params) {
|
|
430
|
+
return this.get(`${this.serverPath()}/xpagespeed`, params);
|
|
431
|
+
}
|
|
432
|
+
async updateXPageSpeed(domain, data) {
|
|
433
|
+
return this.put(`${this.serverPath()}/xpagespeed/${enc(domain)}`, data);
|
|
434
|
+
}
|
|
435
|
+
// ================================================================
|
|
436
|
+
// 自動バックアップの取得・復元
|
|
437
|
+
// ================================================================
|
|
438
|
+
async listAutoBackupBackupDates() {
|
|
439
|
+
return this.get(`${this.serverPath()}/auto-backup/backup-dates`);
|
|
440
|
+
}
|
|
441
|
+
async listAutoBackup() {
|
|
442
|
+
return this.get(`${this.serverPath()}/auto-backup`);
|
|
443
|
+
}
|
|
444
|
+
async getAutoBackup(requestId) {
|
|
445
|
+
return this.get(`${this.serverPath()}/auto-backup/${enc(requestId)}`);
|
|
446
|
+
}
|
|
447
|
+
async createAutoBackup(data) {
|
|
448
|
+
return this.post(`${this.serverPath()}/auto-backup`, data);
|
|
449
|
+
}
|
|
450
|
+
// ================================================================
|
|
451
|
+
// MySQLバックアップの取得・復元
|
|
452
|
+
// ================================================================
|
|
453
|
+
async listMysqlBackupDatabases() {
|
|
454
|
+
return this.get(`${this.serverPath()}/mysql-backup/databases`);
|
|
455
|
+
}
|
|
456
|
+
async listMysqlBackup() {
|
|
457
|
+
return this.get(`${this.serverPath()}/mysql-backup`);
|
|
458
|
+
}
|
|
459
|
+
async getMysqlBackup(requestId) {
|
|
460
|
+
return this.get(`${this.serverPath()}/mysql-backup/${enc(requestId)}`);
|
|
461
|
+
}
|
|
462
|
+
async createMysqlBackup(data) {
|
|
463
|
+
return this.post(`${this.serverPath()}/mysql-backup`, data);
|
|
464
|
+
}
|
|
465
|
+
// ================================================================
|
|
259
466
|
// ログ
|
|
260
467
|
// ================================================================
|
|
261
468
|
async getAccessLog(params) {
|
|
@@ -536,11 +743,217 @@ function registerMailTools(server, client, brand) {
|
|
|
536
743
|
}, async ({ filter_id }) => callApi(() => client.deleteMailFilter(filter_id)));
|
|
537
744
|
}
|
|
538
745
|
|
|
539
|
-
// ../core/dist/tools/server/
|
|
746
|
+
// ../core/dist/tools/server/auto-reply.js
|
|
540
747
|
import { z as z5 } from "zod";
|
|
748
|
+
var PARTIAL_UPDATE_EMPTY_MESSAGE = "\u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u30921\u3064\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044";
|
|
749
|
+
function registerAutoReplyTools(server, client, brand) {
|
|
750
|
+
server.tool(serverToolName(brand, "list", "auto_reply"), "\u81EA\u52D5\u5FDC\u7B54\u8A2D\u5B9A\u306E\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
751
|
+
domain: z5.string().optional().describe("\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
752
|
+
}, async (args) => {
|
|
753
|
+
const params = {};
|
|
754
|
+
if (args.domain)
|
|
755
|
+
params.domain = args.domain;
|
|
756
|
+
return callApi(() => client.listAutoReply(params));
|
|
757
|
+
});
|
|
758
|
+
server.tool(serverToolName(brand, "get", "auto_reply"), "\u81EA\u52D5\u5FDC\u7B54\u8A2D\u5B9A\u306E\u8A73\u7D30\u3092\u53D6\u5F97", {
|
|
759
|
+
mail_address: z5.string().describe("\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9")
|
|
760
|
+
}, async ({ mail_address }) => callApi(() => client.getAutoReply(mail_address)));
|
|
761
|
+
server.tool(serverToolName(brand, "add", "auto_reply"), "\u81EA\u52D5\u5FDC\u7B54\u8A2D\u5B9A\u3092\u8FFD\u52A0", {
|
|
762
|
+
domain: z5.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
763
|
+
mail_address: z5.string().describe("\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9"),
|
|
764
|
+
from_name: z5.string().describe("\u9001\u4FE1\u8005\u540D"),
|
|
765
|
+
subject: z5.string().describe("\u4EF6\u540D"),
|
|
766
|
+
body: z5.string().describe("\u672C\u6587"),
|
|
767
|
+
quote_incoming: z5.boolean().describe("\u53D7\u4FE1\u30E1\u30FC\u30EB\u306E\u5F15\u7528\u3092\u542B\u3081\u308B\u304B")
|
|
768
|
+
}, async (args) => callApi(() => client.addAutoReply(args)));
|
|
769
|
+
server.tool(serverToolName(brand, "update", "auto_reply"), "\u81EA\u52D5\u5FDC\u7B54\u8A2D\u5B9A\u3092\u66F4\u65B0\uFF08\u6307\u5B9A\u3057\u305F\u9805\u76EE\u306E\u307F\uFF09", {
|
|
770
|
+
mail_address: z5.string().describe("\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9"),
|
|
771
|
+
from_name: z5.string().optional().describe("\u9001\u4FE1\u8005\u540D"),
|
|
772
|
+
subject: z5.string().optional().describe("\u4EF6\u540D"),
|
|
773
|
+
body: z5.string().optional().describe("\u672C\u6587"),
|
|
774
|
+
quote_incoming: z5.boolean().optional().describe("\u53D7\u4FE1\u30E1\u30FC\u30EB\u306E\u5F15\u7528\u3092\u542B\u3081\u308B\u304B")
|
|
775
|
+
}, async ({ mail_address, from_name, subject, body, quote_incoming }) => {
|
|
776
|
+
const data = {};
|
|
777
|
+
if (from_name !== void 0)
|
|
778
|
+
data.from_name = from_name;
|
|
779
|
+
if (subject !== void 0)
|
|
780
|
+
data.subject = subject;
|
|
781
|
+
if (body !== void 0)
|
|
782
|
+
data.body = body;
|
|
783
|
+
if (quote_incoming !== void 0)
|
|
784
|
+
data.quote_incoming = quote_incoming;
|
|
785
|
+
if (Object.keys(data).length === 0) {
|
|
786
|
+
throw new Error(PARTIAL_UPDATE_EMPTY_MESSAGE);
|
|
787
|
+
}
|
|
788
|
+
return callApi(() => client.updateAutoReply(mail_address, data));
|
|
789
|
+
});
|
|
790
|
+
server.tool(serverToolName(brand, "delete", "auto_reply"), "\u81EA\u52D5\u5FDC\u7B54\u8A2D\u5B9A\u3092\u524A\u9664", {
|
|
791
|
+
mail_address: z5.string().describe("\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9")
|
|
792
|
+
}, async ({ mail_address }) => callApi(() => client.deleteAutoReply(mail_address)));
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
// ../core/dist/tools/server/smtp-abroad-restriction.js
|
|
796
|
+
import { z as z6 } from "zod";
|
|
797
|
+
function registerSmtpAbroadRestrictionTools(server, client, brand) {
|
|
798
|
+
server.tool(serverToolName(brand, "list", "smtp_abroad_restriction"), "SMTP\u8A8D\u8A3C\u306E\u56FD\u5916\u30A2\u30AF\u30BB\u30B9\u5236\u9650\u8A2D\u5B9A\u3092\u53D6\u5F97", {
|
|
799
|
+
domain: z6.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
800
|
+
}, async (args) => {
|
|
801
|
+
const params = {};
|
|
802
|
+
if (args.domain)
|
|
803
|
+
params.domain = args.domain;
|
|
804
|
+
return callApi(() => client.listSmtpAbroadRestriction(params));
|
|
805
|
+
});
|
|
806
|
+
server.tool(serverToolName(brand, "update", "smtp_abroad_restriction"), "SMTP\u8A8D\u8A3C\u306E\u56FD\u5916\u30A2\u30AF\u30BB\u30B9\u5236\u9650\u8A2D\u5B9A\u3092\u66F4\u65B0", {
|
|
807
|
+
domain: z6.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
808
|
+
abroad_access_restriction: z6.boolean().describe("\u56FD\u5916\u30A2\u30AF\u30BB\u30B9\u5236\u9650\u306E\u6709\u52B9/\u7121\u52B9")
|
|
809
|
+
}, async ({ domain, abroad_access_restriction }) => callApi(() => client.updateSmtpAbroadRestriction(domain, { abroad_access_restriction })));
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
// ../core/dist/tools/server/dkim.js
|
|
813
|
+
import { z as z7 } from "zod";
|
|
814
|
+
function registerDkimTools(server, client, brand) {
|
|
815
|
+
server.tool(serverToolName(brand, "list", "dkim"), "DKIM\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
816
|
+
domain: z7.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
817
|
+
}, async (args) => {
|
|
818
|
+
const params = {};
|
|
819
|
+
if (args.domain)
|
|
820
|
+
params.domain = args.domain;
|
|
821
|
+
return callApi(() => client.listDkim(params));
|
|
822
|
+
});
|
|
823
|
+
server.tool(serverToolName(brand, "get", "dkim"), "DKIM\u8A2D\u5B9A\u306E\u8A73\u7D30\u3092\u53D6\u5F97", {
|
|
824
|
+
fqdn: z7.string().describe("FQDN\uFF08example.com \u307E\u305F\u306F sub.example.com\uFF09")
|
|
825
|
+
}, async ({ fqdn }) => callApi(() => client.getDkim(fqdn)));
|
|
826
|
+
server.tool(serverToolName(brand, "update", "dkim"), "DKIM\u8A2D\u5B9A\u306E\u6709\u52B9/\u7121\u52B9\u3092\u5207\u308A\u66FF\u3048", {
|
|
827
|
+
fqdn: z7.string().describe("FQDN\uFF08example.com \u307E\u305F\u306F sub.example.com\uFF09"),
|
|
828
|
+
enabled: z7.boolean().describe("DKIM\u306E\u6709\u52B9/\u7121\u52B9")
|
|
829
|
+
}, async ({ fqdn, enabled }) => callApi(() => client.updateDkim(fqdn, { enabled })));
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
// ../core/dist/tools/server/dmarc.js
|
|
833
|
+
import { z as z8 } from "zod";
|
|
834
|
+
var PARTIAL_UPDATE_EMPTY_MESSAGE2 = "\u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u30921\u3064\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044";
|
|
835
|
+
function registerDmarcTools(server, client, brand) {
|
|
836
|
+
server.tool(serverToolName(brand, "list", "dmarc"), "\u9001\u4FE1\u5074DMARC\u8A2D\u5B9A\u3092\u53D6\u5F97", {
|
|
837
|
+
domain: z8.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
838
|
+
}, async (args) => {
|
|
839
|
+
const params = {};
|
|
840
|
+
if (args.domain)
|
|
841
|
+
params.domain = args.domain;
|
|
842
|
+
return callApi(() => client.listDmarc(params));
|
|
843
|
+
});
|
|
844
|
+
server.tool(serverToolName(brand, "update", "dmarc"), "\u9001\u4FE1\u5074DMARC\u8A2D\u5B9A\u3092\u66F4\u65B0\uFF08\u6307\u5B9A\u3057\u305F\u9805\u76EE\u306E\u307F\uFF09", {
|
|
845
|
+
domain: z8.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
846
|
+
policy: z8.enum(["none", "quarantine", "reject"]).optional().describe("DMARC\u30DD\u30EA\u30B7\u30FC"),
|
|
847
|
+
report_enabled: z8.boolean().optional().describe("\u30EC\u30DD\u30FC\u30C8\u901A\u77E5\u306E\u6709\u52B9/\u7121\u52B9\u3002false \u306E\u3068\u304D\u901A\u77E5\u5148\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306F\u81EA\u52D5\u7684\u306B\u7A7A\u306B\u306A\u308B"),
|
|
848
|
+
notification_mail_addresses: z8.array(z8.string()).optional().describe("\u30EC\u30DD\u30FC\u30C8\u901A\u77E5\u5148\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3002report_enabled \u304C true \u306E\u3068\u304D\u306F1\u4EF6\u4EE5\u4E0A\u5FC5\u9808")
|
|
849
|
+
}, async ({ domain, policy, report_enabled, notification_mail_addresses }) => {
|
|
850
|
+
const data = {};
|
|
851
|
+
if (policy !== void 0)
|
|
852
|
+
data.policy = policy;
|
|
853
|
+
if (report_enabled !== void 0)
|
|
854
|
+
data.report_enabled = report_enabled;
|
|
855
|
+
if (notification_mail_addresses !== void 0) {
|
|
856
|
+
data.notification_mail_addresses = notification_mail_addresses;
|
|
857
|
+
}
|
|
858
|
+
if (Object.keys(data).length === 0) {
|
|
859
|
+
throw new Error(PARTIAL_UPDATE_EMPTY_MESSAGE2);
|
|
860
|
+
}
|
|
861
|
+
return callApi(() => client.updateDmarc(domain, data));
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
// ../core/dist/tools/server/spf.js
|
|
866
|
+
import { z as z9 } from "zod";
|
|
867
|
+
var updateActionSchema = z9.enum(["reset", "enable_gmail", "custom"]);
|
|
868
|
+
function registerSpfTools(server, client, brand) {
|
|
869
|
+
server.tool(serverToolName(brand, "list", "spf"), "SPF\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
870
|
+
domain: z9.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
871
|
+
}, async (args) => {
|
|
872
|
+
const params = {};
|
|
873
|
+
if (args.domain)
|
|
874
|
+
params.domain = args.domain;
|
|
875
|
+
return callApi(() => client.listSpf(params));
|
|
876
|
+
});
|
|
877
|
+
server.tool(serverToolName(brand, "add", "spf"), "SPF\u8A2D\u5B9A\u3092\u8FFD\u52A0", {
|
|
878
|
+
fqdn: z9.string().describe("FQDN\uFF08example.com \u307E\u305F\u306F sub.example.com\uFF09")
|
|
879
|
+
}, async ({ fqdn }) => callApi(() => client.addSpf({ fqdn })));
|
|
880
|
+
server.tool(serverToolName(brand, "update", "spf"), "SPF\u8A2D\u5B9A\u3092\u66F4\u65B0", {
|
|
881
|
+
fqdn: z9.string().describe("FQDN"),
|
|
882
|
+
action: updateActionSchema.describe("reset: \u6A19\u6E96SPF\u3078\u521D\u671F\u5316 / enable_gmail: Gmail\u8A31\u53EFON / custom: \u30AB\u30B9\u30BF\u30E0\u8A2D\u5B9A"),
|
|
883
|
+
spf_record: z9.string().optional().describe("\u30AB\u30B9\u30BF\u30E0SPF\u30EC\u30B3\u30FC\u30C9\uFF08action=custom \u306E\u3068\u304D\u5FC5\u9808\uFF09")
|
|
884
|
+
}, async ({ fqdn, action, spf_record }) => {
|
|
885
|
+
const body = { action };
|
|
886
|
+
if (action === "custom") {
|
|
887
|
+
if (spf_record === void 0 || spf_record === "") {
|
|
888
|
+
throw new Error("action=custom \u306E\u3068\u304D\u306F spf_record \u304C\u5FC5\u9808\u3067\u3059");
|
|
889
|
+
}
|
|
890
|
+
body.spf_record = spf_record;
|
|
891
|
+
}
|
|
892
|
+
return callApi(() => client.updateSpf(fqdn, body));
|
|
893
|
+
});
|
|
894
|
+
server.tool(serverToolName(brand, "delete", "spf"), "SPF\u8A2D\u5B9A\u3092\u524A\u9664", {
|
|
895
|
+
fqdn: z9.string().describe("FQDN")
|
|
896
|
+
}, async ({ fqdn }) => callApi(() => client.deleteSpf(fqdn)));
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// ../core/dist/tools/server/spam-filter.js
|
|
900
|
+
import { z as z10 } from "zod";
|
|
901
|
+
var filterTypeSchema = z10.enum(["off", "standard", "cloudmark_authority"]);
|
|
902
|
+
var detectionActionSchema = z10.enum(["inbox", "spam", "trash", "delete"]);
|
|
903
|
+
var spamLevelSchema = z10.enum(["very_lenient", "lenient", "normal", "strict", "very_strict", "strictest"]);
|
|
904
|
+
var PARTIAL_UPDATE_EMPTY_MESSAGE3 = "\u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u30921\u3064\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044";
|
|
905
|
+
function registerSpamFilterTools(server, client, brand) {
|
|
906
|
+
server.tool(serverToolName(brand, "list", "spam_filter"), "\u8FF7\u60D1\u30E1\u30FC\u30EB\u30D5\u30A3\u30EB\u30BF\u8A2D\u5B9A\u3092\u53D6\u5F97", {
|
|
907
|
+
domain: z10.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
908
|
+
}, async (args) => {
|
|
909
|
+
const params = {};
|
|
910
|
+
if (args.domain)
|
|
911
|
+
params.domain = args.domain;
|
|
912
|
+
return callApi(() => client.listSpamFilter(params));
|
|
913
|
+
});
|
|
914
|
+
server.tool(serverToolName(brand, "update", "spam_filter"), "\u8FF7\u60D1\u30E1\u30FC\u30EB\u30D5\u30A3\u30EB\u30BF\u8A2D\u5B9A\u3092\u66F4\u65B0\uFF08\u6307\u5B9A\u3057\u305F\u9805\u76EE\u306E\u307F\uFF09", {
|
|
915
|
+
domain: z10.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
916
|
+
filter_type: filterTypeSchema.optional().describe("\u8FF7\u60D1\u30E1\u30FC\u30EB\u30D5\u30A3\u30EB\u30BF"),
|
|
917
|
+
detection_action: detectionActionSchema.optional().describe("\u691C\u77E5\u6642\u306E\u51E6\u7406\uFF08inbox / spam / trash / delete\uFF09"),
|
|
918
|
+
white_list: z10.array(z10.string()).optional().describe("\u30DB\u30EF\u30A4\u30C8\u30EA\u30B9\u30C8\uFF08\u7A7A\u914D\u5217\u3067\u30AF\u30EA\u30A2\uFF09"),
|
|
919
|
+
black_list: z10.array(z10.string()).optional().describe("\u30D6\u30E9\u30C3\u30AF\u30EA\u30B9\u30C8\uFF08\u7A7A\u914D\u5217\u3067\u30AF\u30EA\u30A2\uFF09"),
|
|
920
|
+
spam_level: spamLevelSchema.optional().describe("\u6A19\u6E96\u30B9\u30D1\u30E0\u30D5\u30A3\u30EB\u30BF\u5224\u5B9A\u57FA\u6E96"),
|
|
921
|
+
strict_non_japanese_subject: z10.boolean().optional().describe("\u65E5\u672C\u8A9E\u3092\u542B\u307E\u306A\u3044\u4EF6\u540D\u306B\u5BFE\u3057\u3066\u5224\u5B9A\u3092\u53B3\u3057\u304F\u3059\u308B"),
|
|
922
|
+
strict_html_mail: z10.boolean().optional().describe("HTML\u30E1\u30FC\u30EB\u306B\u5BFE\u3057\u3066\u5224\u5B9A\u3092\u53B3\u3057\u304F\u3059\u308B")
|
|
923
|
+
}, async (args) => {
|
|
924
|
+
const { domain, ...fields } = args;
|
|
925
|
+
const data = {};
|
|
926
|
+
if (fields.filter_type !== void 0)
|
|
927
|
+
data.filter_type = fields.filter_type;
|
|
928
|
+
if (fields.detection_action !== void 0)
|
|
929
|
+
data.detection_action = fields.detection_action;
|
|
930
|
+
if (fields.white_list !== void 0)
|
|
931
|
+
data.white_list = fields.white_list;
|
|
932
|
+
if (fields.black_list !== void 0)
|
|
933
|
+
data.black_list = fields.black_list;
|
|
934
|
+
if (fields.spam_level !== void 0)
|
|
935
|
+
data.spam_level = fields.spam_level;
|
|
936
|
+
if (fields.strict_non_japanese_subject !== void 0) {
|
|
937
|
+
data.strict_non_japanese_subject = fields.strict_non_japanese_subject;
|
|
938
|
+
}
|
|
939
|
+
if (fields.strict_html_mail !== void 0)
|
|
940
|
+
data.strict_html_mail = fields.strict_html_mail;
|
|
941
|
+
if (Object.keys(data).length === 0) {
|
|
942
|
+
throw new Error(PARTIAL_UPDATE_EMPTY_MESSAGE3);
|
|
943
|
+
}
|
|
944
|
+
return callApi(() => client.updateSpamFilter(domain, data));
|
|
945
|
+
});
|
|
946
|
+
server.tool(serverToolName(brand, "update", "spam_filter_dmarc_receiver"), "\u53D7\u4FE1\u5074DMARC\u8A2D\u5B9A\u3092\u66F4\u65B0", {
|
|
947
|
+
domain: z10.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
948
|
+
dmarc_receiver: z10.boolean().describe("\u53D7\u4FE1\u5074DMARC\u8A2D\u5B9A")
|
|
949
|
+
}, async ({ domain, dmarc_receiver }) => callApi(() => client.updateSpamFilterDmarcReceiver(domain, { dmarc_receiver })));
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
// ../core/dist/tools/server/ftp.js
|
|
953
|
+
import { z as z11 } from "zod";
|
|
541
954
|
function registerFtpTools(server, client, brand) {
|
|
542
955
|
server.tool(serverToolName(brand, "list", "ftp"), "FTP\u30A2\u30AB\u30A6\u30F3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
543
|
-
domain:
|
|
956
|
+
domain: z11.string().optional().describe("\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
544
957
|
}, async (args) => {
|
|
545
958
|
const params = {};
|
|
546
959
|
if (args.domain)
|
|
@@ -548,87 +961,87 @@ function registerFtpTools(server, client, brand) {
|
|
|
548
961
|
return callApi(() => client.listFtp(params));
|
|
549
962
|
});
|
|
550
963
|
server.tool(serverToolName(brand, "add", "ftp"), "FTP\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u8FFD\u52A0", {
|
|
551
|
-
ftp_account:
|
|
552
|
-
password:
|
|
553
|
-
directory:
|
|
554
|
-
quota_mb:
|
|
555
|
-
memo:
|
|
964
|
+
ftp_account: z11.string().describe("FTP\u30A2\u30AB\u30A6\u30F3\u30C8\uFF08user@domain \u5F62\u5F0F\uFF09"),
|
|
965
|
+
password: z11.string().describe("\u30D1\u30B9\u30EF\u30FC\u30C9"),
|
|
966
|
+
directory: z11.string().optional().describe("\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA"),
|
|
967
|
+
quota_mb: z11.number().optional().describe("\u5BB9\u91CF\u5236\u9650\uFF08MB\u30020\u3067\u7121\u5236\u9650\uFF09"),
|
|
968
|
+
memo: z11.string().optional().describe("\u30E1\u30E2")
|
|
556
969
|
}, async (args) => callApi(() => client.addFtp(args)));
|
|
557
970
|
server.tool(serverToolName(brand, "update", "ftp"), "FTP\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u66F4\u65B0", {
|
|
558
|
-
ftp_account:
|
|
559
|
-
password:
|
|
560
|
-
directory:
|
|
561
|
-
quota_mb:
|
|
562
|
-
memo:
|
|
971
|
+
ftp_account: z11.string().describe("FTP\u30A2\u30AB\u30A6\u30F3\u30C8"),
|
|
972
|
+
password: z11.string().optional().describe("\u30D1\u30B9\u30EF\u30FC\u30C9"),
|
|
973
|
+
directory: z11.string().optional().describe("\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA"),
|
|
974
|
+
quota_mb: z11.number().optional().describe("\u5BB9\u91CF\u5236\u9650\uFF08MB\uFF09"),
|
|
975
|
+
memo: z11.string().optional().describe("\u30E1\u30E2")
|
|
563
976
|
}, async ({ ftp_account, ...data }) => callApi(() => client.updateFtp(ftp_account, data)));
|
|
564
977
|
server.tool(serverToolName(brand, "delete", "ftp"), "FTP\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u524A\u9664", {
|
|
565
|
-
ftp_account:
|
|
978
|
+
ftp_account: z11.string().describe("FTP\u30A2\u30AB\u30A6\u30F3\u30C8")
|
|
566
979
|
}, async ({ ftp_account }) => callApi(() => client.deleteFtp(ftp_account)));
|
|
567
980
|
}
|
|
568
981
|
|
|
569
982
|
// ../core/dist/tools/server/database.js
|
|
570
|
-
import { z as
|
|
983
|
+
import { z as z12 } from "zod";
|
|
571
984
|
function registerDatabaseTools(server, client, brand) {
|
|
572
985
|
server.tool(serverToolName(brand, "list", "db"), "MySQL \u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u4E00\u89A7\u3092\u53D6\u5F97", {}, async () => callApi(() => client.listDb()));
|
|
573
986
|
server.tool(serverToolName(brand, "add", "db"), "MySQL \u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u4F5C\u6210", {
|
|
574
|
-
name_suffix:
|
|
575
|
-
memo:
|
|
987
|
+
name_suffix: z12.string().describe("DB\u540D\u306E\u30B5\u30D5\u30A3\u30C3\u30AF\u30B9\uFF08\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u306F\u81EA\u52D5\u4ED8\u4E0E\uFF09"),
|
|
988
|
+
memo: z12.string().optional().describe("\u30E1\u30E2")
|
|
576
989
|
}, async (args) => callApi(() => client.addDb(args)));
|
|
577
990
|
server.tool(serverToolName(brand, "update", "db"), "MySQL \u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u30E1\u30E2\u3092\u66F4\u65B0", {
|
|
578
|
-
db_name:
|
|
579
|
-
memo:
|
|
991
|
+
db_name: z12.string().describe("\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u540D"),
|
|
992
|
+
memo: z12.string().optional().describe("\u30E1\u30E2")
|
|
580
993
|
}, async ({ db_name, ...data }) => callApi(() => client.updateDb(db_name, data)));
|
|
581
994
|
server.tool(serverToolName(brand, "delete", "db"), "MySQL \u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u524A\u9664", {
|
|
582
|
-
db_name:
|
|
995
|
+
db_name: z12.string().describe("\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u540D")
|
|
583
996
|
}, async ({ db_name }) => callApi(() => client.deleteDb(db_name)));
|
|
584
997
|
server.tool(serverToolName(brand, "list", "db_user"), "MySQL \u30E6\u30FC\u30B6\u30FC\u4E00\u89A7\u3092\u53D6\u5F97", {}, async () => callApi(() => client.listDbUser()));
|
|
585
998
|
server.tool(serverToolName(brand, "add", "db_user"), "MySQL \u30E6\u30FC\u30B6\u30FC\u3092\u4F5C\u6210", {
|
|
586
|
-
name_suffix:
|
|
587
|
-
password:
|
|
588
|
-
memo:
|
|
999
|
+
name_suffix: z12.string().describe("\u30E6\u30FC\u30B6\u30FC\u540D\u306E\u30B5\u30D5\u30A3\u30C3\u30AF\u30B9"),
|
|
1000
|
+
password: z12.string().describe("\u30D1\u30B9\u30EF\u30FC\u30C9"),
|
|
1001
|
+
memo: z12.string().optional().describe("\u30E1\u30E2")
|
|
589
1002
|
}, async (args) => callApi(() => client.addDbUser(args)));
|
|
590
1003
|
server.tool(serverToolName(brand, "update", "db_user"), "MySQL \u30E6\u30FC\u30B6\u30FC\u306E\u30D1\u30B9\u30EF\u30FC\u30C9\u7B49\u3092\u5909\u66F4", {
|
|
591
|
-
db_user:
|
|
592
|
-
password:
|
|
593
|
-
memo:
|
|
1004
|
+
db_user: z12.string().describe("\u30E6\u30FC\u30B6\u30FC\u540D"),
|
|
1005
|
+
password: z12.string().optional().describe("\u30D1\u30B9\u30EF\u30FC\u30C9"),
|
|
1006
|
+
memo: z12.string().optional().describe("\u30E1\u30E2")
|
|
594
1007
|
}, async ({ db_user, ...data }) => callApi(() => client.updateDbUser(db_user, data)));
|
|
595
1008
|
server.tool(serverToolName(brand, "delete", "db_user"), "MySQL \u30E6\u30FC\u30B6\u30FC\u3092\u524A\u9664", {
|
|
596
|
-
db_user:
|
|
1009
|
+
db_user: z12.string().describe("\u30E6\u30FC\u30B6\u30FC\u540D")
|
|
597
1010
|
}, async ({ db_user }) => callApi(() => client.deleteDbUser(db_user)));
|
|
598
1011
|
server.tool(serverToolName(brand, "list", "db_user_grant"), "MySQL \u30E6\u30FC\u30B6\u30FC\u306E\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u6A29\u9650\u3092\u53D6\u5F97", {
|
|
599
|
-
db_user:
|
|
1012
|
+
db_user: z12.string().describe("\u30E6\u30FC\u30B6\u30FC\u540D")
|
|
600
1013
|
}, async ({ db_user }) => callApi(() => client.listDbUserGrant(db_user)));
|
|
601
1014
|
server.tool(serverToolName(brand, "add", "db_user_grant"), "MySQL \u30E6\u30FC\u30B6\u30FC\u306B\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u6A29\u9650\u3092\u4ED8\u4E0E", {
|
|
602
|
-
db_user:
|
|
603
|
-
db_name:
|
|
1015
|
+
db_user: z12.string().describe("\u30E6\u30FC\u30B6\u30FC\u540D"),
|
|
1016
|
+
db_name: z12.string().describe("\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u540D")
|
|
604
1017
|
}, async ({ db_user, ...data }) => callApi(() => client.addDbUserGrant(db_user, data)));
|
|
605
1018
|
server.tool(serverToolName(brand, "delete", "db_user_grant"), "MySQL \u30E6\u30FC\u30B6\u30FC\u304B\u3089\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u6A29\u9650\u3092\u524A\u9664", {
|
|
606
|
-
db_user:
|
|
607
|
-
db_name:
|
|
1019
|
+
db_user: z12.string().describe("\u30E6\u30FC\u30B6\u30FC\u540D"),
|
|
1020
|
+
db_name: z12.string().describe("\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u540D")
|
|
608
1021
|
}, async ({ db_user, ...data }) => callApi(() => client.deleteDbUserGrant(db_user, data)));
|
|
609
1022
|
}
|
|
610
1023
|
|
|
611
1024
|
// ../core/dist/tools/server/domain.js
|
|
612
|
-
import { z as
|
|
1025
|
+
import { z as z13 } from "zod";
|
|
613
1026
|
function registerDomainTools(server, client, brand) {
|
|
614
1027
|
server.tool(serverToolName(brand, "list", "domain"), "\u30C9\u30E1\u30A4\u30F3\u4E00\u89A7\u3092\u53D6\u5F97", {}, async () => callApi(() => client.listDomain()));
|
|
615
1028
|
server.tool(serverToolName(brand, "get", "domain"), "\u30C9\u30E1\u30A4\u30F3\u306E\u8A73\u7D30\u60C5\u5831\u3092\u53D6\u5F97", {
|
|
616
|
-
domain:
|
|
1029
|
+
domain: z13.string().describe("\u30C9\u30E1\u30A4\u30F3\u540D")
|
|
617
1030
|
}, async ({ domain }) => callApi(() => client.getDomain(domain)));
|
|
618
1031
|
server.tool(serverToolName(brand, "add", "domain"), "\u30C9\u30E1\u30A4\u30F3\u3092\u8FFD\u52A0", {
|
|
619
|
-
domain:
|
|
620
|
-
ssl:
|
|
621
|
-
memo:
|
|
1032
|
+
domain: z13.string().describe("\u30C9\u30E1\u30A4\u30F3\u540D"),
|
|
1033
|
+
ssl: z13.boolean().optional().describe("\u7121\u6599SSL\u8A2D\u5B9A\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: true\uFF09"),
|
|
1034
|
+
memo: z13.string().optional().describe("\u30E1\u30E2")
|
|
622
1035
|
}, async (args) => callApi(() => client.addDomain(args)));
|
|
623
1036
|
server.tool(serverToolName(brand, "update", "domain"), "\u30C9\u30E1\u30A4\u30F3\u306E\u30E1\u30E2\u3092\u66F4\u65B0", {
|
|
624
|
-
domain:
|
|
625
|
-
memo:
|
|
1037
|
+
domain: z13.string().describe("\u30C9\u30E1\u30A4\u30F3\u540D"),
|
|
1038
|
+
memo: z13.string().optional().describe("\u30E1\u30E2")
|
|
626
1039
|
}, async ({ domain, ...data }) => callApi(() => client.updateDomain(domain, data)));
|
|
627
1040
|
server.tool(serverToolName(brand, "delete", "domain"), "\u30C9\u30E1\u30A4\u30F3\u3092\u524A\u9664", {
|
|
628
|
-
domain:
|
|
1041
|
+
domain: z13.string().describe("\u30C9\u30E1\u30A4\u30F3\u540D")
|
|
629
1042
|
}, async ({ domain }) => callApi(() => client.deleteDomain(domain)));
|
|
630
1043
|
server.tool(serverToolName(brand, "list", "subdomain"), "\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
631
|
-
domain:
|
|
1044
|
+
domain: z13.string().optional().describe("\u89AA\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
632
1045
|
}, async (args) => {
|
|
633
1046
|
const params = {};
|
|
634
1047
|
if (args.domain)
|
|
@@ -636,26 +1049,26 @@ function registerDomainTools(server, client, brand) {
|
|
|
636
1049
|
return callApi(() => client.listSubdomain(params));
|
|
637
1050
|
});
|
|
638
1051
|
server.tool(serverToolName(brand, "add", "subdomain"), "\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3\u3092\u8FFD\u52A0", {
|
|
639
|
-
subdomain:
|
|
640
|
-
document_root_type:
|
|
641
|
-
ssl:
|
|
642
|
-
memo:
|
|
1052
|
+
subdomain: z13.string().describe("\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3\uFF08\u4F8B: blog.example.com\uFF09"),
|
|
1053
|
+
document_root_type: z13.enum(["subdomain_only", "full_subdomain"]).optional().describe("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30EB\u30FC\u30C8\u7A2E\u5225\uFF08subdomain_only: /public_html/sub, full_subdomain: /public_html/sub.example.com\uFF09"),
|
|
1054
|
+
ssl: z13.boolean().optional().describe("\u7121\u6599SSL\u8A2D\u5B9A\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: true\uFF09"),
|
|
1055
|
+
memo: z13.string().optional().describe("\u30E1\u30E2")
|
|
643
1056
|
}, async (args) => callApi(() => client.addSubdomain(args)));
|
|
644
1057
|
server.tool(serverToolName(brand, "update", "subdomain"), "\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3\u306E\u30E1\u30E2\u3092\u66F4\u65B0", {
|
|
645
|
-
subdomain:
|
|
646
|
-
memo:
|
|
1058
|
+
subdomain: z13.string().describe("\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3"),
|
|
1059
|
+
memo: z13.string().optional().describe("\u30E1\u30E2")
|
|
647
1060
|
}, async ({ subdomain, ...data }) => callApi(() => client.updateSubdomain(subdomain, data)));
|
|
648
1061
|
server.tool(serverToolName(brand, "delete", "subdomain"), "\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3\u3092\u524A\u9664", {
|
|
649
|
-
subdomain:
|
|
650
|
-
delete_files:
|
|
1062
|
+
subdomain: z13.string().describe("\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3"),
|
|
1063
|
+
delete_files: z13.boolean().optional().describe("\u95A2\u9023\u30D5\u30A1\u30A4\u30EB\u3082\u524A\u9664\u3059\u308B\u304B")
|
|
651
1064
|
}, async ({ subdomain, ...data }) => callApi(() => client.deleteSubdomain(subdomain, data)));
|
|
652
1065
|
}
|
|
653
1066
|
|
|
654
1067
|
// ../core/dist/tools/server/ssl-dns.js
|
|
655
|
-
import { z as
|
|
1068
|
+
import { z as z14 } from "zod";
|
|
656
1069
|
function registerSslDnsTools(server, client, brand) {
|
|
657
1070
|
server.tool(serverToolName(brand, "list", "ssl"), "SSL\u8A2D\u5B9A\u306E\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
658
|
-
domain:
|
|
1071
|
+
domain: z14.string().optional().describe("\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
659
1072
|
}, async (args) => {
|
|
660
1073
|
const params = {};
|
|
661
1074
|
if (args.domain)
|
|
@@ -663,13 +1076,13 @@ function registerSslDnsTools(server, client, brand) {
|
|
|
663
1076
|
return callApi(() => client.listSsl(params));
|
|
664
1077
|
});
|
|
665
1078
|
server.tool(serverToolName(brand, "install", "ssl"), "\u7121\u6599SSL\uFF08Let's Encrypt\uFF09\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB", {
|
|
666
|
-
common_name:
|
|
1079
|
+
common_name: z14.string().describe("\u30B3\u30E2\u30F3\u30CD\u30FC\u30E0\uFF08\u30C9\u30E1\u30A4\u30F3\u540D\uFF09")
|
|
667
1080
|
}, async (args) => callApi(() => client.installSsl(args)));
|
|
668
1081
|
server.tool(serverToolName(brand, "uninstall", "ssl"), "\u7121\u6599SSL\u3092\u30A2\u30F3\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB", {
|
|
669
|
-
common_name:
|
|
1082
|
+
common_name: z14.string().describe("\u30B3\u30E2\u30F3\u30CD\u30FC\u30E0\uFF08\u30C9\u30E1\u30A4\u30F3\u540D\uFF09")
|
|
670
1083
|
}, async ({ common_name }) => callApi(() => client.uninstallSsl(common_name)));
|
|
671
1084
|
server.tool(serverToolName(brand, "list", "dns"), "DNS\u30EC\u30B3\u30FC\u30C9\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
672
|
-
domain:
|
|
1085
|
+
domain: z14.string().optional().describe("\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
673
1086
|
}, async (args) => {
|
|
674
1087
|
const params = {};
|
|
675
1088
|
if (args.domain)
|
|
@@ -677,35 +1090,35 @@ function registerSslDnsTools(server, client, brand) {
|
|
|
677
1090
|
return callApi(() => client.listDns(params));
|
|
678
1091
|
});
|
|
679
1092
|
server.tool(serverToolName(brand, "add", "dns"), "DNS\u30EC\u30B3\u30FC\u30C9\u3092\u8FFD\u52A0", {
|
|
680
|
-
domain:
|
|
681
|
-
host:
|
|
682
|
-
type:
|
|
683
|
-
content:
|
|
684
|
-
ttl:
|
|
685
|
-
priority:
|
|
1093
|
+
domain: z14.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1094
|
+
host: z14.string().describe("\u30DB\u30B9\u30C8\u540D\uFF08@\u3067apex\uFF09"),
|
|
1095
|
+
type: z14.string().describe("\u30EC\u30B3\u30FC\u30C9\u30BF\u30A4\u30D7\uFF08A / AAAA / CNAME / MX / TXT / SRV / CAA\uFF09"),
|
|
1096
|
+
content: z14.string().describe("\u30EC\u30B3\u30FC\u30C9\u5024"),
|
|
1097
|
+
ttl: z14.number().optional().describe("TTL\uFF0860-86400\u3002\u30C7\u30D5\u30A9\u30EB\u30C8: 3600\uFF09"),
|
|
1098
|
+
priority: z14.number().optional().describe("\u512A\u5148\u5EA6\uFF08MX/SRV\u30EC\u30B3\u30FC\u30C9\u7528\uFF09")
|
|
686
1099
|
}, async (args) => callApi(() => client.addDns(args)));
|
|
687
1100
|
server.tool(serverToolName(brand, "update", "dns"), "DNS\u30EC\u30B3\u30FC\u30C9\u3092\u66F4\u65B0", {
|
|
688
|
-
dns_id:
|
|
689
|
-
domain:
|
|
690
|
-
host:
|
|
691
|
-
type:
|
|
692
|
-
content:
|
|
693
|
-
ttl:
|
|
694
|
-
priority:
|
|
1101
|
+
dns_id: z14.string().describe("DNS\u30EC\u30B3\u30FC\u30C9ID"),
|
|
1102
|
+
domain: z14.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1103
|
+
host: z14.string().describe("\u30DB\u30B9\u30C8\u540D"),
|
|
1104
|
+
type: z14.string().describe("\u30EC\u30B3\u30FC\u30C9\u30BF\u30A4\u30D7"),
|
|
1105
|
+
content: z14.string().describe("\u30EC\u30B3\u30FC\u30C9\u5024"),
|
|
1106
|
+
ttl: z14.number().optional().describe("TTL"),
|
|
1107
|
+
priority: z14.number().optional().describe("\u512A\u5148\u5EA6")
|
|
695
1108
|
}, async ({ dns_id, ...data }) => callApi(() => client.updateDns(dns_id, data)));
|
|
696
1109
|
server.tool(serverToolName(brand, "delete", "dns"), "DNS\u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664", {
|
|
697
|
-
dns_id:
|
|
698
|
-
domain:
|
|
1110
|
+
dns_id: z14.string().describe("DNS\u30EC\u30B3\u30FC\u30C9ID"),
|
|
1111
|
+
domain: z14.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3")
|
|
699
1112
|
}, async ({ dns_id, ...data }) => callApi(() => client.deleteDns(dns_id, data)));
|
|
700
1113
|
server.tool(serverToolName(brand, "get", "php_version"), "PHP\u30D0\u30FC\u30B8\u30E7\u30F3\u8A2D\u5B9A\uFF08\u5229\u7528\u53EF\u80FD\u30D0\u30FC\u30B8\u30E7\u30F3\u30FB\u30C9\u30E1\u30A4\u30F3\u5225\u306E\u73FE\u5728\u30D0\u30FC\u30B8\u30E7\u30F3\uFF09\u3092\u53D6\u5F97", {}, async () => callApi(() => client.getPhpVersion()));
|
|
701
1114
|
server.tool(serverToolName(brand, "update", "php_version"), "\u30C9\u30E1\u30A4\u30F3\u306EPHP\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u5909\u66F4", {
|
|
702
|
-
domain:
|
|
703
|
-
version:
|
|
1115
|
+
domain: z14.string().describe("\u30C9\u30E1\u30A4\u30F3\u540D"),
|
|
1116
|
+
version: z14.string().describe("PHP\u30D0\u30FC\u30B8\u30E7\u30F3\uFF08\u4F8B: 8.3.21\uFF09")
|
|
704
1117
|
}, async ({ domain, ...data }) => callApi(() => client.updatePhpVersion(domain, data)));
|
|
705
1118
|
server.tool(serverToolName(brand, "get", "access_log"), "\u30A2\u30AF\u30BB\u30B9\u30ED\u30B0\u3092\u53D6\u5F97", {
|
|
706
|
-
domain:
|
|
707
|
-
lines:
|
|
708
|
-
keyword:
|
|
1119
|
+
domain: z14.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1120
|
+
lines: z14.number().optional().describe("\u53D6\u5F97\u884C\u6570\uFF08\u672B\u5C3E\u304B\u3089\uFF09"),
|
|
1121
|
+
keyword: z14.string().optional().describe("\u7D5E\u308A\u8FBC\u307F\u30AD\u30FC\u30EF\u30FC\u30C9")
|
|
709
1122
|
}, async (args) => {
|
|
710
1123
|
const params = {};
|
|
711
1124
|
if (args.domain)
|
|
@@ -717,9 +1130,9 @@ function registerSslDnsTools(server, client, brand) {
|
|
|
717
1130
|
return callApi(() => client.getAccessLog(params));
|
|
718
1131
|
});
|
|
719
1132
|
server.tool(serverToolName(brand, "get", "error_log"), "\u30A8\u30E9\u30FC\u30ED\u30B0\u3092\u53D6\u5F97", {
|
|
720
|
-
domain:
|
|
721
|
-
lines:
|
|
722
|
-
keyword:
|
|
1133
|
+
domain: z14.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1134
|
+
lines: z14.number().optional().describe("\u53D6\u5F97\u884C\u6570\uFF08\u672B\u5C3E\u304B\u3089\uFF09"),
|
|
1135
|
+
keyword: z14.string().optional().describe("\u7D5E\u308A\u8FBC\u307F\u30AD\u30FC\u30EF\u30FC\u30C9")
|
|
723
1136
|
}, async (args) => {
|
|
724
1137
|
const params = {};
|
|
725
1138
|
if (args.domain)
|
|
@@ -732,6 +1145,429 @@ function registerSslDnsTools(server, client, brand) {
|
|
|
732
1145
|
});
|
|
733
1146
|
}
|
|
734
1147
|
|
|
1148
|
+
// ../core/dist/tools/server/resource-monitor.js
|
|
1149
|
+
import { z as z15 } from "zod";
|
|
1150
|
+
function registerResourceMonitorTools(server, client, brand) {
|
|
1151
|
+
server.tool(serverToolName(brand, "get", "resource_monitor"), "\u6307\u5B9A\u65E5\u306ECPU\u30FB\u30E1\u30E2\u30EA\u30FB\u8EE2\u9001\u91CF\u6642\u7CFB\u5217\u3092\u53D6\u5F97", {
|
|
1152
|
+
date: z15.string().describe("\u5BFE\u8C61\u65E5\uFF08Y-m-d \u307E\u305F\u306F Ymd\u3002\u5F53\u65E5\u542B\u3080\u76F4\u8FD11\u304B\u6708\uFF09")
|
|
1153
|
+
}, async ({ date }) => callApi(() => client.getResourceMonitor(date)));
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
// ../core/dist/tools/server/waf.js
|
|
1157
|
+
import { z as z16 } from "zod";
|
|
1158
|
+
var PARTIAL_UPDATE_EMPTY_MESSAGE4 = "\u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u30921\u3064\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044";
|
|
1159
|
+
function registerWafTools(server, client, brand) {
|
|
1160
|
+
server.tool(serverToolName(brand, "list", "waf"), "WAF\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
1161
|
+
domain: z16.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1162
|
+
}, async (args) => {
|
|
1163
|
+
const params = {};
|
|
1164
|
+
if (args.domain)
|
|
1165
|
+
params.domain = args.domain;
|
|
1166
|
+
return callApi(() => client.listWaf(params));
|
|
1167
|
+
});
|
|
1168
|
+
server.tool(serverToolName(brand, "update", "waf"), "WAF\u8A2D\u5B9A\u3092\u66F4\u65B0\uFF08\u6307\u5B9A\u3057\u305F\u9805\u76EE\u306E\u307F\uFF09", {
|
|
1169
|
+
domain: z16.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1170
|
+
xss_protection: z16.boolean().optional().describe("XSS\u5BFE\u7B56"),
|
|
1171
|
+
sql_injection_protection: z16.boolean().optional().describe("SQL\u5BFE\u7B56"),
|
|
1172
|
+
file_protection: z16.boolean().optional().describe("\u30D5\u30A1\u30A4\u30EB\u5BFE\u7B56"),
|
|
1173
|
+
mail_protection: z16.boolean().optional().describe("\u30E1\u30FC\u30EB\u5BFE\u7B56"),
|
|
1174
|
+
command_protection: z16.boolean().optional().describe("\u30B3\u30DE\u30F3\u30C9\u5BFE\u7B56"),
|
|
1175
|
+
php_protection: z16.boolean().optional().describe("PHP\u5BFE\u7B56")
|
|
1176
|
+
}, async (args) => {
|
|
1177
|
+
const { domain, ...fields } = args;
|
|
1178
|
+
const data = {};
|
|
1179
|
+
if (fields.xss_protection !== void 0)
|
|
1180
|
+
data.xss_protection = fields.xss_protection;
|
|
1181
|
+
if (fields.sql_injection_protection !== void 0)
|
|
1182
|
+
data.sql_injection_protection = fields.sql_injection_protection;
|
|
1183
|
+
if (fields.file_protection !== void 0)
|
|
1184
|
+
data.file_protection = fields.file_protection;
|
|
1185
|
+
if (fields.mail_protection !== void 0)
|
|
1186
|
+
data.mail_protection = fields.mail_protection;
|
|
1187
|
+
if (fields.command_protection !== void 0)
|
|
1188
|
+
data.command_protection = fields.command_protection;
|
|
1189
|
+
if (fields.php_protection !== void 0)
|
|
1190
|
+
data.php_protection = fields.php_protection;
|
|
1191
|
+
if (Object.keys(data).length === 0) {
|
|
1192
|
+
throw new Error(PARTIAL_UPDATE_EMPTY_MESSAGE4);
|
|
1193
|
+
}
|
|
1194
|
+
return callApi(() => client.updateWaf(domain, data));
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// ../core/dist/tools/server/php-ini.js
|
|
1199
|
+
import { z as z17 } from "zod";
|
|
1200
|
+
var PARTIAL_UPDATE_EMPTY_MESSAGE5 = "\u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u30921\u3064\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044";
|
|
1201
|
+
var phpIniUpdateSchema = {
|
|
1202
|
+
domain: z17.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1203
|
+
display_errors: z17.string().optional().describe("\u30A8\u30E9\u30FC\u5185\u5BB9\u3092\u753B\u9762\u306B\u51FA\u529B\uFF08On / Off\uFF09"),
|
|
1204
|
+
error_reporting: z17.string().optional().describe("\u30A8\u30E9\u30FC\u51FA\u529B\u30EC\u30D9\u30EB"),
|
|
1205
|
+
display_startup_errors: z17.string().optional().describe("\u8D77\u52D5\u6642\u30A8\u30E9\u30FC\u3092\u8868\u793A\uFF08On / Off\uFF09"),
|
|
1206
|
+
"session.auto_start": z17.string().optional().describe("\u30BB\u30C3\u30B7\u30E7\u30F3\u81EA\u52D5\u958B\u59CB\uFF080 / 1\uFF09"),
|
|
1207
|
+
"session.name": z17.string().optional().describe("\u30BB\u30C3\u30B7\u30E7\u30F3\u540D"),
|
|
1208
|
+
"session.use_cookies": z17.string().optional().describe("\u30BB\u30C3\u30B7\u30E7\u30F3ID\u306B\u30AF\u30C3\u30AD\u30FC\u3092\u4F7F\u7528\uFF080 / 1\uFF09"),
|
|
1209
|
+
"session.use_only_cookies": z17.string().optional().describe("\u30AF\u30C3\u30AD\u30FC\u306E\u307F\u3067\u30BB\u30C3\u30B7\u30E7\u30F3ID\u3092\u4FDD\u5B58\uFF080 / 1\uFF09"),
|
|
1210
|
+
"session.use_trans_sid": z17.string().optional().describe("URL\u3078\u30BB\u30C3\u30B7\u30E7\u30F3ID\u3092\u81EA\u52D5\u8A2D\u5B9A\uFF080 / 1\uFF09"),
|
|
1211
|
+
"session.cookie_lifetime": z17.string().optional().describe("\u30AF\u30C3\u30AD\u30FC\u6709\u52B9\u671F\u9593\uFF08\u79D2\uFF09"),
|
|
1212
|
+
"session.cookie_path": z17.string().optional().describe("\u30AF\u30C3\u30AD\u30FC\u3092\u6709\u52B9\u3068\u3059\u308B\u30D1\u30B9"),
|
|
1213
|
+
"session.cookie_domain": z17.string().optional().describe("\u30AF\u30C3\u30AD\u30FC\u3092\u6709\u52B9\u3068\u3059\u308B\u30C9\u30E1\u30A4\u30F3"),
|
|
1214
|
+
"mbstring.language": z17.string().optional().describe("\u30C7\u30D5\u30A9\u30EB\u30C8\u8A00\u8A9E"),
|
|
1215
|
+
"mbstring.internal_encoding": z17.string().optional().describe("\u5185\u90E8\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"),
|
|
1216
|
+
"mbstring.http_input": z17.string().optional().describe("HTTP\u5165\u529B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u5909\u63DB"),
|
|
1217
|
+
"mbstring.http_output": z17.string().optional().describe("HTTP\u51FA\u529B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u5909\u63DB"),
|
|
1218
|
+
"mbstring.encoding_translation": z17.string().optional().describe("\u5185\u90E8\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3078\u306E\u5909\u63DB\uFF08On / Off\uFF09"),
|
|
1219
|
+
"mbstring.detect_order": z17.string().optional().describe("\u6587\u5B57\u30B3\u30FC\u30C9\u691C\u51FA"),
|
|
1220
|
+
"mbstring.substitute_character": z17.string().optional().describe("\u7121\u52B9\u6587\u5B57\u306E\u4EE3\u66FF\u6587\u5B57"),
|
|
1221
|
+
max_execution_time: z17.string().optional().describe("\u6700\u5927\u5B9F\u884C\u6642\u9593\uFF08\u79D2\uFF09"),
|
|
1222
|
+
max_input_time: z17.string().optional().describe("\u5165\u529B\u30D1\u30FC\u30B9\u6700\u5927\u6642\u9593\uFF08\u79D2\uFF09"),
|
|
1223
|
+
memory_limit: z17.string().optional().describe("\u6700\u5927\u30E1\u30E2\u30EA"),
|
|
1224
|
+
post_max_size: z17.string().optional().describe("POST\u30C7\u30FC\u30BF\u6700\u5927\u30B5\u30A4\u30BA"),
|
|
1225
|
+
upload_max_filesize: z17.string().optional().describe("\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u30D5\u30A1\u30A4\u30EB\u6700\u5927\u30B5\u30A4\u30BA"),
|
|
1226
|
+
register_globals: z17.string().optional().describe("register_globals\uFF08On / Off\uFF09"),
|
|
1227
|
+
magic_quotes_gpc: z17.string().optional().describe("magic_quotes_gpc\uFF08On / Off\uFF09"),
|
|
1228
|
+
safe_mode: z17.string().optional().describe("safe_mode\uFF08On / Off\uFF09"),
|
|
1229
|
+
file_uploads: z17.string().optional().describe("HTTP\u30D5\u30A1\u30A4\u30EB\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\uFF08On / Off\uFF09"),
|
|
1230
|
+
allow_url_fopen: z17.string().optional().describe("allow_url_fopen\uFF08On / Off\uFF09"),
|
|
1231
|
+
allow_url_include: z17.string().optional().describe("allow_url_include\uFF08On / Off\uFF09")
|
|
1232
|
+
};
|
|
1233
|
+
var PHP_INI_API_KEYS = [
|
|
1234
|
+
"display_errors",
|
|
1235
|
+
"error_reporting",
|
|
1236
|
+
"display_startup_errors",
|
|
1237
|
+
"session.auto_start",
|
|
1238
|
+
"session.name",
|
|
1239
|
+
"session.use_cookies",
|
|
1240
|
+
"session.use_only_cookies",
|
|
1241
|
+
"session.use_trans_sid",
|
|
1242
|
+
"session.cookie_lifetime",
|
|
1243
|
+
"session.cookie_path",
|
|
1244
|
+
"session.cookie_domain",
|
|
1245
|
+
"mbstring.language",
|
|
1246
|
+
"mbstring.internal_encoding",
|
|
1247
|
+
"mbstring.http_input",
|
|
1248
|
+
"mbstring.http_output",
|
|
1249
|
+
"mbstring.encoding_translation",
|
|
1250
|
+
"mbstring.detect_order",
|
|
1251
|
+
"mbstring.substitute_character",
|
|
1252
|
+
"max_execution_time",
|
|
1253
|
+
"max_input_time",
|
|
1254
|
+
"memory_limit",
|
|
1255
|
+
"post_max_size",
|
|
1256
|
+
"upload_max_filesize",
|
|
1257
|
+
"register_globals",
|
|
1258
|
+
"magic_quotes_gpc",
|
|
1259
|
+
"safe_mode",
|
|
1260
|
+
"file_uploads",
|
|
1261
|
+
"allow_url_fopen",
|
|
1262
|
+
"allow_url_include"
|
|
1263
|
+
];
|
|
1264
|
+
function registerPhpIniTools(server, client, brand) {
|
|
1265
|
+
server.tool(serverToolName(brand, "list", "php_ini"), "php.ini\u8A2D\u5B9A\u3092\u53D6\u5F97", {
|
|
1266
|
+
domain: z17.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1267
|
+
}, async (args) => {
|
|
1268
|
+
const params = {};
|
|
1269
|
+
if (args.domain)
|
|
1270
|
+
params.domain = args.domain;
|
|
1271
|
+
return callApi(() => client.listPhpIni(params));
|
|
1272
|
+
});
|
|
1273
|
+
server.tool(serverToolName(brand, "update", "php_ini"), "php.ini\u8A2D\u5B9A\u3092\u66F4\u65B0\uFF08\u6307\u5B9A\u3057\u305F\u9805\u76EE\u306E\u307F\uFF09", phpIniUpdateSchema, async (args) => {
|
|
1274
|
+
const { domain, ...fields } = args;
|
|
1275
|
+
const data = {};
|
|
1276
|
+
for (const key of PHP_INI_API_KEYS) {
|
|
1277
|
+
const value = fields[key];
|
|
1278
|
+
if (value !== void 0)
|
|
1279
|
+
data[key] = value;
|
|
1280
|
+
}
|
|
1281
|
+
if (Object.keys(data).length === 0) {
|
|
1282
|
+
throw new Error(PARTIAL_UPDATE_EMPTY_MESSAGE5);
|
|
1283
|
+
}
|
|
1284
|
+
return callApi(() => client.updatePhpIni(domain, data));
|
|
1285
|
+
});
|
|
1286
|
+
server.tool(serverToolName(brand, "reset", "php_ini"), "php.ini\u8A2D\u5B9A\u3092\u521D\u671F\u5024\u306B\u623B\u3059", {
|
|
1287
|
+
domain: z17.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3")
|
|
1288
|
+
}, async ({ domain }) => callApi(() => client.resetPhpIni(domain)));
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
// ../core/dist/tools/server/wordpress-security.js
|
|
1292
|
+
import { z as z18 } from "zod";
|
|
1293
|
+
var enabledTargetSchema = z18.object({
|
|
1294
|
+
enabled: z18.boolean()
|
|
1295
|
+
});
|
|
1296
|
+
var foreignIpTargetSchema = z18.object({
|
|
1297
|
+
enabled: z18.boolean().optional(),
|
|
1298
|
+
allowed_ip_addresses: z18.array(z18.string()).optional()
|
|
1299
|
+
});
|
|
1300
|
+
var UPDATE_BLOCKS = [
|
|
1301
|
+
"comment_restriction",
|
|
1302
|
+
"login_attempt_limit",
|
|
1303
|
+
"foreign_ip_restriction",
|
|
1304
|
+
"ip_restriction"
|
|
1305
|
+
];
|
|
1306
|
+
var wordpressSecurityUpdateSchema = {
|
|
1307
|
+
domain: z18.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1308
|
+
comment_restriction: z18.object({
|
|
1309
|
+
bulk_post: enabledTargetSchema.optional(),
|
|
1310
|
+
foreign_post: enabledTargetSchema.optional()
|
|
1311
|
+
}).optional().describe("\u30B3\u30E1\u30F3\u30C8\u5236\u9650"),
|
|
1312
|
+
login_attempt_limit: z18.object({
|
|
1313
|
+
enabled: z18.boolean()
|
|
1314
|
+
}).optional().describe("\u30ED\u30B0\u30A4\u30F3\u8A66\u884C\u56DE\u6570\u5236\u9650"),
|
|
1315
|
+
foreign_ip_restriction: z18.object({
|
|
1316
|
+
dashboard: foreignIpTargetSchema.optional(),
|
|
1317
|
+
xml_rpc_api: foreignIpTargetSchema.optional(),
|
|
1318
|
+
rest_api: foreignIpTargetSchema.optional(),
|
|
1319
|
+
wlwmanifest: foreignIpTargetSchema.optional()
|
|
1320
|
+
}).optional().describe("\u56FD\u5916\u30A2\u30AF\u30BB\u30B9\u5236\u9650"),
|
|
1321
|
+
ip_restriction: z18.object({
|
|
1322
|
+
enabled: z18.boolean().optional(),
|
|
1323
|
+
allowed_ip_addresses: z18.array(z18.string()).optional()
|
|
1324
|
+
}).optional().describe("IP\u30A2\u30C9\u30EC\u30B9\u5236\u9650\uFF08\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\uFF09")
|
|
1325
|
+
};
|
|
1326
|
+
function buildUpdateBody(args) {
|
|
1327
|
+
const domain = args.domain;
|
|
1328
|
+
if (typeof domain !== "string" || domain === "") {
|
|
1329
|
+
throw new Error("domain \u306F\u5FC5\u9808\u3067\u3059");
|
|
1330
|
+
}
|
|
1331
|
+
const data = { domain };
|
|
1332
|
+
for (const key of UPDATE_BLOCKS) {
|
|
1333
|
+
if (args[key] !== void 0)
|
|
1334
|
+
data[key] = args[key];
|
|
1335
|
+
}
|
|
1336
|
+
if (!UPDATE_BLOCKS.some((key) => key in data)) {
|
|
1337
|
+
throw new Error("comment_restriction\u3001login_attempt_limit\u3001foreign_ip_restriction\u3001ip_restriction \u306E\u3044\u305A\u308C\u304B1\u3064\u4EE5\u4E0A\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
1338
|
+
}
|
|
1339
|
+
return data;
|
|
1340
|
+
}
|
|
1341
|
+
function registerWordPressSecurityTools(server, client, brand) {
|
|
1342
|
+
server.tool(serverToolName(brand, "get", "wordpress_security"), "WordPress\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u8A2D\u5B9A\u3092\u53D6\u5F97", {
|
|
1343
|
+
domain: z18.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1344
|
+
}, async (args) => {
|
|
1345
|
+
const params = {};
|
|
1346
|
+
if (args.domain)
|
|
1347
|
+
params.domain = args.domain;
|
|
1348
|
+
return callApi(() => client.getWordPressSecurity(params));
|
|
1349
|
+
});
|
|
1350
|
+
server.tool(serverToolName(brand, "update", "wordpress_security"), "WordPress\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u8A2D\u5B9A\u3092\u66F4\u65B0\uFF08\u6307\u5B9A\u3057\u305F\u30D6\u30ED\u30C3\u30AF\u306E\u307F\uFF09", wordpressSecurityUpdateSchema, async (args) => callApi(() => client.updateWordPressSecurity(buildUpdateBody(args))));
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
// ../core/dist/tools/server/x-accelerator.js
|
|
1354
|
+
import { z as z19 } from "zod";
|
|
1355
|
+
function registerXAcceleratorTools(server, client, brand) {
|
|
1356
|
+
server.tool(serverToolName(brand, "list", "x_accelerator"), "X\u30A2\u30AF\u30BB\u30E9\u30EC\u30FC\u30BF\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
1357
|
+
domain: z19.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1358
|
+
}, async (args) => {
|
|
1359
|
+
const params = {};
|
|
1360
|
+
if (args.domain)
|
|
1361
|
+
params.domain = args.domain;
|
|
1362
|
+
return callApi(() => client.listXAccelerator(params));
|
|
1363
|
+
});
|
|
1364
|
+
server.tool(serverToolName(brand, "update", "x_accelerator"), "X\u30A2\u30AF\u30BB\u30E9\u30EC\u30FC\u30BF\u8A2D\u5B9A\u3092\u5909\u66F4", {
|
|
1365
|
+
domain: z19.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1366
|
+
xaccelerator_status: z19.enum(["off", "v1", "v2"]).describe("X\u30A2\u30AF\u30BB\u30E9\u30EC\u30FC\u30BF\u8A2D\u5B9A\uFF08off / v1 / v2\uFF09")
|
|
1367
|
+
}, async ({ domain, xaccelerator_status }) => callApi(() => client.updateXAccelerator(domain, { xaccelerator_status })));
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
// ../core/dist/tools/server/server-cache.js
|
|
1371
|
+
import { z as z20 } from "zod";
|
|
1372
|
+
function registerServerCacheTools(server, client, brand) {
|
|
1373
|
+
server.tool(serverToolName(brand, "list", "server_cache"), "\u30B5\u30FC\u30D0\u30FC\u30AD\u30E3\u30C3\u30B7\u30E5\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
1374
|
+
domain: z20.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1375
|
+
}, async (args) => {
|
|
1376
|
+
const params = {};
|
|
1377
|
+
if (args.domain)
|
|
1378
|
+
params.domain = args.domain;
|
|
1379
|
+
return callApi(() => client.listServerCache(params));
|
|
1380
|
+
});
|
|
1381
|
+
server.tool(serverToolName(brand, "update", "server_cache"), "\u30B5\u30FC\u30D0\u30FC\u30AD\u30E3\u30C3\u30B7\u30E5\u8A2D\u5B9A\u3092\u5909\u66F4", {
|
|
1382
|
+
domain: z20.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1383
|
+
server_cache_status: z20.enum(["on", "off"]).describe("\u30B5\u30FC\u30D0\u30FC\u30AD\u30E3\u30C3\u30B7\u30E5\u8A2D\u5B9A\uFF08on / off\uFF09")
|
|
1384
|
+
}, async ({ domain, server_cache_status }) => callApi(() => client.updateServerCache(domain, { server_cache_status })));
|
|
1385
|
+
server.tool(serverToolName(brand, "clear_cache", "server_cache"), "\u30B5\u30FC\u30D0\u30FC\u30AD\u30E3\u30C3\u30B7\u30E5\u306E\u5185\u5BB9\u3092\u524A\u9664\uFF08\u30D1\u30FC\u30B8\uFF09", {
|
|
1386
|
+
domain: z20.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3")
|
|
1387
|
+
}, async ({ domain }) => callApi(() => client.clearServerCache(domain)));
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
// ../core/dist/tools/server/browser-cache.js
|
|
1391
|
+
import { z as z21 } from "zod";
|
|
1392
|
+
function registerBrowserCacheTools(server, client, brand) {
|
|
1393
|
+
server.tool(serverToolName(brand, "list", "browser_cache"), "\u30D6\u30E9\u30A6\u30B6\u30AD\u30E3\u30C3\u30B7\u30E5\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
1394
|
+
domain: z21.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1395
|
+
}, async (args) => {
|
|
1396
|
+
const params = {};
|
|
1397
|
+
if (args.domain)
|
|
1398
|
+
params.domain = args.domain;
|
|
1399
|
+
return callApi(() => client.listBrowserCache(params));
|
|
1400
|
+
});
|
|
1401
|
+
server.tool(serverToolName(brand, "update", "browser_cache"), "\u30D6\u30E9\u30A6\u30B6\u30AD\u30E3\u30C3\u30B7\u30E5\u8A2D\u5B9A\u3092\u5909\u66F4", {
|
|
1402
|
+
domain: z21.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1403
|
+
browser_cache_status: z21.enum(["all", "ignore-css-js", "off"]).describe("\u30D6\u30E9\u30A6\u30B6\u30AD\u30E3\u30C3\u30B7\u30E5\u8A2D\u5B9A\uFF08all / ignore-css-js / off\uFF09")
|
|
1404
|
+
}, async ({ domain, browser_cache_status }) => callApi(() => client.updateBrowserCache(domain, { browser_cache_status })));
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
// ../core/dist/tools/server/url-redirect.js
|
|
1408
|
+
import { z as z22 } from "zod";
|
|
1409
|
+
function registerUrlRedirectTools(server, client, brand) {
|
|
1410
|
+
server.tool(serverToolName(brand, "list", "url_redirect"), "\u30B5\u30A4\u30C8\u8EE2\u9001\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
1411
|
+
domain: z22.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1412
|
+
}, async (args) => {
|
|
1413
|
+
const params = {};
|
|
1414
|
+
if (args.domain)
|
|
1415
|
+
params.domain = args.domain;
|
|
1416
|
+
return callApi(() => client.listUrlRedirect(params));
|
|
1417
|
+
});
|
|
1418
|
+
server.tool(serverToolName(brand, "add", "url_redirect"), "\u30B5\u30A4\u30C8\u8EE2\u9001\u8A2D\u5B9A\u3092\u8FFD\u52A0", {
|
|
1419
|
+
domain: z22.string().describe("\u5951\u7D04\u30C9\u30E1\u30A4\u30F3"),
|
|
1420
|
+
from_host: z22.string().describe("\u8EE2\u9001\u5143\u30DB\u30B9\u30C8\uFF08FQDN\uFF09"),
|
|
1421
|
+
from_path: z22.string().optional().describe("\u8EE2\u9001\u5143\u30D1\u30B9\uFF08\u7701\u7565\u6642\u306F /\uFF09"),
|
|
1422
|
+
redirect_to_url: z22.string().describe("\u8EE2\u9001\u5148URL\uFF08http \u307E\u305F\u306F https\uFF09"),
|
|
1423
|
+
status_code: z22.union([z22.literal(301), z22.literal(302)]).describe("\u8EE2\u9001\u6642\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u30B3\u30FC\u30C9\uFF08301 / 302\uFF09")
|
|
1424
|
+
}, async (args) => {
|
|
1425
|
+
const data = {
|
|
1426
|
+
domain: args.domain,
|
|
1427
|
+
from_host: args.from_host,
|
|
1428
|
+
redirect_to_url: args.redirect_to_url,
|
|
1429
|
+
status_code: args.status_code
|
|
1430
|
+
};
|
|
1431
|
+
if (args.from_path !== void 0)
|
|
1432
|
+
data.from_path = args.from_path;
|
|
1433
|
+
return callApi(() => client.addUrlRedirect(data));
|
|
1434
|
+
});
|
|
1435
|
+
server.tool(serverToolName(brand, "delete", "url_redirect"), "\u30B5\u30A4\u30C8\u8EE2\u9001\u8A2D\u5B9A\u3092\u524A\u9664", {
|
|
1436
|
+
redirect_id: z22.string().describe("\u30B5\u30A4\u30C8\u8EE2\u9001\u8A2D\u5B9A\u306EID")
|
|
1437
|
+
}, async ({ redirect_id }) => callApi(() => client.deleteUrlRedirect(redirect_id)));
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
// ../core/dist/tools/server/access-deny.js
|
|
1441
|
+
import { z as z23 } from "zod";
|
|
1442
|
+
function registerAccessDenyTools(server, client, brand) {
|
|
1443
|
+
server.tool(serverToolName(brand, "list", "access_deny"), "\u30A2\u30AF\u30BB\u30B9\u62D2\u5426\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
1444
|
+
domain: z23.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1445
|
+
}, async (args) => {
|
|
1446
|
+
const params = {};
|
|
1447
|
+
if (args.domain)
|
|
1448
|
+
params.domain = args.domain;
|
|
1449
|
+
return callApi(() => client.listAccessDeny(params));
|
|
1450
|
+
});
|
|
1451
|
+
server.tool(serverToolName(brand, "add", "access_deny"), "\u30A2\u30AF\u30BB\u30B9\u62D2\u5426\u8A2D\u5B9A\u3092\u8FFD\u52A0", {
|
|
1452
|
+
domain: z23.string().describe("\u5951\u7D04\u30C9\u30E1\u30A4\u30F3"),
|
|
1453
|
+
ip_address: z23.string().describe("\u62D2\u5426IP\u30A2\u30C9\u30EC\u30B9\u30FB\u30DB\u30B9\u30C8\uFF08IPv4 / CIDR / \u90E8\u5206IP / \u30DB\u30B9\u30C8\u540D\uFF09"),
|
|
1454
|
+
memo: z23.string().optional().describe("\u30E1\u30E2\uFF08\u6700\u5927500\u6587\u5B57\uFF09")
|
|
1455
|
+
}, async (args) => {
|
|
1456
|
+
const data = {
|
|
1457
|
+
domain: args.domain,
|
|
1458
|
+
ip_address: args.ip_address
|
|
1459
|
+
};
|
|
1460
|
+
if (args.memo !== void 0)
|
|
1461
|
+
data.memo = args.memo;
|
|
1462
|
+
return callApi(() => client.addAccessDeny(data));
|
|
1463
|
+
});
|
|
1464
|
+
server.tool(serverToolName(brand, "update", "access_deny"), "\u30A2\u30AF\u30BB\u30B9\u62D2\u5426\u8A2D\u5B9A\u306E\u30E1\u30E2\u3092\u66F4\u65B0", {
|
|
1465
|
+
deny_id: z23.string().describe("\u30A2\u30AF\u30BB\u30B9\u62D2\u5426\u8A2D\u5B9A\u306EID"),
|
|
1466
|
+
memo: z23.string().describe("\u30E1\u30E2\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09")
|
|
1467
|
+
}, async ({ deny_id, memo }) => callApi(() => client.updateAccessDeny(deny_id, { memo })));
|
|
1468
|
+
server.tool(serverToolName(brand, "delete", "access_deny"), "\u30A2\u30AF\u30BB\u30B9\u62D2\u5426\u8A2D\u5B9A\u3092\u524A\u9664", {
|
|
1469
|
+
deny_id: z23.string().describe("\u30A2\u30AF\u30BB\u30B9\u62D2\u5426\u8A2D\u5B9A\u306EID")
|
|
1470
|
+
}, async ({ deny_id }) => callApi(() => client.deleteAccessDeny(deny_id)));
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
// ../core/dist/tools/server/xpagespeed.js
|
|
1474
|
+
import { z as z24 } from "zod";
|
|
1475
|
+
var XPAGESPEED_KEYS = [
|
|
1476
|
+
"xoptimize_images",
|
|
1477
|
+
"lazyload_images",
|
|
1478
|
+
"xoptimize_css",
|
|
1479
|
+
"lazyload_css",
|
|
1480
|
+
"xoptimize_javascript",
|
|
1481
|
+
"lazyload_javascript"
|
|
1482
|
+
];
|
|
1483
|
+
var xPageSpeedUpdateSchema = {
|
|
1484
|
+
domain: z24.string().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3"),
|
|
1485
|
+
xoptimize_images: z24.boolean().optional().describe("\u753B\u50CF\u6700\u9069\u5316\u306E\u6709\u52B9/\u7121\u52B9"),
|
|
1486
|
+
lazyload_images: z24.boolean().optional().describe("\u753B\u50CF\u9045\u5EF6\u8AAD\u307F\u8FBC\u307F\u306E\u6709\u52B9/\u7121\u52B9"),
|
|
1487
|
+
xoptimize_css: z24.boolean().optional().describe("CSS\u6700\u9069\u5316\u306E\u6709\u52B9/\u7121\u52B9"),
|
|
1488
|
+
lazyload_css: z24.boolean().optional().describe("CSS\u9045\u5EF6\u8AAD\u307F\u8FBC\u307F\u306E\u6709\u52B9/\u7121\u52B9"),
|
|
1489
|
+
xoptimize_javascript: z24.boolean().optional().describe("JavaScript\u6700\u9069\u5316\u306E\u6709\u52B9/\u7121\u52B9"),
|
|
1490
|
+
lazyload_javascript: z24.boolean().optional().describe("JavaScript\u9045\u5EF6\u8AAD\u307F\u8FBC\u307F\u306E\u6709\u52B9/\u7121\u52B9")
|
|
1491
|
+
};
|
|
1492
|
+
function buildUpdateBody2(args) {
|
|
1493
|
+
const { domain, ...fields } = args;
|
|
1494
|
+
if (typeof domain !== "string" || domain === "") {
|
|
1495
|
+
throw new Error("domain \u306F\u5FC5\u9808\u3067\u3059");
|
|
1496
|
+
}
|
|
1497
|
+
const data = {};
|
|
1498
|
+
for (const key of XPAGESPEED_KEYS) {
|
|
1499
|
+
if (fields[key] !== void 0)
|
|
1500
|
+
data[key] = fields[key];
|
|
1501
|
+
}
|
|
1502
|
+
if (Object.keys(data).length === 0) {
|
|
1503
|
+
throw new Error("\u66F4\u65B0\u3059\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u30921\u3064\u4EE5\u4E0A\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
1504
|
+
}
|
|
1505
|
+
if (Object.keys(data).length > 1) {
|
|
1506
|
+
throw new Error("1\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u5909\u66F4\u3067\u304D\u308B\u306E\u306F1\u3064\u306E\u6700\u9069\u5316\u6A5F\u80FD\u306E\u307F\u3067\u3059");
|
|
1507
|
+
}
|
|
1508
|
+
return data;
|
|
1509
|
+
}
|
|
1510
|
+
function registerXPageSpeedTools(server, client, brand) {
|
|
1511
|
+
server.tool(serverToolName(brand, "list", "xpagespeed"), "XPageSpeed\u8A2D\u5B9A\u4E00\u89A7\u3092\u53D6\u5F97", {
|
|
1512
|
+
domain: z24.string().optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u3067\u7D5E\u308A\u8FBC\u307F")
|
|
1513
|
+
}, async (args) => {
|
|
1514
|
+
const params = {};
|
|
1515
|
+
if (args.domain)
|
|
1516
|
+
params.domain = args.domain;
|
|
1517
|
+
return callApi(() => client.listXPageSpeed(params));
|
|
1518
|
+
});
|
|
1519
|
+
server.tool(serverToolName(brand, "update", "xpagespeed"), "XPageSpeed\u306E\u6700\u9069\u5316\u6A5F\u80FD\u3092\u5909\u66F4\uFF081\u30EA\u30AF\u30A8\u30B9\u30C8\u30671\u6A5F\u80FD\u306E\u307F\uFF09", xPageSpeedUpdateSchema, async (args) => {
|
|
1520
|
+
const { domain, ...fields } = args;
|
|
1521
|
+
const data = buildUpdateBody2({ domain, ...fields });
|
|
1522
|
+
return callApi(() => client.updateXPageSpeed(domain, data));
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
// ../core/dist/tools/server/auto-backup.js
|
|
1527
|
+
import { z as z25 } from "zod";
|
|
1528
|
+
var domainElementSchema = z25.object({
|
|
1529
|
+
domain: z25.string().describe("\u5951\u7D04\u30C9\u30E1\u30A4\u30F3"),
|
|
1530
|
+
elements: z25.array(z25.enum(["web", "setting", "mail"])).min(1).describe("\u5BFE\u8C61\u7A2E\u5225\uFF08web / setting / mail\uFF09")
|
|
1531
|
+
});
|
|
1532
|
+
function registerAutoBackupTools(server, client, brand) {
|
|
1533
|
+
server.tool(serverToolName(brand, "list", "auto_backup_backup_dates"), "\u9078\u629E\u53EF\u80FD\u306A\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u65E5\u4E00\u89A7\u3092\u53D6\u5F97", {}, async () => callApi(() => client.listAutoBackupBackupDates()));
|
|
1534
|
+
server.tool(serverToolName(brand, "list", "auto_backup"), "\u81EA\u52D5\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u7533\u8FBC\u5C65\u6B74\u4E00\u89A7\u3092\u53D6\u5F97", {}, async () => callApi(() => client.listAutoBackup()));
|
|
1535
|
+
server.tool(serverToolName(brand, "get", "auto_backup"), "\u81EA\u52D5\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u7533\u8FBC\u5C65\u6B74\u306E\u8A73\u7D30\u3092\u53D6\u5F97", {
|
|
1536
|
+
request_id: z25.string().describe("\u7533\u8FBCID\uFF08\u6B63\u306E\u6574\u6570\uFF09")
|
|
1537
|
+
}, async ({ request_id }) => callApi(() => client.getAutoBackup(request_id)));
|
|
1538
|
+
server.tool(serverToolName(brand, "create", "auto_backup"), "\u81EA\u52D5\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u306E\u53D6\u5F97\u307E\u305F\u306F\u5FA9\u5143\u3092\u7533\u3057\u8FBC\u3080", {
|
|
1539
|
+
backup_date: z25.string().describe("\u5BFE\u8C61\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u65E5\uFF08Y-m-d\uFF09"),
|
|
1540
|
+
operation_type: z25.enum(["fetch", "restore"]).describe("\u51E6\u7406\u7A2E\u5225\uFF08fetch: \u30C7\u30FC\u30BF\u53D6\u5F97 / restore: \u5FA9\u5143\uFF09"),
|
|
1541
|
+
scope: z25.enum(["all", "selected"]).describe("\u51E6\u7406\u65B9\u6CD5\uFF08all: \u30B5\u30FC\u30D0\u30FC\u9818\u57DF\u5168\u4F53 / selected: \u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u6307\u5B9A\uFF09"),
|
|
1542
|
+
domain_elements: z25.array(domainElementSchema).optional().describe("\u5BFE\u8C61\u30C9\u30E1\u30A4\u30F3\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\uFF08scope=selected \u306E\u3068\u304D\u5FC5\u9808\uFF09")
|
|
1543
|
+
}, async (args) => {
|
|
1544
|
+
const data = {
|
|
1545
|
+
backup_date: args.backup_date,
|
|
1546
|
+
operation_type: args.operation_type,
|
|
1547
|
+
scope: args.scope
|
|
1548
|
+
};
|
|
1549
|
+
if (args.domain_elements !== void 0) {
|
|
1550
|
+
data.domain_elements = args.domain_elements;
|
|
1551
|
+
}
|
|
1552
|
+
return callApi(() => client.createAutoBackup(data));
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
// ../core/dist/tools/server/mysql-backup.js
|
|
1557
|
+
import { z as z26 } from "zod";
|
|
1558
|
+
function registerMysqlBackupTools(server, client, brand) {
|
|
1559
|
+
server.tool(serverToolName(brand, "list", "mysql_backup_databases"), "MySQL\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u306E\u72B6\u614B\u3092\u53D6\u5F97", {}, async () => callApi(() => client.listMysqlBackupDatabases()));
|
|
1560
|
+
server.tool(serverToolName(brand, "list", "mysql_backup"), "MySQL\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u7533\u8FBC\u5C65\u6B74\u4E00\u89A7\u3092\u53D6\u5F97", {}, async () => callApi(() => client.listMysqlBackup()));
|
|
1561
|
+
server.tool(serverToolName(brand, "get", "mysql_backup"), "MySQL\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u7533\u8FBC\u5C65\u6B74\u8A73\u7D30\u3092\u53D6\u5F97", {
|
|
1562
|
+
request_id: z26.string().describe("\u7533\u8FBC\u8B58\u5225\u5B50\uFF0832\u6587\u5B57\u306E\u5C0F\u6587\u5B5716\u9032\u6570\uFF09")
|
|
1563
|
+
}, async ({ request_id }) => callApi(() => client.getMysqlBackup(request_id)));
|
|
1564
|
+
server.tool(serverToolName(brand, "create", "mysql_backup"), "MySQL\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u306E\u53D6\u5F97\u307E\u305F\u306F\u5FA9\u5143\u3092\u7533\u3057\u8FBC\u3080", {
|
|
1565
|
+
db_name: z26.string().describe("\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u540D"),
|
|
1566
|
+
backup_date: z26.string().describe("\u5BFE\u8C61\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u65E5\uFF08Y-m-d\uFF09"),
|
|
1567
|
+
operation_type: z26.enum(["fetch", "restore"]).describe("\u51E6\u7406\u7A2E\u5225\uFF08fetch: \u30C7\u30FC\u30BF\u53D6\u5F97 / restore: \u5FA9\u5143\uFF09")
|
|
1568
|
+
}, async (args) => callApi(() => client.createMysqlBackup(args)));
|
|
1569
|
+
}
|
|
1570
|
+
|
|
735
1571
|
// ../core/dist/tools/index.js
|
|
736
1572
|
function registerAllTools(server, client, brand) {
|
|
737
1573
|
registerServerInfoTools(server, client, brand);
|
|
@@ -739,10 +1575,28 @@ function registerAllTools(server, client, brand) {
|
|
|
739
1575
|
registerSshTools(server, client, brand);
|
|
740
1576
|
registerWordpressTools(server, client, brand);
|
|
741
1577
|
registerMailTools(server, client, brand);
|
|
1578
|
+
registerAutoReplyTools(server, client, brand);
|
|
1579
|
+
registerSmtpAbroadRestrictionTools(server, client, brand);
|
|
1580
|
+
registerDkimTools(server, client, brand);
|
|
1581
|
+
registerDmarcTools(server, client, brand);
|
|
1582
|
+
registerSpfTools(server, client, brand);
|
|
1583
|
+
registerSpamFilterTools(server, client, brand);
|
|
742
1584
|
registerFtpTools(server, client, brand);
|
|
743
1585
|
registerDatabaseTools(server, client, brand);
|
|
744
1586
|
registerDomainTools(server, client, brand);
|
|
745
1587
|
registerSslDnsTools(server, client, brand);
|
|
1588
|
+
registerResourceMonitorTools(server, client, brand);
|
|
1589
|
+
registerWafTools(server, client, brand);
|
|
1590
|
+
registerPhpIniTools(server, client, brand);
|
|
1591
|
+
registerWordPressSecurityTools(server, client, brand);
|
|
1592
|
+
registerXAcceleratorTools(server, client, brand);
|
|
1593
|
+
registerServerCacheTools(server, client, brand);
|
|
1594
|
+
registerBrowserCacheTools(server, client, brand);
|
|
1595
|
+
registerUrlRedirectTools(server, client, brand);
|
|
1596
|
+
registerAccessDenyTools(server, client, brand);
|
|
1597
|
+
registerXPageSpeedTools(server, client, brand);
|
|
1598
|
+
registerAutoBackupTools(server, client, brand);
|
|
1599
|
+
registerMysqlBackupTools(server, client, brand);
|
|
746
1600
|
}
|
|
747
1601
|
|
|
748
1602
|
// ../core/dist/index.js
|
|
@@ -786,7 +1640,7 @@ DNS\u30EC\u30B3\u30FC\u30C9\u7BA1\u7406\u3001PHP\u30D0\u30FC\u30B8\u30E7\u30F3\u
|
|
|
786
1640
|
// package.json
|
|
787
1641
|
var package_default = {
|
|
788
1642
|
name: "xserver-mcp",
|
|
789
|
-
version: "1.0
|
|
1643
|
+
version: "1.2.0",
|
|
790
1644
|
description: "Official MCP server for XServer API \u2014 manage your XServer hosting from AI assistants",
|
|
791
1645
|
type: "module",
|
|
792
1646
|
bin: {
|