@otwa/444host-mcp 1.0.0 → 1.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.0
4
+
5
+ - **Capacity pools** — 11 tools: `h444_list_pool_products`, `h444_quote_pool`,
6
+ `h444_list_pools`, `h444_get_pool`, `h444_create_pool`, `h444_quote_pool_resize`,
7
+ `h444_resize_pool`, `h444_list_pool_ips`, `h444_assign_pool_ips`,
8
+ `h444_create_pool_server`, `h444_terminate_pool`. Buy a block of
9
+ vCPU/RAM/disk/IPs once and fill it with as many VPS as you like, each billed at
10
+ $0.00.
11
+ - Both money paths (`create`, `resize`) require `confirm: true` and each has a
12
+ quoting tool beside it, so the figure you are shown is produced by the code that
13
+ takes the money. Terminate additionally requires `expectedLabel` to match.
14
+ - ⚑ `h444_create_pool_server` takes a plan **slug**, not an id — the earlier
15
+ schema said "Plan id" and led callers into a 500.
16
+ - Tool count is now 89.
17
+
18
+ ## 1.7.0
19
+
20
+ - **SEO IP Pack** (`seoip7pk`) is now sellable through `h444_purchase_vps_addon` — 7 dedicated IPs, each from a separate /24 subnet.
21
+ - `h444_list_vps_addons` returns 444host pricing in cents (`monthly_usd_cents`, `prorated_usd_cents`) instead of the upstream dollar fields, plus `owned` / `available` / `featured` / `ip_count`.
22
+ - `h444_purchase_vps_addon` now bills the customer: prorated wallet debit today, and the add-on renews with the server every month. Auto-refunds if it cannot be attached. Tool count stays 77.
23
+
24
+ ## 1.6.0
25
+
26
+ - Domain tools: `h444_get_domain_contact` / `h444_set_domain_contact` (registrant/WHOIS) and `h444_request_domain_auth_code` (EPP transfer code). Tool count is now 77.
27
+
28
+ ## 1.5.0
29
+
30
+ - Server extras: `h444_vps_sso` (console SSO), `h444_reset_vps_password` (confirm), `h444_list_vps_addons`, `h444_purchase_vps_addon` (orders:write, confirm). Tool count is now 74.
31
+
32
+ ## 1.4.0
33
+
34
+ - `h444_pay_invoice` (`billing:write`, opt-in, medium-confirm) — settle an unpaid invoice from wallet balance. Tool count is now 70.
35
+
36
+ ## 1.3.0
37
+
38
+ - Hosting control-panel tools (scope `hosting:manage`, opt-in): site stats,
39
+ log tail, PHP version, cron get/set, databases (list/add/remove), backups
40
+ (list/create/restore/delete), and the file manager (list/read/write/delete).
41
+ Destructive ops are medium-confirm gated. Streaming file/backup download,
42
+ upload, the browser-SSH terminal, and git deploy are on the REST API only.
43
+ Tool count is now 69.
44
+
45
+ ## 1.2.0
46
+
47
+ - Email-hosting tools (mail-panel parity): `h444_list_mail_domains`,
48
+ `h444_list_domain_mailboxes`/`h444_list_domain_aliases`,
49
+ `h444_list_mailboxes`/`h444_create_mailbox`/`h444_reset_mailbox_password`/
50
+ `h444_delete_mailbox`, `h444_create_alias`/`h444_delete_alias`. Reads carry
51
+ `mail:read`, mutations `mail:write`; mailbox delete is medium-confirm gated.
52
+ Tool count is now 53.
53
+
54
+ ## 1.1.0
55
+
56
+ - VPS resize tools: `h444_list_vps_plan_options` (`vps:read`) lists the plans a
57
+ server can switch to (same family, same disk); `h444_change_vps_plan`
58
+ (`vps:write`, medium-confirm) moves it to one — an in-place vCPU/RAM resize
59
+ that reboots the server (~1 min) and never changes disk. Only the recurring
60
+ price changes (no proration up, no credit down). Powers the new Cloud Router
61
+ line. Tool count is now 44.
62
+
3
63
  ## 1.0.0
4
64
 
5
65
  - Initial release.
package/README.md CHANGED
@@ -52,11 +52,14 @@ Environment:
52
52
 
53
53
  ## Tools
54
54
 
55
- 42 tools, each gated by your key's scopes:
55
+ 89 tools, each gated by your key's scopes:
56
56
 
57
57
  - **account** — `h444_get_account`
58
58
  - **ordering** — list plans at YOUR prices / OS templates; order VPS + hosting (`orders:write`, double-confirm + idempotent)
59
- - **vps** — list / get / stats / IPs+reverse-DNS; power, rename, set/clear PTR (`vps:write`); reinstall, terminate (`vps:destroy`, confirm + data-loss acknowledgement)
59
+ - **capacity pools** — catalogue / quote / list / get; create and resize (each needs `confirm: true` and has a quoting tool beside it, so the amount you are shown is produced by the code that charges it); the pool's own IP block (list / assign); build free VPS inside a pool; terminate (`vps:destroy`, with a typed-label guard)
60
+ - **hosting-panel** — stats, logs, PHP, cron, databases, backups, file read/write/delete (`hosting:manage`, opt-in)
61
+ - **mail** — list mail domains / mailboxes / aliases (`mail:read`); create/delete mailboxes + aliases, reset mailbox password (`mail:write`)
62
+ - **vps** — list / get / stats / IPs+reverse-DNS / plan-options; power, rename, set/clear PTR, change-plan/resize (`vps:write`); reinstall, terminate (`vps:destroy`, confirm + data-loss acknowledgement)
60
63
  - **hosting** — list / get; PHP version, SSL re-issue, suspend/unsuspend (`hosting:write`); terminate (`hosting:destroy`)
61
64
  - **domains** — list / get; update auto-renew / lock / WHOIS / nameservers (`domains:write`)
62
65
  - **billing** — invoices, wallet, transactions (`billing:read`)
@@ -4,7 +4,10 @@ exports.registerAllTools = registerAllTools;
4
4
  const account_1 = require("./account");
5
5
  const orders_1 = require("./orders");
6
6
  const servers_1 = require("./servers");
7
+ const pools_1 = require("./pools");
7
8
  const hosting_1 = require("./hosting");
9
+ const hosting_panel_1 = require("./hosting-panel");
10
+ const mail_1 = require("./mail");
8
11
  const domains_1 = require("./domains");
