monacloud-mcp 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -164,6 +164,7 @@ AI tra tên, báo giá VND đã VAT, hỏi chủ thể, mua .vn/.com bằng ví
164
164
  | `cloud_domain_registrant_get` / `cloud_domain_registrant_set` | Chủ thể đăng ký (.vn cá nhân cần CCCD, tổ chức cần MST) |
165
165
  | `cloud_domain_buy` | Mua thẳng bằng ví khi đã đăng nhập; 402 → `cloud_topup` in QR |
166
166
  | `cloud_domain_verify_start` / `cloud_domain_verify_status` / `cloud_domain_wait` | Hồ sơ .vn + chờ active |
167
+ | `cloud_domain_renew` | Gia hạn: dry_run báo giá → duyệt → trừ ví VND |
167
168
  | `cloud_domain_dns_*` / `cloud_domain_ns_set` / `cloud_domain_attach` / `cloud_domain_health` | DNS, NS, gắn app, sức khoẻ |
168
169
 
169
170
  Giữ chỗ chỉ khoá tên trong hệ MONA Cloud (`hold_scope=monacloud`), không giữ ở registry — tên đẹp thì trả sớm. Không gọi registrar tới khi tiền vào và có tài khoản nhận. Prompt `mua-ten-mien-monacloud(keyword?, app_id?)` dẫn trọn luồng.
package/dist/domains.js CHANGED
@@ -171,6 +171,18 @@ export function registerDomainTools(server, clients) {
171
171
  id: objectId.describe('Order ID tên miền cần kiểm tra.'),
172
172
  }).strict(),
173
173
  }, ({ id }) => runTool(() => clients.vibecloud(`/api/domains/${encodeURIComponent(id)}/health`)));
174
+ server.registerTool('cloud_domain_renew', {
175
+ title: 'Gia hạn tên miền (trừ ví VND)',
176
+ description: [
177
+ 'Gia hạn tên miền đã mua qua MONA Cloud. LUÔN gọi dry_run=true trước để lấy price_vnd (đã VAT), HỎI người dùng duyệt số tiền, rồi gọi lại dry_run=false — lúc đó trừ ví VND và gia hạn thật ở registrar.',
178
+ '402 insufficient_balance → cloud_topup in QR cho người dùng quét, chờ paid rồi gọi lại. 502 retryable → tiền đang giữ chờ đối soát, đừng gọi lại liên tục; báo người dùng.',
179
+ ].join(' '),
180
+ inputSchema: z.object({
181
+ id: objectId.describe('Order ID tên miền (từ cloud_domain_list / cloud_domain_buy).'),
182
+ billing_cycle: z.number().int().min(12).max(120).describe('Số tháng gia hạn, bội số 12 (12 = 1 năm).'),
183
+ dry_run: z.boolean().optional().describe('true = chỉ báo giá, không trừ tiền. Mặc định true để an toàn.'),
184
+ }).strict(),
185
+ }, ({ id, billing_cycle, dry_run }) => runTool(() => clients.guardedVibecloud(`/api/domains/${encodeURIComponent(id)}/renew`, { method: 'POST', body: { billing_cycle, dry_run: dry_run !== false } }, false)));
174
186
  server.registerTool('cloud_domain_wait', {
175
187
  title: 'Chờ tên miền active',
176
188
  description: 'Long-poll cho đến khi tên miền chuyển sang active/failed (mặc định timeout=60s). Dùng sau cloud_domain_buy để chờ MONA Host xử lý.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monacloud-mcp",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "MCP server for MONA Cloud — deploy apps (Vercel alternative), Supabase-compatible Postgres/Auth/Storage bases (Supabase alternative), VND wallet, MONA Pay & Mail — for AI agents (Claude, Cursor, Codex) in Vietnam.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://monacloud.vn",