9
12
  const billing_1 = require("./billing");
10
13
  const tickets_1 = require("./tickets");
@@ -13,7 +16,10 @@ function registerAllTools(server, client) {
13
16
  (0, account_1.registerAccountTools)(server, client);
14
17
  (0, orders_1.registerOrderTools)(server, client);
15
18
  (0, servers_1.registerServerTools)(server, client);
19
+ (0, pools_1.registerPoolTools)(server, client);
16
20
  (0, hosting_1.registerHostingTools)(server, client);
21
+ (0, hosting_panel_1.registerHostingPanelTools)(server, client);
22
+ (0, mail_1.registerMailTools)(server, client);
17
23
  (0, domains_1.registerDomainTools)(server, client);
18
24
  (0, billing_1.registerBillingTools)(server, client);
19
25
  (0, tickets_1.registerTicketTools)(server, client);
@@ -1 +1 @@
1
- {"version":3,"file":"_register.js","sourceRoot":"","sources":["../../src/tools/_register.ts"],"names":[],"mappings":";;AAWA,4CASC;AAlBD,uCAAiD;AACjD,qCAA8C;AAC9C,uCAAgD;AAChD,uCAAiD;AACjD,uCAAgD;AAChD,uCAAiD;AACjD,uCAAgD;AAChD,yCAAkD;AAElD,SAAgB,gBAAgB,CAAC,MAAiB,EAAE,MAAqB;IACvE,IAAA,8BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,IAAA,2BAAkB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,IAAA,8BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,IAAA,8BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,IAAA,+BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC"}
1
+ {"version":3,"file":"_register.js","sourceRoot":"","sources":["../../src/tools/_register.ts"],"names":[],"mappings":";;AAcA,4CAYC;AAxBD,uCAAiD;AACjD,qCAA8C;AAC9C,uCAAgD;AAChD,mCAA4C;AAC5C,uCAAiD;AACjD,mDAA4D;AAC5D,iCAA2C;AAC3C,uCAAgD;AAChD,uCAAiD;AACjD,uCAAgD;AAChD,yCAAkD;AAElD,SAAgB,gBAAgB,CAAC,MAAiB,EAAE,MAAqB;IACvE,IAAA,8BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,IAAA,2BAAkB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,IAAA,yBAAiB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,IAAA,8BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,IAAA,yCAAyB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAA,wBAAiB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,IAAA,8BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,IAAA,6BAAmB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,IAAA,+BAAoB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.registerBillingTools = registerBillingTools;
4
4
  const zod_1 = require("zod");
5
+ const confirm_1 = require("../guards/confirm");
5
6
  const _helpers_1 = require("./_helpers");
6
7
  function registerBillingTools(server, client) {
7
8
  server.registerTool('h444_list_invoices', {
@@ -19,5 +20,10 @@ function registerBillingTools(server, client) {
19
20
  description: 'Recent wallet transactions.',
20
21
  inputSchema: { limit: zod_1.z.number().int().min(1).max(100).optional().describe('How many (default 20).') },
21
22
  }, (0, _helpers_1.safeHandler)(async ({ limit }) => (0, _helpers_1.jsonResult)(await client.request('/v1/billing/wallet/transactions', { query: { limit } }))));
23
+ server.registerTool('h444_pay_invoice', {
24
+ title: 'Pay an invoice from wallet balance',
25
+ description: 'Settle an unpaid invoice from the wallet balance (fails if insufficient — top up in the dashboard first). Spends money, so set confirm:true. Requires the opt-in billing:write scope.',
26
+ inputSchema: { id: zod_1.z.string().describe('Invoice id. Retrieve via h444_list_invoices.'), ...confirm_1.mediumConfirm },
27
+ }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/billing/invoices/${encodeURIComponent(id)}/pay`, { method: 'POST' }))));
22
28
  }
23
29
  //# sourceMappingURL=billing.js.map
@@ -1 +1 @@
1
- {"version":3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AAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE;KACvG,EACD,IAAA,sBAAW,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC9B,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,iCAAiC,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAC7F,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EAAE,uLAAuL;QACpM,WAAW,EAAE,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC,EAAE,GAAG,uBAAa,EAAE;KAC3G,EACD,IAAA,sBAAW,EAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,wBAAwB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAC1I,CAAC;AACJ,CAAC"}
@@ -18,5 +18,16 @@ function registerDomainTools(server, client) {
18
18
  nameservers: zod_1.z.array(zod_1.z.string()).max(6).optional().describe('Up to 6 nameservers (replaces the set).'),
19
19
  },
20
20
  }, (0, _helpers_1.safeHandler)(async ({ id, ...body }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/domains/${encodeURIComponent(id)}`, { method: 'PATCH', body }))));
21
+ server.registerTool('h444_get_domain_contact', { title: 'Get registrant (WHOIS) contact', description: 'The registrant contact used for new registrations (returns defaults if none saved).', inputSchema: {} }, (0, _helpers_1.safeHandler)(async () => (0, _helpers_1.jsonResult)(await client.request('/v1/domains/contact'))));
22
+ server.registerTool('h444_set_domain_contact', {
23
+ title: 'Set registrant (WHOIS) contact',
24
+ description: 'Create or update the registrant contact used for new domain registrations.',
25
+ inputSchema: {
26
+ first_name: zod_1.z.string(), last_name: zod_1.z.string(), email: zod_1.z.string(), phone: zod_1.z.string(),
27
+ address1: zod_1.z.string(), city: zod_1.z.string(), postal_code: zod_1.z.string(), country: zod_1.z.string().describe('ISO-2, e.g. TR.'),
28
+ org: zod_1.z.string().optional(), address2: zod_1.z.string().optional(), state: zod_1.z.string().optional(),
29
+ },
30
+ }, (0, _helpers_1.safeHandler)(async (body) => (0, _helpers_1.jsonResult)(await client.request('/v1/domains/contact', { method: 'PUT', body }))));
31
+ server.registerTool('h444_request_domain_auth_code', { title: 'Request EPP auth code', description: 'Email the EPP transfer (auth) code to the registrant. Domain must be active with the transfer lock off.', inputSchema: { id: zod_1.z.string().describe('Domain id.') } }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/domains/${encodeURIComponent(id)}/auth-code`, { method: 'POST' }))));
21
32
  }
22
33
  //# sourceMappingURL=domains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"domains.js","sourceRoot":"","sources":["../../src/tools/domains.ts"],"names":[],"mappings":";;AAOA,kDA6BC;AAnCD,6BAAwB;AAExB,yCAAqD;AAErD,MAAM,KAAK,GAAG,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC,EAAE,CAAC;AAE1F,SAAgB,mBAAmB,CAAC,MAAiB,EAAE,MAAqB;IAC1E,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,yCAAyC,EAAE,WAAW,EAAE,EAAE,EAAE,EAClG,IAAA,sBAAW,EAAC,KAAK,IAAI,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CACzE,CAAC;IAEF,MAAM,CAAC,YAAY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AE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC1F;KACF,EACD,IAAA,sBAAW,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAC9G,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,+BAA+B,EAC/B,EAAE,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,yGAAyG,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,EAAE,EAClN,IAAA,sBAAW,EAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,eAAe,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CACvI,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerHostingPanelTools = registerHostingPanelTools;
4
+ const zod_1 = require("zod");
5
+ const confirm_1 = require("../guards/confirm");
6
+ const _helpers_1 = require("./_helpers");
7
+ const idArg = { id: zod_1.z.string().describe('Hosting account UUID. Retrieve via h444_list_hosting.') };
8
+ /** Site control-panel tools (scope `hosting:manage`). Covers the automatable
9
+ * operations; streaming (file/backup download, upload), the browser-SSH
10
+ * terminal, and git deploy live on the REST API only. */
11
+ function registerHostingPanelTools(server, client) {
12
+ server.registerTool('h444_hosting_stats', { title: 'Hosting site stats', description: 'Disk/inode/bandwidth/mailbox usage for a hosting account.', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/stats`))));
13
+ server.registerTool('h444_hosting_logs', { title: 'Tail hosting logs', description: 'Tail the access or error log.', inputSchema: { ...idArg, kind: zod_1.z.enum(['access', 'error']).optional(), lines: zod_1.z.number().int().optional() } }, (0, _helpers_1.safeHandler)(async ({ id, kind, lines }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/logs?kind=${kind || 'access'}&lines=${lines || 100}`))));
14
+ server.registerTool('h444_hosting_set_php', { title: 'Set PHP version', description: 'Switch the account\'s PHP-FPM version.', inputSchema: { ...idArg, phpVersion: zod_1.z.string().describe('e.g. "8.3".') } }, (0, _helpers_1.safeHandler)(async ({ id, phpVersion }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/php-version`, { method: 'PATCH', body: { php_version: phpVersion } }))));
15
+ server.registerTool('h444_hosting_get_cron', { title: 'Get cron jobs', description: 'Read the crontab.', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/cron`))));
16
+ server.registerTool('h444_hosting_set_cron', { title: 'Set cron jobs', description: 'Replace the crontab.', inputSchema: { ...idArg, jobs: zod_1.z.array(zod_1.z.object({ schedule: zod_1.z.string(), command: zod_1.z.string(), comment: zod_1.z.string().nullable().optional() })), header: zod_1.z.string().optional() } }, (0, _helpers_1.safeHandler)(async ({ id, jobs, header }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/cron`, { method: 'PUT', body: { jobs, header } }))));
17
+ server.registerTool('h444_hosting_list_databases', { title: 'List hosting databases', description: 'Extra MySQL databases on the account.', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/databases`))));
18
+ server.registerTool('h444_hosting_add_database', { title: 'Add a hosting database', description: 'Create an extra MySQL database.', inputSchema: { ...idArg, suffix: zod_1.z.string().describe('Database name suffix.') } }, (0, _helpers_1.safeHandler)(async ({ id, suffix }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/databases`, { method: 'POST', body: { suffix } }))));
19
+ server.registerTool('h444_hosting_remove_database', { title: 'Remove a hosting database', description: 'Delete an extra MySQL database. Set confirm:true.', inputSchema: { ...idArg, name: zod_1.z.string().describe('Database name.'), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id, name }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/databases/${encodeURIComponent(name)}`, { method: 'DELETE' }))));
20
+ server.registerTool('h444_hosting_list_backups', { title: 'List hosting backups', description: 'Site backups (restore points).', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/backups`))));
21
+ server.registerTool('h444_hosting_create_backup', { title: 'Create a hosting backup', description: 'Create a new site backup.', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/backups`, { method: 'POST' }))));
22
+ server.registerTool('h444_hosting_restore_backup', { title: 'Restore a hosting backup', description: 'Restore the site from a backup — overwrites current files. Set confirm:true.', inputSchema: { ...idArg, backupId: zod_1.z.string(), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id, backupId }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/backups/${encodeURIComponent(backupId)}/restore`, { method: 'POST' }))));
23
+ server.registerTool('h444_hosting_delete_backup', { title: 'Delete a hosting backup', description: 'Delete a backup. Set confirm:true.', inputSchema: { ...idArg, backupId: zod_1.z.string(), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id, backupId }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/backups/${encodeURIComponent(backupId)}`, { method: 'DELETE' }))));
24
+ server.registerTool('h444_hosting_list_files', { title: 'List site files', description: 'List a directory in the site (default /public_html).', inputSchema: { ...idArg, path: zod_1.z.string().optional() } }, (0, _helpers_1.safeHandler)(async ({ id, path }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/files?path=${encodeURIComponent(path || '/public_html')}`))));
25
+ server.registerTool('h444_hosting_read_file', { title: 'Read a site file', description: 'Read a text file\'s contents.', inputSchema: { ...idArg, path: zod_1.z.string() } }, (0, _helpers_1.safeHandler)(async ({ id, path }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/files/read?path=${encodeURIComponent(path)}`))));
26
+ server.registerTool('h444_hosting_write_file', { title: 'Write a site file', description: 'Create or overwrite a text file.', inputSchema: { ...idArg, path: zod_1.z.string(), content: zod_1.z.string() } }, (0, _helpers_1.safeHandler)(async ({ id, path, content }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/files`, { method: 'PUT', body: { path, content } }))));
27
+ server.registerTool('h444_hosting_delete_file', { title: 'Delete a site file/dir', description: 'Delete a file or directory. Set confirm:true.', inputSchema: { ...idArg, path: zod_1.z.string(), recursive: zod_1.z.boolean().optional(), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id, path, recursive }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/hosting/${encodeURIComponent(id)}/files?path=${encodeURIComponent(path)}&recursive=${recursive ? 'true' : 'false'}`, { method: 'DELETE' }))));
28
+ }
29
+ //# sourceMappingURL=hosting-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosting-panel.js","sourceRoot":"","sources":["../../src/tools/hosting-panel.ts"],"names":[],"mappings":";;AAWA,8DAgGC;AA1GD,6BAAwB;AAExB,+CAAkD;AAClD,yCAAqD;AAErD,MA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AAE,SAAS,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,eAAe,kBAAkB,CAAC,EAAE,CAAC,eAAe,kBAAkB,CAAC,IAAI,CAAC,cAAc,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CACjO,CAAC;AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerMailTools = registerMailTools;
4
+ const zod_1 = require("zod");
5
+ const confirm_1 = require("../guards/confirm");
6
+ const _helpers_1 = require("./_helpers");
7
+ const domainIdArg = { domainId: zod_1.z.number().int().describe('Mail domain id. Retrieve via h444_list_mail_domains.') };
8
+ /** Email-hosting tools — parity with the mail panel. Mail domains follow hosting
9
+ * accounts (read-only); mailboxes + aliases are full CRUD. Reads carry
10
+ * mail:read, mutations carry mail:write. */
11
+ function registerMailTools(server, client) {
12
+ server.registerTool('h444_list_mail_domains', { title: 'List mail domains', description: 'Every mail domain on the account (they follow your hosting accounts).', inputSchema: {} }, (0, _helpers_1.safeHandler)(async () => (0, _helpers_1.jsonResult)(await client.request('/v1/mail/domains'))));
13
+ server.registerTool('h444_list_domain_mailboxes', { title: 'List a mail domain\'s mailboxes', description: 'Mailboxes under one mail domain.', inputSchema: domainIdArg }, (0, _helpers_1.safeHandler)(async ({ domainId }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/mail/domains/${domainId}/mailboxes`))));
14
+ server.registerTool('h444_list_domain_aliases', { title: 'List a mail domain\'s aliases', description: 'Forwarding aliases under one mail domain.', inputSchema: domainIdArg }, (0, _helpers_1.safeHandler)(async ({ domainId }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/mail/domains/${domainId}/aliases`))));
15
+ server.registerTool('h444_list_mailboxes', { title: 'List all mailboxes', description: 'Every mailbox across all your mail domains.', inputSchema: {} }, (0, _helpers_1.safeHandler)(async () => (0, _helpers_1.jsonResult)(await client.request('/v1/mail/mailboxes'))));
16
+ server.registerTool('h444_create_mailbox', {
17
+ title: 'Create a mailbox',
18
+ description: 'Create a mailbox on a mail domain.',
19
+ inputSchema: {
20
+ ...domainIdArg,
21
+ localPart: zod_1.z.string().describe('The part before @ (e.g. "info").'),
22
+ password: zod_1.z.string().describe('Mailbox password.'),
23
+ quotaMb: zod_1.z.number().int().optional().describe('Mailbox quota in MB (optional).'),
24
+ },
25
+ }, (0, _helpers_1.safeHandler)(async ({ domainId, localPart, password, quotaMb }) => (0, _helpers_1.jsonResult)(await client.request('/v1/mail/mailboxes', { method: 'POST', body: { domain_id: domainId, local_part: localPart, password, quota_mb: quotaMb } }))));
26
+ server.registerTool('h444_reset_mailbox_password', { title: 'Reset a mailbox password', description: 'Set a new password for a mailbox.', inputSchema: { id: zod_1.z.number().int().describe('Mailbox id.'), password: zod_1.z.string().describe('New password.') } }, (0, _helpers_1.safeHandler)(async ({ id, password }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/mail/mailboxes/${id}/password`, { method: 'PATCH', body: { password } }))));
27
+ server.registerTool('h444_delete_mailbox', { title: 'Delete a mailbox', description: 'Permanently delete a mailbox and its mail. Set confirm:true.', inputSchema: { id: zod_1.z.number().int().describe('Mailbox id.'), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/mail/mailboxes/${id}`, { method: 'DELETE' }))));
28
+ server.registerTool('h444_create_alias', {
29
+ title: 'Create a forwarding alias',
30
+ description: 'Create a forwarding alias (source → destination).',
31
+ inputSchema: {
32
+ ...domainIdArg,
33
+ sourceLocal: zod_1.z.string().describe('Alias source local-part (e.g. "sales").'),
34
+ destination: zod_1.z.string().describe('Destination email address.'),
35
+ },
36
+ }, (0, _helpers_1.safeHandler)(async ({ domainId, sourceLocal, destination }) => (0, _helpers_1.jsonResult)(await client.request('/v1/mail/aliases', { method: 'POST', body: { domain_id: domainId, source_local: sourceLocal, destination } }))));
37
+ server.registerTool('h444_delete_alias', { title: 'Delete a forwarding alias', description: 'Remove a forwarding alias.', inputSchema: { id: zod_1.z.number().int().describe('Alias id.') } }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/mail/aliases/${id}`, { method: 'DELETE' }))));
38
+ }
39
+ //# sourceMappingURL=mail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mail.js","sourceRoot":"","sources":["../../src/tools/mail.ts"],"names":[],"mappings":";;AAWA,8CAyEC;AAnFD,6BAAwB;AAExB,+CAAkD;AAClD,yCAAqD;AAErD,MAAM,WAAW,GAAG,EAAE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC,EAAE,CAAC;AAEpH;;6CAE6C;AAC7C,SAAgB,iBAAiB,CAAC,MAAiB,EAAE,MAAqB;IACxE,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB,EAAE,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,uEAAuE,EAAE,WAAW,EAAE,EAAE,EAAE,EACrI,IAAA,sBAAW,EAAC,KAAK,IAAI,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAC9E,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,4BAA4B,EAC5B,EAAE,KAAK,EAAE,iCAAiC,EAAE,WAAW,EAAE,kCAAkC,EAAE,WAAW,EAAE,WAAW,EAAE,EACvH,IAAA,sBAAW,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,oBAAoB,QAAQ,YAAY,CAAC,CAAC,CAAC,CAChH,CAAC;IAEF,MAAM,CAAC,YAAY,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AAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;YAC3E,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;SAC/D;KACF,EACD,IAAA,sBAAW,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,CAC3D,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CACnJ,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB,EAAE,KAAK,EAAE,2BAA2B,EAAE,WAAW,EAAE,4BAA4B,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,EAAE,EAC9I,IAAA,sBAAW,EAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAChH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerPoolTools = registerPoolTools;
4
+ const zod_1 = require("zod");
5
+ const errors_1 = require("../client/errors");
6
+ const confirm_1 = require("../guards/confirm");
7
+ const _helpers_1 = require("./_helpers");
8
+ const LABEL_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9 _-]*$/;
9
+ /** The four things a pool is sold in, in the units the API takes. Repeated in
10
+ * every schema description because the units are the one thing a model gets
11
+ * wrong here: `ram2gb: 16` is 32 GB, not 16. */
12
+ const UNITS = {
13
+ vcpu: zod_1.z.number().int().min(0).describe('vCPU count. Sold one at a time, so this IS the number of cores.'),
14
+ ram2gb: zod_1.z.number().int().min(0).describe('Memory in 2 GB BLOCKS — 16 means 32 GB, not 16 GB. Sold in 2 GB steps.'),
15
+ disk100: zod_1.z.number().int().min(0).describe('Storage in 100 GB BLOCKS — 10 means 1000 GB. Sold in 100 GB steps.'),
16
+ ip16: zod_1.z.number().int().min(0).describe('Public IPv4 in BLOCKS OF 16 — 1 means 16 addresses. Minimum 1: a pool with no addresses can host nothing, because every server takes at least one unless it is built private-only.'),
17
+ };
18
+ /** Both money paths carry the same double-confirm the ordering tools use — the
19
+ * model must have shown the user a figure it FETCHED before either fires. */
20
+ const spendConfirm = {
21
+ confirm: zod_1.z.literal(true).describe('Must be exactly `true`. Confirms the user saw the exact price (from the matching quote tool) and approved the charge.'),
22
+ iAcknowledgeWalletCharge: zod_1.z.literal(true).describe('Must be exactly `true`. This immediately debits the account wallet.'),
23
+ };
24
+ /**
25
+ * Capacity-pool tools.
26
+ *
27
+ * A pool inverts the normal product: the customer buys a block of
28
+ * vCPU/RAM/disk/IPs ONCE, and every server built inside it is free and never
29
+ * renews. That inversion is the thing to keep straight in every description — a
30
+ * model that treats a pool as "a big VPS" quotes the wrong number, and one that
31
+ * treats a pool server as billable tells the user they are paying twice for the
32
+ * same capacity.
33
+ *
34
+ * ⚑ Every figure here is in CENTS (`*_usd_cents`), matching the rest of the
35
+ * 444host API.
36
+ *
37
+ * ⚑ Two money paths exist and only two: buying a pool, and GROWING one. Both
38
+ * are gated and both have a quoting tool beside them, so the amount shown to
39
+ * the user is produced by the code that takes it. Everything else — assigning
40
+ * the pool's own addresses, building servers into it — is free by design, and
41
+ * saying so is part of the tool's job.
42
+ */
43
+ function registerPoolTools(server, client) {
44
+ // ── Catalogue + quoting ─────────────────────────────────────────────────
45
+ server.registerTool('h444_list_pool_products', {
46
+ title: 'List capacity-pool products and your unit prices',
47
+ description: 'Capacity-pool products on sale, each with its per-unit prices in CENTS (`pricing_cents`) and the ' +
48
+ 'bounds those units may fall between. A capacity pool is a block of vCPU / RAM / disk / IPv4 bought ' +
49
+ 'ONCE — servers built inside it are FREE, carry no monthly price of their own and never appear on a ' +
50
+ 'renewal. Units are sold in steps: 1 vCPU, 2 GB RAM, 100 GB disk, 16 IPs, so `per_2gb_ram` is the ' +
51
+ 'price of TWO gigabytes and `per_16_ip` the price of SIXTEEN addresses. Reseller keys are quoted ' +
52
+ 'their discounted rates here. Bounds are enforced server-side — a selection outside them is ' +
53
+ 'refused, not clamped.',
54
+ inputSchema: {},
55
+ }, (0, _helpers_1.safeHandler)(async () => (0, _helpers_1.jsonResult)(await client.request('/v1/pools/catalogue'))));
56
+ server.registerTool('h444_quote_pool', {
57
+ title: 'Price a capacity-pool selection',
58
+ description: 'Monthly price for a pool shape, with a per-unit breakdown and the `resolved` figures (vCPU, GB, ' +
59
+ 'addresses) so the user sees what they actually get rather than a count of blocks. Nothing is ' +
60
+ 'charged. ALWAYS call this and show the user `monthly_usd_cents` before h444_create_pool — the ' +
61
+ 'purchase recomputes the price server-side and charges that, so a number worked out by ' +
62
+ 'multiplying the unit prices yourself may not be the number taken.',
63
+ inputSchema: {
64
+ productId: zod_1.z.string().describe('Pool product id from h444_list_pool_products.'),
65
+ ...UNITS,
66
+ },
67
+ }, (0, _helpers_1.safeHandler)(async ({ productId, vcpu, ram2gb, disk100, ip16 }) => (0, _helpers_1.jsonResult)(await client.request('/v1/pools/quote', {
68
+ method: 'POST',
69
+ body: { productId, vcpu, ram2gb, disk100, ip16 },
70
+ }))));
71
+ // ── Reads ───────────────────────────────────────────────────────────────
72
+ server.registerTool('h444_list_pools', {
73
+ title: 'List capacity pools on this account',
74
+ description: 'Every capacity pool on the account, with its quotas (vcpu_quota / ram_mb_quota / disk_gb_quota / ' +
75
+ 'ip_quota), status, monthly price in cents and renewal date. A pool whose `renewal_status` is ' +
76
+ '`suspended_unpaid` has had every server inside it powered off for non-payment — topping the ' +
77
+ 'balance up brings it back with each machine in the state it was in. `rates_cents` are the ' +
78
+ 'per-unit prices that pool was SOLD at, which is what a resize is charged at.',
79
+ inputSchema: {},
80
+ }, (0, _helpers_1.safeHandler)(async () => (0, _helpers_1.jsonResult)(await client.request('/v1/pools'))));
81
+ server.registerTool('h444_get_pool', {
82
+ title: 'Get a capacity pool with its live usage',
83
+ description: 'One pool plus a `usage` block — the vCPU, RAM, disk, IPs and server count currently committed ' +
84
+ 'inside it — a `policy` block, the `bounds` a resize may move between, and the servers in it. ' +
85
+ 'Usage counts PROVISIONED resources, not live consumption: a powered-off server still holds its ' +
86
+ 'allocation, because the customer is entitled to switch it back on. Subtract usage from quota to ' +
87
+ 'answer "what will still fit". ' +
88
+ '⚑ Read `policy.vcpuOvercommit` rather than assuming a ratio — vCPU may be committed beyond the ' +
89
+ 'quota by that factor, and it is a server setting that can change.',
90
+ inputSchema: { id: zod_1.z.string().describe('Pool id from h444_list_pools.') },
91
+ }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/pools/${encodeURIComponent(id)}`))));
92
+ // ── Purchase ────────────────────────────────────────────────────────────
93
+ server.registerTool('h444_create_pool', {
94
+ title: 'Buy a capacity pool (SPENDS WALLET)',
95
+ description: 'Buys a capacity pool. The FULL monthly price is debited from the wallet immediately, the ' +
96
+ 'capacity is created with hard CPU and memory ceilings, the IPv4 block is reserved, and the pool ' +
97
+ 'gets its own private network segment (free) that its servers can talk to each other on. ' +
98
+ 'Call h444_quote_pool first and show the user the monthly price — this endpoint recomputes it ' +
99
+ 'server-side and charges that. 400s if the wallet cannot cover it or the selection is outside the ' +
100
+ 'product bounds. Afterwards, build free servers into it with h444_create_pool_server.',
101
+ inputSchema: {
102
+ productId: zod_1.z.string().describe('Pool product id from h444_list_pool_products.'),
103
+ label: zod_1.z
104
+ .string().min(1).max(64)
105
+ .regex(LABEL_REGEX, 'Label must start with alphanumeric and contain only letters/numbers/spaces/-/_')
106
+ .optional()
107
+ .describe('Human-readable name for the pool, e.g. "prod-cluster".'),
108
+ region: zod_1.z.string().max(64).optional().describe("Optional location slug — source: the product's `regions`."),
109
+ ...UNITS,
110
+ ...spendConfirm,
111
+ },
112
+ }, (0, _helpers_1.safeHandler)(async ({ productId, label, region, vcpu, ram2gb, disk100, ip16 }) => (0, _helpers_1.jsonResult)(await client.request('/v1/pools', {
113
+ method: 'POST',
114
+ body: { productId, label, region, vcpu, ram2gb, disk100, ip16 },
115
+ idempotent: true,
116
+ timeoutMs: 180_000,
117
+ }))));
118
+ // ── Resize ──────────────────────────────────────────────────────────────
119
+ server.registerTool('h444_quote_pool_resize', {
120
+ title: 'Price a pool resize without applying it',
121
+ description: 'Prices a new shape for an existing pool. Nothing is charged. Returns ' +
122
+ '`previous_monthly_usd_cents`, the new `monthly_usd_cents`, the `delta_usd_cents`, and ' +
123
+ '`charge_now_usd_cents` — the prorated amount that would be taken immediately for the days left ' +
124
+ 'in the current cycle. The same code produces this figure and takes the money in ' +
125
+ 'h444_resize_pool, so it is the number to show the user. ' +
126
+ 'Takes the WHOLE shape in absolute units, not deltas: to add 8 vCPU to a 16-vCPU pool, send 24.',
127
+ inputSchema: { id: zod_1.z.string().describe('Pool id.'), ...UNITS },
128
+ }, (0, _helpers_1.safeHandler)(async ({ id, vcpu, ram2gb, disk100, ip16 }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/pools/${encodeURIComponent(id)}/resize-quote`, {
129
+ method: 'POST',
130
+ body: { vcpu, ram2gb, disk100, ip16 },
131
+ }))));
132
+ server.registerTool('h444_resize_pool', {
133
+ title: 'Resize a capacity pool (GROWING SPENDS WALLET)',
134
+ description: "Changes a pool's shape. Takes the WHOLE shape in absolute units, never deltas. " +
135
+ '**Growing a pool is a purchase**: the new shape is re-priced at the rates the pool was SOLD at ' +
136
+ "(not today's catalogue) and the difference is charged to the wallet immediately, prorated for " +
137
+ 'the days left in the cycle — so call h444_quote_pool_resize first and show the user both the ' +
138
+ 'immediate charge and the new monthly. Shrinking is NOT refunded; the lower price applies from ' +
139
+ 'the next renewal, so confirm that too. ' +
140
+ "Refuses to shrink below what the pool's servers already hold (delete servers first) and 400s if " +
141
+ 'the balance will not cover an increase.',
142
+ inputSchema: { id: zod_1.z.string().describe('Pool id.'), ...UNITS, ...spendConfirm },
143
+ }, (0, _helpers_1.safeHandler)(async ({ id, vcpu, ram2gb, disk100, ip16 }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/pools/${encodeURIComponent(id)}`, {
144
+ method: 'PATCH',
145
+ body: { vcpu, ram2gb, disk100, ip16 },
146
+ timeoutMs: 120_000,
147
+ }))));
148
+ // ── Building servers inside a pool ───────────────────────────────────────
149
+ server.registerTool('h444_create_pool_server', {
150
+ title: 'Build a FREE server inside a capacity pool',
151
+ description: 'Creates a server inside the pool. **It is free** — nothing is charged now, it has no monthly ' +
152
+ 'price and it never renews; the pool carries the bill, and the build is checked against the ' +
153
+ "pool's quota instead of the balance. This is why it does NOT go through h444_order_vps, which " +
154
+ 'orders a billable server and spends the wallet. ' +
155
+ "⚑ `ipCount` chooses how many of the pool's own public addresses it takes (default 1) and they " +
156
+ 'cost nothing — they were bought with the pool. **`ipCount: 0` is private-only: no public ' +
157
+ 'interface, no default route, and NO INTERNET AT ALL** — it cannot fetch updates or packages. It ' +
158
+ "is reachable from the pool's other servers on the private network and through the web console, " +
159
+ 'and only a Linux image can be built that way. Say this to the user before choosing 0. ' +
160
+ 'The pool must be active; call h444_get_pool first to check what will still fit.',
161
+ inputSchema: {
162
+ id: zod_1.z.string().describe('Pool id — the server is built inside THIS pool.'),
163
+ productId: zod_1.z.string().describe("Plan SLUG from h444_list_products (category vps), e.g. \"vps-2\" — the shape of the machine. Its price is NOT charged: the pool pays."),
164
+ label: zod_1.z.string().max(64).optional().describe('Human-readable name shown in the panel.'),
165
+ hostname: zod_1.z.string().max(63).optional().describe('DNS-style hostname set inside the guest.'),
166
+ os: zod_1.z.string().optional().describe('OS family, e.g. "ubuntu". Defaults to the plan\'s default image.'),
167
+ osTemplate: zod_1.z.string().optional().describe('Specific image id, e.g. "ubuntu-24.04". Defaults to the plan\'s default.'),
168
+ ipCount: zod_1.z.number().int().min(0).max(16).optional()
169
+ .describe("Public addresses from the pool's block. Default 1. 0 = private-only with no internet (Linux only) — confirm with the user first."),
170
+ },
171
+ }, (0, _helpers_1.safeHandler)(async ({ id, productId, label, hostname, os, osTemplate, ipCount }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/pools/${encodeURIComponent(id)}/servers`, {
172
+ method: 'POST',
173
+ body: { productId, label, hostname, os, osTemplate, ipCount },
174
+ idempotent: true,
175
+ timeoutMs: 180_000,
176
+ }))));
177
+ // ── The pool's own IP block ─────────────────────────────────────────────
178
+ server.registerTool('h444_list_pool_ips', {
179
+ title: "List the pool's IPv4 block",
180
+ description: 'Every address the pool owns, with its current PTR and which server holds it. `assigned_to: null` ' +
181
+ 'means the address is free inside the block and can be handed to a server at no cost. ' +
182
+ '`is_primary` marks the address the guest OS is configured with. These addresses were bought with ' +
183
+ "the pool, so none is billed separately — to get MORE of them, resize the pool's `ip16`; add-ons " +
184
+ 'are refused on a pool server for the same reason.',
185
+ inputSchema: { id: zod_1.z.string().describe('Pool id.') },
186
+ }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/pools/${encodeURIComponent(id)}/ips`))));
187
+ server.registerTool('h444_assign_pool_ips', {
188
+ title: "Assign, move or return addresses in the pool's block",
189
+ description: "Moves addresses around inside the pool's own block, in one batch. Each change names an `ip` and " +
190
+ 'the `serverId` to hand it to; `serverId: null` returns it to the block. FREE — the block was ' +
191
+ 'bought with the pool, so nothing here touches the wallet. ' +
192
+ 'Addresses only ever move between the pool and the servers inside it, and naming a server outside ' +
193
+ 'this pool refuses the WHOLE batch with nothing written. ' +
194
+ '⚑ Two things this does NOT do. It does not configure the address inside the guest OS — after ' +
195
+ 'assigning one, the user must add it in the machine. And moving an address AWAY is immediately ' +
196
+ 'disruptive: it stops routing at once, so anything bound to it (sites, TLS, mail) breaks. ' +
197
+ 'Send every change in ONE call rather than one call per address: each call reprograms the router.',
198
+ inputSchema: {
199
+ id: zod_1.z.string().describe('Pool id.'),
200
+ changes: zod_1.z
201
+ .array(zod_1.z.object({
202
+ ip: zod_1.z.string().describe('IPv4 address that belongs to this pool — source: h444_list_pool_ips.'),
203
+ serverId: zod_1.z.string().nullable()
204
+ .describe('Server to hand the address to. Must be a server INSIDE this pool. `null` returns it to the block.'),
205
+ }))
206
+ .min(1).max(256)
207
+ .describe('The whole set of changes to apply at once. Validated as a unit — one bad entry refuses all of them.'),
208
+ confirm: zod_1.z.literal(true)
209
+ .describe('Must be exactly `true`. Moving an address away from a server breaks anything bound to it immediately — the user has been told.'),
210
+ },
211
+ }, (0, _helpers_1.safeHandler)(async ({ id, changes }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/pools/${encodeURIComponent(id)}/ips/apply`, {
212
+ method: 'POST',
213
+ body: { changes },
214
+ timeoutMs: 120_000,
215
+ }))));
216
+ // ── Teardown ────────────────────────────────────────────────────────────
217
+ server.registerTool('h444_terminate_pool', {
218
+ title: 'Terminate a capacity pool',
219
+ description: 'Tears a pool down. Every server inside it is POWERED OFF — they are preserved rather than ' +
220
+ 'destroyed — all IPv4 addresses are returned and the private network segment is deleted. There is ' +
221
+ 'NO refund for the remainder of the cycle. Requires the `vps:destroy` scope.\n\n' +
222
+ 'SAFETY: Before calling, (1) call h444_get_pool and read the user its label, quotas and how many ' +
223
+ 'servers are inside, (2) wait for explicit confirmation in chat, (3) pass `expectedLabel` matching ' +
224
+ 'the current label as a typo-guard. If labels differ, the call is rejected.',
225
+ inputSchema: {
226
+ id: zod_1.z.string().describe('Pool id.'),
227
+ expectedLabel: zod_1.z.string()
228
+ .describe("The pool's CURRENT label (from h444_get_pool). The call fails if this does not match — a typo-guard against tearing down the wrong pool."),
229
+ ...confirm_1.destructiveConfirm,
230
+ },
231
+ }, (0, _helpers_1.safeHandler)(async ({ id, expectedLabel }) => {
232
+ const current = await client.request(`/v1/pools/${encodeURIComponent(id)}`);
233
+ const actualLabel = current?.pool?.label || '';
234
+ if (actualLabel.trim() !== expectedLabel.trim()) {
235
+ throw new errors_1.Host444ApiError(`Refusing to terminate pool ${id}: expectedLabel "${expectedLabel}" does not match the ` +
236
+ `current label "${actualLabel}". Re-fetch via h444_get_pool, confirm with the user, ` +
237
+ 'and call again with the correct expectedLabel.', 400, 'label_mismatch');
238
+ }
239
+ return (0, _helpers_1.jsonResult)(await client.request(`/v1/pools/${encodeURIComponent(id)}`, {
240
+ method: 'DELETE',
241
+ timeoutMs: 180_000,
242
+ }));
243
+ }));
244
+ }
245
+ //# sourceMappingURL=pools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pools.js","sourceRoot":"","sources":["../../src/tools/pools.ts"],"names":[],"mappings":";;AAiDA,8CAmRC;AAnUD,6BAAwB;AAExB,6CAAmD;AACnD,+CAAuD;AACvD,yCAAqD;AAErD,MAAM,WAAW,GAAG,8BAA8B,CAAC;AAEnD;;iDAEiD;AACjD,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iEAAiE,CAAC;IACzG,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,wEAAwE,CAAC;IAClH,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oEAAoE,CAAC;IAC/G,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oLAAoL,CAAC;CAC7N,CAAC;AAEF;8EAC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ACJ,CAAC"}
@@ -11,6 +11,7 @@ function registerServerTools(server, client) {
11
11
  server.registerTool('h444_get_vps', { title: 'Get a VPS', description: 'Full detail for one VPS. Always call this before any destructive op so the user can confirm against the current label.', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}`))));
12
12
  server.registerTool('h444_get_vps_stats', { title: 'Live VPS stats', description: 'Latest CPU / memory / network / disk usage for a VPS.', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/stats`))));
13
13
  server.registerTool('h444_list_vps_ips', { title: 'List VPS IPs & reverse DNS', description: 'Every IP on a VPS with its current PTR (reverse DNS) record. zoneHosted:false means the PTR cannot be managed here.', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/ips`))));
14
+ server.registerTool('h444_list_vps_plan_options', { title: 'List VPS plan options (resize targets)', description: 'Plans a VPS can resize to — same family, same disk size. Returns current plan + options (cheapest first). Pass an option id to h444_change_vps_plan. Empty options = no same-disk plans to move to (Cloud Router S/M/L today).', inputSchema: idArg }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/plan-options`))));
14
15
  // ── Writes (vps:write) ───────────────────────────────────────────────────
15
16
  server.registerTool('h444_power_vps', {
16
17
  title: 'Power action on a VPS',
@@ -21,6 +22,15 @@ function registerServerTools(server, client) {
21
22
  ...confirm_1.mediumConfirm,
22
23
  },
23
24
  }, (0, _helpers_1.safeHandler)(async ({ id, action }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/power/${action}`, { method: 'POST' }))));
25
+ server.registerTool('h444_change_vps_plan', {
26
+ title: 'Change VPS plan (resize vCPU/RAM)',
27
+ description: 'Switch a VPS to another plan in the same family with the same disk size — an in-place vCPU/RAM resize. The VPS REBOOTS (~1 min); disk never changes. Only the recurring price changes (no proration up, no credit down). Call h444_list_vps_plan_options first for valid productIds, and confirm with the user (it reboots).',
28
+ inputSchema: {
29
+ ...idArg,
30
+ productId: zod_1.z.string().describe('Target plan id — an option id from h444_list_vps_plan_options.'),
31
+ ...confirm_1.mediumConfirm,
32
+ },
33
+ }, (0, _helpers_1.safeHandler)(async ({ id, productId }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/change-plan`, { method: 'POST', body: { productId } }))));
24
34
  server.registerTool('h444_rename_vps', {
25
35
  title: 'Rename a VPS',
26
36
  description: 'Change the display label.',
@@ -76,5 +86,10 @@ function registerServerTools(server, client) {
76
86
  }
77
87
  return (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}`, { method: 'DELETE' }));
78
88
  }));
89
+ server.registerTool('h444_vps_sso', { title: 'Console SSO for a VPS', description: 'Returns a short-lived URL to the browser VM console for this server.', inputSchema: { id: zod_1.z.string().describe('VPS UUID.') } }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/sso`, { method: 'POST' }))));
90
+ server.registerTool('h444_reset_vps_password', { title: 'Reset VPS root password', description: 'Rotate the server root/admin password; the new password is returned once (SENSITIVE — summarise, don\'t paste). Set confirm:true.', inputSchema: { id: zod_1.z.string().describe('VPS UUID.'), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/password-reset`, { method: 'POST' }))));
91
+ server.registerTool('h444_list_vps_addons', { title: 'List VPS add-ons', description: 'Add-ons available/attached for this server — SEO IP Pack (7 IPs from distinct /24 subnets), extra IPs, backups. Prices in cents: monthly_usd_cents recurs, prorated_usd_cents is what a purchase costs today. Only ONE add-on per type may be active, so an entry with owned:true blocks the other tiers of that type until it is removed.', inputSchema: { id: zod_1.z.string().describe('VPS UUID.') } }, (0, _helpers_1.safeHandler)(async ({ id }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/addons`))));
92
+ server.registerTool('h444_purchase_vps_addon', { title: 'Purchase a VPS add-on', description: 'Buy an add-on for the server — DEBITS your wallet balance immediately, prorated to the end of the current cycle, and the add-on then renews with the server EVERY MONTH. Requires the opt-in orders:write scope. Only one add-on per type can be active: to change tier (8 IPs to 16 IPs) call h444_remove_vps_addon first. Set confirm:true.', inputSchema: { id: zod_1.z.string().describe('VPS UUID.'), addonId: zod_1.z.string().describe('Add-on id from h444_list_vps_addons, e.g. "seoip7pk" for the SEO IP Pack.'), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id, addonId }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/addons`, { method: 'POST', body: { addonId } }))));
93
+ server.registerTool('h444_remove_vps_addon', { title: 'Remove a VPS add-on', description: 'Cancel an add-on. NO REFUND is issued for the remainder of the current cycle — the recurring price drops from the NEXT renewal onward. For IP add-ons this is immediate and disruptive: the addresses are released and stop routing to the server, so anything bound to them (websites, SSL, mail) breaks — tell the user to unconfigure them in the guest OS first. Uses vps:write, not orders:write, because it spends nothing. Set confirm:true.', inputSchema: { id: zod_1.z.string().describe('VPS UUID.'), addonId: zod_1.z.string().describe('Add-on id currently attached, from h444_list_vps_addons.'), ...confirm_1.mediumConfirm } }, (0, _helpers_1.safeHandler)(async ({ id, addonId }) => (0, _helpers_1.jsonResult)(await client.request(`/v1/vps/${encodeURIComponent(id)}/addons/${encodeURIComponent(addonId)}`, { method: 'DELETE' }))));
79
94
  }
80
95
  //# sourceMappingURL=servers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"servers.js","sourceRoot":"","sources":["../../src/tools/servers.ts"],"names":[],"mappings":";;AAQA,kDA6HC;AApID,6BAAw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,EAAE,EAAE,EACvoB,IAAA,sBAAW,EAAC,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAA,qBAAU,EAAC,MAAM,MAAM,CAAC,OAAO,CAAC,WAAW,kBAAkB,CAAC,EAAE,CAAC,WAAW,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAC1K,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otwa/444host-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.8.0",
4
4
  "description": "Model Context Protocol server for 444host.com — manage VPS, hosting, domains, billing, tickets and webhooks, and place real orders, from Claude and other MCP-capable AI tools.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://444host.com/developers",