helipod-mcp 0.5.11 → 0.5.13

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/dist/index.js CHANGED
@@ -34831,7 +34831,7 @@ class HelipodClient {
34831
34831
  const details = json2?.details && typeof json2.details === "object" && !Array.isArray(json2.details) ? json2.details : undefined;
34832
34832
  throw new HelipodError(res.status, json2?.code, retry ? `${msg} (retry after ${retry}s)` : String(msg), details);
34833
34833
  }
34834
- return json2 && "data" in json2 ? json2.data : json2;
34834
+ return json2 && "data" in json2 ? json2.data : json2 ?? (text || null);
34835
34835
  }
34836
34836
  }
34837
34837
 
@@ -34875,7 +34875,7 @@ function purchaseKey(dryRun, given) {
34875
34875
 
34876
34876
  // src/tools/containers.ts
34877
34877
  var id = (what) => exports_external.string().uuid().describe(`${what} id (UUID)`);
34878
- var dryRun = exports_external.boolean().optional().describe("true: return the daily cost (IDR) only, change nothing");
34878
+ var dryRun = exports_external.boolean().optional().describe("true: return the cost only (dailyCost list price, walletDailyCost what the wallet pays after the bundle), change nothing");
34879
34879
  var idem = exports_external.string().min(8).max(128).optional().describe("Idempotency-Key: a retry with the same value returns the first result instead of doing it twice");
34880
34880
  var C = "/containers";
34881
34881
  var port = exports_external.object({
@@ -34884,6 +34884,14 @@ var port = exports_external.object({
34884
34884
  public: exports_external.boolean().optional().describe("http ports: give it a *.helipod.app domain (default true)")
34885
34885
  });
34886
34886
  var containerTools = [
34887
+ defineTool({
34888
+ name: "get_bundle",
34889
+ title: "Container bundle",
34890
+ kind: "read",
34891
+ description: "The account's container bundle: whether one is active, until when, quota used / max (vCPU, GB RAM, GB storage), what it covers and what it does not. Container services within the quota cost the wallet NOTHING: read this before telling the user to top up for a container deploy. The bundle covers containers only (not VPS, databases, email, domains or AI).",
34892
+ input: {},
34893
+ run: (_a3, api2) => api2.api("GET", `${C}/bundle`)
34894
+ }),
34887
34895
  defineTool({
34888
34896
  name: "list_projects",
34889
34897
  title: "List projects",
@@ -35029,7 +35037,7 @@ var containerTools = [
35029
35037
  name: "create_service",
35030
35038
  title: "Create service",
35031
35039
  kind: "write",
35032
- description: "Create a service from a container image, a Git repository or an inline Dockerfile, and (unless deploy=false) start its first deploy. Private GitHub / GitLab repos work once connected (get_git_connections, list_git_repos); such services also redeploy on every push. A private repo that is not connected is refused (409 GITHUB_NOT_CONNECTED / GITLAB_NOT_CONNECTED / REPO_NOT_ACCESSIBLE, nothing created): give the user details.connectUrl and retry after they connect. COSTS MONEY once deployed (billed daily from the wallet): call with dryRun=true first, show the dailyCost to the user and get their OK.",
35040
+ description: "Create a service from a container image, a Git repository or an inline Dockerfile, and (unless deploy=false) start its first deploy. Private GitHub / GitLab repos work once connected (get_git_connections, list_git_repos); such services also redeploy on every push. A private repo that is not connected is refused (409 GITHUB_NOT_CONNECTED / GITLAB_NOT_CONNECTED / REPO_NOT_ACCESSIBLE, nothing created): give the user details.connectUrl and retry after they connect. COSTS MONEY once deployed, beyond the account's bundle: billed daily, from the bundle quota first and the wallet only beyond it. Call with dryRun=true first, tell the user what the wallet pays (walletDailyCost) and get their OK. Before saying a price, read walletDailyCost (what the wallet really pays per day) and bundle: with an active bundle that covers it (bundle.coversIt, walletDailyCost 0) nothing is charged and NO top-up is needed, even with a Rp 0 balance.",
35033
35041
  input: {
35034
35042
  environmentId: id("Environment"),
35035
35043
  name: exports_external.string().regex(/^[A-Za-z][A-Za-z0-9_-]{0,39}$/).describe("Service name (letters, digits, _ -; starts with a letter). Also used in references like ${{name.KEY}}"),
@@ -35047,6 +35055,7 @@ var containerTools = [
35047
35055
  ram: exports_external.number().int().min(128).max(8192).optional().describe("MB, multiple of 128"),
35048
35056
  startCommand: exports_external.string().optional(),
35049
35057
  healthcheckPath: exports_external.string().optional().describe("HTTP path answering 2xx when ready, e.g. /health"),
35058
+ healthcheckTimeout: exports_external.number().int().min(1).max(3600).optional().describe("Seconds the first start may take before the health check counts (default from the platform)"),
35050
35059
  deploy: exports_external.boolean().optional().describe("false: create without deploying (nothing is charged)"),
35051
35060
  dryRun,
35052
35061
  idempotencyKey: idem
@@ -35068,7 +35077,7 @@ var containerTools = [
35068
35077
  cpu: a.cpu,
35069
35078
  ram: a.ram,
35070
35079
  startCommand: a.startCommand,
35071
- healthcheck: a.healthcheckPath ? { path: a.healthcheckPath } : undefined,
35080
+ healthcheck: a.healthcheckPath ? { path: a.healthcheckPath, timeout: a.healthcheckTimeout } : undefined,
35072
35081
  deploy: a.deploy
35073
35082
  }
35074
35083
  });
@@ -35111,7 +35120,7 @@ var containerTools = [
35111
35120
  name: "deploy_service",
35112
35121
  title: "Deploy service",
35113
35122
  kind: "write",
35114
- description: "Start a new deployment (Git services build the latest commit). COSTS MONEY: charges today's cost when the build starts, refunded if it fails. dryRun=true returns the cost only. The deployment runs in the background; get_deployment returns its status.",
35123
+ description: "Start a new deployment (Git services build the latest commit). COSTS MONEY beyond the bundle: charges today's cost when the build starts (refunded if it fails), nothing within an active bundle's quota. dryRun=true returns the cost only. Before saying a price, read walletDailyCost (what the wallet really pays per day) and bundle: with an active bundle that covers it (bundle.coversIt, walletDailyCost 0) nothing is charged and NO top-up is needed, even with a Rp 0 balance. The deployment runs in the background; get_deployment returns its status.",
35115
35124
  input: { serviceId: id("Service"), dryRun, idempotencyKey: idem },
35116
35125
  run: (a, api2) => api2.api("POST", `${C}/services/${a.serviceId}/deployments`, { query: { dryRun: a.dryRun ? "true" : undefined }, idempotencyKey: a.idempotencyKey })
35117
35126
  }),
@@ -35198,6 +35207,14 @@ var containerTools = [
35198
35207
  },
35199
35208
  run: (a, api2) => api2.api("POST", `${C}/services/${a.serviceId}/domains`, { body: { kind: a.kind, domain: a.domain, port: a.port, protocol: a.protocol } })
35200
35209
  }),
35210
+ defineTool({
35211
+ name: "verify_service_domain",
35212
+ title: "Check custom domain DNS",
35213
+ kind: "write",
35214
+ description: "Check a custom domain's DNS now instead of waiting for the automatic check. Answers the domain with its DNS state (verified, or what is still wrong); the certificate follows once the record points to Helipod (the record to add is in list_service_domains).",
35215
+ input: { serviceId: id("Service"), domainId: id("Domain") },
35216
+ run: (a, api2) => api2.api("POST", `${C}/services/${a.serviceId}/domains/${a.domainId}/verify`)
35217
+ }),
35201
35218
  defineTool({
35202
35219
  name: "remove_service_domain",
35203
35220
  title: "Remove domain from service",
@@ -35219,7 +35236,7 @@ var containerTools = [
35219
35236
  title: "Scale service",
35220
35237
  kind: "write",
35221
35238
  idempotent: true,
35222
- description: "Change replicas, CPU or RAM (applies right away). COSTS MONEY on increase: call with dryRun=true first to show currentDailyCost vs newDailyCost and get the user's OK.",
35239
+ description: "Change replicas, CPU or RAM (applies right away). An increase COSTS MONEY unless the bundle covers it: call with dryRun=true first to show currentDailyCost vs newDailyCost and walletDailyCost, and get the user's OK. Before saying a price, read walletDailyCost (what the wallet really pays per day) and bundle: with an active bundle that covers it (bundle.coversIt, walletDailyCost 0) nothing is charged and NO top-up is needed, even with a Rp 0 balance.",
35223
35240
  input: {
35224
35241
  serviceId: id("Service"),
35225
35242
  replicas: exports_external.number().int().min(1).max(20).optional(),
@@ -35267,7 +35284,7 @@ var containerTools = [
35267
35284
  name: "resize_volume",
35268
35285
  title: "Resize volume",
35269
35286
  kind: "write",
35270
- description: "Change a volume's size (1-50 GB; never below the space already used). A larger volume COSTS MONEY: it raises the daily cost, charged pro rata when the service is redeployed and in full from the next renewal. dryRun=true returns currentDailyCost and newDailyCost (IDR) without changing anything. Applies on the next deploy.",
35287
+ description: "Change a volume's size (1-50 GB; never below the space already used). A larger volume COSTS MONEY: it raises the daily cost, charged pro rata when the service is redeployed and in full from the next renewal. dryRun=true returns currentDailyCost, newDailyCost and walletDailyCost (IDR) without changing anything. Applies on the next deploy. Before saying a price, read walletDailyCost (what the wallet really pays per day) and bundle: with an active bundle that covers it (bundle.coversIt, walletDailyCost 0) nothing is charged and NO top-up is needed, even with a Rp 0 balance.",
35271
35288
  input: {
35272
35289
  serviceId: id("Service"),
35273
35290
  volumeId: id("Volume"),
@@ -35389,20 +35406,21 @@ var containerTools = [
35389
35406
  name: "deploy_template",
35390
35407
  title: "Deploy template",
35391
35408
  kind: "write",
35392
- description: "Create every service of a template in an environment and deploy them. COSTS MONEY (each service is billed daily).",
35409
+ description: "Create every service of a template in an environment and deploy them. COSTS MONEY beyond the bundle: each service is billed daily (bundle quota first, then the wallet). Call with dryRun=true first. " + "Before saying a price, read walletDailyCost (what the wallet really pays per day) and bundle: with an active bundle that covers it (bundle.coversIt, walletDailyCost 0) nothing is charged and NO top-up is needed, even with a Rp 0 balance.",
35393
35410
  input: {
35394
35411
  environmentId: id("Environment"),
35395
35412
  slug: exports_external.string().regex(/^[a-z0-9][a-z0-9-]{0,79}$/),
35396
35413
  inputs: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Answers to the template's inputs"),
35414
+ dryRun,
35397
35415
  idempotencyKey: idem
35398
35416
  },
35399
- run: (a, api2) => api2.api("POST", `${C}/environments/${a.environmentId}/templates/${a.slug}`, { body: { inputs: a.inputs }, idempotencyKey: a.idempotencyKey })
35417
+ run: (a, api2) => api2.api("POST", `${C}/environments/${a.environmentId}/templates/${a.slug}`, { body: { inputs: a.inputs }, query: { dryRun: a.dryRun ? "true" : undefined }, idempotencyKey: a.idempotencyKey })
35400
35418
  }),
35401
35419
  defineTool({
35402
35420
  name: "create_stack",
35403
35421
  title: "Create stack from spec",
35404
35422
  kind: "write",
35405
- description: "Create several connected services from a template spec ({ version: 1, inputs?, services: [...] }) and deploy them in dependency order. COSTS MONEY: dryRun=true first. See https://docs.helipod.io/docs/container-api/templates-and-stacks",
35423
+ description: "Create several connected services from a template spec ({ version: 1, inputs?, services: [...] }) and deploy them in dependency order. COSTS MONEY beyond the bundle: billed daily (bundle quota first, then the wallet). dryRun=true first. Before saying a price, read walletDailyCost (what the wallet really pays per day) and bundle: with an active bundle that covers it (bundle.coversIt, walletDailyCost 0) nothing is charged and NO top-up is needed, even with a Rp 0 balance. See https://docs.helipod.io/docs/container-api/templates-and-stacks",
35406
35424
  input: {
35407
35425
  environmentId: id("Environment"),
35408
35426
  spec: exports_external.record(exports_external.string(), exports_external.any()).describe("Template spec object"),
@@ -35919,16 +35937,21 @@ var domainTools = [
35919
35937
  title: "Check domain availability",
35920
35938
  kind: "read",
35921
35939
  description: "Is a domain name available to register? No key needed.",
35922
- input: { domain: exports_external.string().describe("e.g. tokosaya.id") },
35923
- run: (a, api2) => api2.api("GET", "/domains/search", { query: { domain: a.domain }, auth: false })
35940
+ input: { domain: exports_external.string().describe("e.g. tokosaya.id"), includePremium: exports_external.boolean().optional().describe("Also check names the registry sells as premium (is_premium_name). Premium names cannot be bought online: the user must contact support") },
35941
+ run: (a, api2) => api2.api("GET", "/domains/search", { query: { domain: a.domain, includePremium: a.includePremium ? "true" : undefined }, auth: false })
35924
35942
  }),
35925
35943
  defineTool({
35926
35944
  name: "domain_prices",
35927
35945
  title: "Domain prices",
35928
35946
  kind: "read",
35929
35947
  description: "Registration, renewal and transfer prices per extension (IDR, VAT included) and the yearly WHOIS privacy price.",
35930
- input: { extension: exports_external.string().optional().describe("e.g. .id or .com"), limit: exports_external.number().int().min(1).max(100).optional() },
35931
- run: (a, api2) => api2.api("GET", "/domains/prices", { query: { extension: a.extension, limit: a.limit ?? 50 }, auth: false })
35948
+ input: {
35949
+ extension: exports_external.string().optional().describe("e.g. .id or .com"),
35950
+ promo: exports_external.boolean().optional().describe("true: only extensions on promotion"),
35951
+ limit: exports_external.number().int().min(1).max(100).optional(),
35952
+ page: exports_external.number().int().min(1).optional()
35953
+ },
35954
+ run: (a, api2) => api2.api("GET", "/domains/prices", { query: { extension: a.extension, promo: a.promo === undefined ? undefined : String(a.promo), limit: a.limit ?? 50, page: a.page }, auth: false })
35932
35955
  }),
35933
35956
  defineTool({
35934
35957
  name: "list_my_domains",
@@ -35987,9 +36010,22 @@ var domainTools = [
35987
36010
  name: exports_external.string().describe("Full domain, e.g. tokosaya.id"),
35988
36011
  nameservers: exports_external.array(exports_external.string()).min(2).max(5).optional(),
35989
36012
  whoisProtection: exports_external.boolean().optional(),
36013
+ registrant: exports_external.object({
36014
+ name: exports_external.string().min(3).max(255),
36015
+ email: exports_external.string().max(255).optional().describe("Gets the registry's verification email; defaults to the account email"),
36016
+ organization: exports_external.string().max(255).optional(),
36017
+ phone: exports_external.string().min(9).max(20).describe("e.g. +6281234567890"),
36018
+ addressLine1: exports_external.string().min(3).max(500),
36019
+ addressLine2: exports_external.string().max(500).optional(),
36020
+ city: exports_external.string().min(3).max(100),
36021
+ state: exports_external.string().min(1).max(100),
36022
+ countryCode: exports_external.string().regex(/^[A-Za-z]{2}$/).describe("ISO 3166-1 alpha-2, e.g. ID"),
36023
+ postalCode: exports_external.string().min(1).max(20),
36024
+ fax: exports_external.string().max(50).optional()
36025
+ }).optional().describe("Owner of THIS domain instead of the account's owner details (e.g. a reseller's customer). .id domains only: others answer 400 REGISTRANT_NOT_SUPPORTED. Use only details the user gave."),
35990
36026
  dryRun: dryRun3
35991
36027
  },
35992
- run: (a, api2) => api2.api("POST", "/domains/register", { body: { name: a.name, period: 1, nameservers: a.nameservers, whoisProtection: a.whoisProtection }, query: { dryRun: a.dryRun ? "true" : undefined } })
36028
+ run: (a, api2) => api2.api("POST", "/domains/register", { body: { name: a.name, period: 1, nameservers: a.nameservers, whoisProtection: a.whoisProtection, registrant: a.registrant }, query: { dryRun: a.dryRun ? "true" : undefined } })
35993
36029
  }),
35994
36030
  defineTool({
35995
36031
  name: "transfer_domain",
@@ -36044,9 +36080,9 @@ var domainTools = [
36044
36080
  name: "enable_whois_privacy",
36045
36081
  title: "Enable WHOIS privacy",
36046
36082
  kind: "write",
36047
- description: "Hide the owner's details in WHOIS. COSTS MONEY (the whois_protection price per year).",
36048
- input: { domainId },
36049
- run: (a, api2) => api2.api("POST", `/domains/${a.domainId}/whois-protection`)
36083
+ description: `Hide the owner's details in WHOIS. COSTS MONEY (the whois_protection price per year). ${DRY2}`,
36084
+ input: { domainId, dryRun: dryRun3 },
36085
+ run: (a, api2) => api2.api("POST", `/domains/${a.domainId}/whois-protection`, { query: { dryRun: a.dryRun ? "true" : undefined } })
36050
36086
  }),
36051
36087
  defineTool({
36052
36088
  name: "get_domain_price",
@@ -36089,6 +36125,23 @@ var domainTools = [
36089
36125
  input: { domainId, emailDomainId: exports_external.string().uuid() },
36090
36126
  run: (a, api2) => api2.api("POST", `/domains/${a.domainId}/email-records`, { body: { emailDomainId: a.emailDomainId } })
36091
36127
  }),
36128
+ defineTool({
36129
+ name: "get_child_nameserver",
36130
+ title: "Get child nameserver",
36131
+ kind: "read",
36132
+ description: "One child nameserver (glue record) of a registered domain: hostname and IP address.",
36133
+ input: { domainId, hostId },
36134
+ run: (a, api2) => api2.api("GET", `/domains/${a.domainId}/hosts/${a.hostId}`)
36135
+ }),
36136
+ defineTool({
36137
+ name: "set_domain_auto_renew",
36138
+ title: "Set domain auto-renew",
36139
+ kind: "write",
36140
+ idempotent: true,
36141
+ description: "Turn automatic renewal of a domain on or off (sets the value given; calling it twice is safe). On: renewed from the wallet before it expires. Off: it expires unless renewed by hand (renew_domain). Nothing is charged now.",
36142
+ input: { domainId, autoRenew: exports_external.boolean() },
36143
+ run: (a, api2) => api2.api("PATCH", `/domains/${a.domainId}/auto-renew`, { body: { autoRenew: a.autoRenew } })
36144
+ }),
36092
36145
  defineTool({
36093
36146
  name: "list_child_nameservers",
36094
36147
  title: "List child nameservers",
@@ -36165,7 +36218,10 @@ var message = exports_external.object({
36165
36218
  templateId: exports_external.string().optional(),
36166
36219
  templateData: exports_external.record(exports_external.string(), exports_external.string()).optional(),
36167
36220
  variables: exports_external.record(exports_external.string(), exports_external.string()).optional(),
36168
- idempotencyKey: exports_external.string().max(128).optional()
36221
+ idempotencyKey: exports_external.string().max(128).optional(),
36222
+ headers: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Extra MIME headers (letters, digits, hyphens in names; no line breaks). Not with templateId"),
36223
+ metadata: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Your own key/value data, stored with the email (get_email returns it)"),
36224
+ sensitive: exports_external.boolean().optional().describe("true when templateData or variables carry a secret (password, one-time code): their values are wiped from the job record after the send")
36169
36225
  });
36170
36226
  var dryRun4 = exports_external.boolean().optional().describe("true = return the price (IDR) and the wallet balance after it; nothing is charged or changed");
36171
36227
  var idem2 = exports_external.string().regex(/^[A-Za-z0-9_.:-]{8,128}$/).optional().describe("Idempotency-Key for the real purchase. Generated when omitted; pass the same value when retrying so it is never charged twice");
@@ -36274,7 +36330,10 @@ var emailTools = [
36274
36330
  templateId: exports_external.string().optional(),
36275
36331
  templateData: exports_external.record(exports_external.string(), exports_external.string()).optional(),
36276
36332
  variables: exports_external.record(exports_external.string(), exports_external.string()).optional(),
36277
- idempotencyKey: exports_external.string().max(128).optional()
36333
+ idempotencyKey: exports_external.string().max(128).optional(),
36334
+ headers: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Extra MIME headers (letters, digits, hyphens in names; no line breaks). Not with templateId"),
36335
+ metadata: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Your own key/value data, stored with the email (get_email returns it)"),
36336
+ sensitive: exports_external.boolean().optional().describe("true when templateData or variables carry a secret (password, one-time code): their values are wiped from the job record after the send")
36278
36337
  },
36279
36338
  run: ({ projectId: project, ...a }, api2) => api2.email("POST", "/send", { body: a, project })
36280
36339
  }),
@@ -36283,7 +36342,15 @@ var emailTools = [
36283
36342
  title: "List sent emails",
36284
36343
  kind: "read",
36285
36344
  description: "Email log, newest first, with delivery status.",
36286
- input: { projectId, status: exports_external.string().optional(), search: exports_external.string().optional(), limit: exports_external.number().int().min(1).max(100).optional(), cursor: exports_external.string().optional() },
36345
+ input: {
36346
+ projectId,
36347
+ status: exports_external.string().optional(),
36348
+ search: exports_external.string().optional(),
36349
+ from: exports_external.string().optional().describe("Sent at or after (ISO 8601), e.g. 2026-10-01T00:00:00Z"),
36350
+ to: exports_external.string().optional().describe("Sent before (ISO 8601)"),
36351
+ limit: exports_external.number().int().min(1).max(100).optional(),
36352
+ cursor: exports_external.string().optional()
36353
+ },
36287
36354
  run: ({ projectId: project, ...a }, api2) => api2.email("GET", "/emails", { query: a, project })
36288
36355
  }),
36289
36356
  defineTool({
@@ -36331,7 +36398,16 @@ var emailTools = [
36331
36398
  title: "Add contact",
36332
36399
  kind: "write",
36333
36400
  description: "Add or update an audience contact.",
36334
- input: { projectId, email: exports_external.string(), firstName: exports_external.string().optional(), lastName: exports_external.string().optional() },
36401
+ input: {
36402
+ projectId,
36403
+ email: exports_external.string(),
36404
+ firstName: exports_external.string().optional(),
36405
+ lastName: exports_external.string().optional(),
36406
+ status: exports_external.enum(["subscribed", "unsubscribed"]).optional(),
36407
+ properties: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("Custom properties (used by segments and {{placeholders}})"),
36408
+ consentConfirmed: exports_external.boolean().optional().describe("true only when the person agreed to receive email (you have their opt-in)"),
36409
+ consentSource: exports_external.string().max(50).optional().describe("Where the consent came from, e.g. signup_form")
36410
+ },
36335
36411
  run: ({ projectId: project, ...a }, api2) => api2.email("POST", "/contacts", { body: a, project })
36336
36412
  }),
36337
36413
  defineTool({
@@ -36810,6 +36886,162 @@ var emailTools = [
36810
36886
  description: "Delete a received message permanently.",
36811
36887
  input: { projectId, messageId: uid("Message") },
36812
36888
  run: (a, api2) => api2.email("DELETE", `/inbound/messages/${a.messageId}`, { project: a.projectId })
36889
+ }),
36890
+ defineTool({
36891
+ name: "add_email_contacts",
36892
+ title: "Add contacts (bulk)",
36893
+ kind: "write",
36894
+ description: "Add or update up to 1000 contacts in one call (same fields as add_contact). For a CSV file use import_email_contacts.",
36895
+ input: {
36896
+ projectId,
36897
+ contacts: exports_external.array(exports_external.object({
36898
+ email: exports_external.string(),
36899
+ firstName: exports_external.string().max(100).optional(),
36900
+ lastName: exports_external.string().max(100).optional(),
36901
+ status: exports_external.enum(["subscribed", "unsubscribed"]).optional(),
36902
+ properties: exports_external.record(exports_external.string(), exports_external.string()).optional()
36903
+ })).min(1).max(1000),
36904
+ consentConfirmed: exports_external.boolean().optional().describe("true only when every one of them opted in"),
36905
+ consentSource: exports_external.string().max(50).optional()
36906
+ },
36907
+ run: ({ projectId: project, ...body }, api2) => api2.email("POST", "/contacts", { body, project })
36908
+ }),
36909
+ defineTool({
36910
+ name: "import_email_contacts",
36911
+ title: "Import contacts from CSV",
36912
+ kind: "write",
36913
+ description: "Import contacts from CSV text (header row with email, optional firstName, lastName and property columns). Runs in the background: the answer has a job id for get_email_job.",
36914
+ input: {
36915
+ projectId,
36916
+ csv: exports_external.string().min(1).max(1e7),
36917
+ consentConfirmed: exports_external.boolean().optional().describe("true only when every contact in the file opted in"),
36918
+ consentSource: exports_external.string().max(50).optional()
36919
+ },
36920
+ run: ({ projectId: project, ...body }, api2) => api2.email("POST", "/contacts/import", { body, project })
36921
+ }),
36922
+ defineTool({
36923
+ name: "export_email_contacts",
36924
+ title: "Export contacts (CSV)",
36925
+ kind: "read",
36926
+ description: "Every contact as CSV text (up to 50,000). Contact data is personal: give it only to the user who asked.",
36927
+ input: { projectId },
36928
+ run: (a, api2) => api2.email("GET", "/contacts/export", { project: a.projectId })
36929
+ }),
36930
+ defineTool({
36931
+ name: "set_email_contact_properties",
36932
+ title: "Set contact properties",
36933
+ kind: "write",
36934
+ idempotent: true,
36935
+ description: "Set custom properties of a contact. Given keys are overwritten, other keys are kept.",
36936
+ input: { projectId, contactId: uid("Contact"), properties: exports_external.record(exports_external.string(), exports_external.string()) },
36937
+ run: (a, api2) => api2.email("PUT", `/contacts/${a.contactId}/properties`, { body: { properties: a.properties }, project: a.projectId })
36938
+ }),
36939
+ defineTool({
36940
+ name: "set_email_contact_topics",
36941
+ title: "Subscribe contact to topics",
36942
+ kind: "write",
36943
+ idempotent: true,
36944
+ description: "Subscribe a contact to the given topics (ids from list_email_topics).",
36945
+ input: { projectId, contactId: uid("Contact"), topicIds: exports_external.array(exports_external.string().uuid()).max(50) },
36946
+ run: (a, api2) => api2.email("PUT", `/contacts/${a.contactId}/topics`, { body: { topicIds: a.topicIds }, project: a.projectId })
36947
+ }),
36948
+ defineTool({
36949
+ name: "get_email_segment",
36950
+ title: "Get segment",
36951
+ kind: "read",
36952
+ description: "One segment with its filter and contact count.",
36953
+ input: { projectId, segmentId: uid("Segment") },
36954
+ run: (a, api2) => api2.email("GET", `/segments/${a.segmentId}`, { project: a.projectId })
36955
+ }),
36956
+ defineTool({
36957
+ name: "recalculate_email_segment",
36958
+ title: "Recalculate segment",
36959
+ kind: "write",
36960
+ description: "Rebuild a segment's member list now (in the background) after contacts or properties changed.",
36961
+ input: { projectId, segmentId: uid("Segment") },
36962
+ run: (a, api2) => api2.email("POST", `/segments/${a.segmentId}/recalculate`, { project: a.projectId })
36963
+ }),
36964
+ defineTool({
36965
+ name: "delete_email_broadcast",
36966
+ title: "Delete broadcast",
36967
+ kind: "destructive",
36968
+ description: "Delete a broadcast that is not sending right now (a draft, scheduled, cancelled or finished one). Use cancel_email_broadcast to stop one that is sending.",
36969
+ input: { projectId, broadcastId: uid("Broadcast") },
36970
+ run: (a, api2) => api2.email("DELETE", `/broadcasts/${a.broadcastId}`, { project: a.projectId })
36971
+ }),
36972
+ defineTool({
36973
+ name: "check_email_inbound",
36974
+ title: "Check domain for receiving",
36975
+ kind: "read",
36976
+ description: "Before turning on receiving: the MX records of the host that would receive mail. existingMx not empty = mail for that host currently goes to another provider and would move to Helipod: suggest a subdomain (e.g. mail.example.com) to keep it.",
36977
+ input: { projectId, domainId: uid("Sending domain"), host: exports_external.string().max(254).optional().describe("The domain or a subdomain of it; default the domain") },
36978
+ run: (a, api2) => api2.email("GET", `/domains/${a.domainId}/inbound/check`, { query: { host: a.host }, project: a.projectId })
36979
+ }),
36980
+ defineTool({
36981
+ name: "set_email_inbound",
36982
+ title: "Turn receiving on or off",
36983
+ kind: "write",
36984
+ idempotent: true,
36985
+ description: "Turn receiving mail on (or off) for a verified sending domain, on the domain or a subdomain. Run check_email_inbound first and tell the user if existing mail would move. The answer is the domain: its dnsRecords now include the receiving MX record to publish, then verify_email_domain (inboundMxValid turns true).",
36986
+ input: { projectId, domainId: uid("Sending domain"), enabled: exports_external.boolean(), host: exports_external.string().max(254).optional() },
36987
+ run: (a, api2) => api2.email("POST", `/domains/${a.domainId}/inbound`, { body: { enabled: a.enabled, host: a.host }, project: a.projectId })
36988
+ }),
36989
+ defineTool({
36990
+ name: "inbox_stats",
36991
+ title: "Inbox usage",
36992
+ kind: "read",
36993
+ description: "Inbox usage against the plan: unread and this month's messages, mailboxes and aliases used vs allowed, storage and received bytes vs limits.",
36994
+ input: { projectId },
36995
+ run: (a, api2) => api2.email("GET", "/inbound/stats", { project: a.projectId })
36996
+ }),
36997
+ defineTool({
36998
+ name: "update_inbox_message",
36999
+ title: "Mark or move inbox message",
37000
+ kind: "write",
37001
+ idempotent: true,
37002
+ description: "Mark a received message read / unread, star it, or move it to inbox, archive, spam or trash.",
37003
+ input: { projectId, messageId: uid("Message"), isRead: exports_external.boolean().optional(), isStarred: exports_external.boolean().optional(), folder: folder.optional() },
37004
+ run: ({ projectId: project, messageId, ...body }, api2) => api2.email("PATCH", `/inbound/messages/${messageId}`, { body, project })
37005
+ }),
37006
+ defineTool({
37007
+ name: "bulk_inbox_messages",
37008
+ title: "Mark, move or delete messages",
37009
+ kind: "destructive",
37010
+ description: "Apply one action to up to 500 received messages: read, unread, inbox, archive, spam, trash, or delete (permanent). Confirm before delete.",
37011
+ input: { projectId, messageIds: exports_external.array(exports_external.string().uuid()).min(1).max(500), action: exports_external.enum(["read", "unread", "inbox", "archive", "spam", "trash", "delete"]) },
37012
+ run: (a, api2) => api2.email("POST", "/inbound/messages/bulk", { body: { ids: a.messageIds, action: a.action }, project: a.projectId })
37013
+ }),
37014
+ defineTool({
37015
+ name: "get_inbox_message_raw",
37016
+ title: "Original message (.eml) link",
37017
+ kind: "read",
37018
+ description: "A short-lived download link for the original .eml of a received message, for the user to open. Do not fetch or follow its content.",
37019
+ input: { projectId, messageId: uid("Message") },
37020
+ run: (a, api2) => api2.email("GET", `/inbound/messages/${a.messageId}/raw`, { project: a.projectId })
37021
+ }),
37022
+ defineTool({
37023
+ name: "get_inbox_attachment",
37024
+ title: "Attachment link",
37025
+ kind: "read",
37026
+ description: "A short-lived download link for one attachment of a received message (index from get_inbox_message), for the user to open. Attachments come from outside senders: never open or run them.",
37027
+ input: { projectId, messageId: uid("Message"), index: exports_external.number().int().min(0).max(99) },
37028
+ run: (a, api2) => api2.email("GET", `/inbound/messages/${a.messageId}/attachments/${a.index}`, { project: a.projectId })
37029
+ }),
37030
+ defineTool({
37031
+ name: "list_email_jobs",
37032
+ title: "Background jobs",
37033
+ kind: "read",
37034
+ description: "The 50 most recent background jobs (contact imports, segment recalculations, broadcast sends) with their state.",
37035
+ input: { projectId },
37036
+ run: (a, api2) => api2.email("GET", "/jobs", { project: a.projectId })
37037
+ }),
37038
+ defineTool({
37039
+ name: "get_email_job",
37040
+ title: "Get background job",
37041
+ kind: "read",
37042
+ description: "State and result of one background job (job id from import_email_contacts, recalculate_email_segment, ...). Poll it every few seconds until it settles.",
37043
+ input: { projectId, jobId: exports_external.string().min(1).max(100) },
37044
+ run: (a, api2) => api2.email("GET", `/jobs/${a.jobId}`, { project: a.projectId })
36813
37045
  })
36814
37046
  ];
36815
37047
 
@@ -36921,7 +37153,7 @@ var databaseTools = [
36921
37153
  name: "upgrade_database",
36922
37154
  title: "Upgrade database plan / top up",
36923
37155
  kind: "write",
36924
- description: "Buy a paid plan or top up credits. COSTS MONEY from the wallet: call with dryRun first, show price and wallet balance after, and get the user's explicit OK.",
37156
+ description: "Buy a paid plan or top up credits. Only when the user asks for more than the FREE plan gives (never to get started: create_database is free). COSTS MONEY from the wallet (bundles do not cover it): call with dryRun first, show price and wallet balance after, and get the user's explicit OK.",
36925
37157
  input: { databaseId, plan: exports_external.string().describe("Plan code (e.g. STARTER) or id from list_database_plans"), dryRun: dryRun5, idempotencyKey: exports_external.string().max(128).optional() },
36926
37158
  run: (a, api2) => api2.api("POST", `/databases/${a.databaseId}/upgrade`, { body: { plan: a.plan }, query: { dryRun: a.dryRun ? "true" : undefined }, idempotencyKey: a.idempotencyKey })
36927
37159
  }),
@@ -37406,10 +37638,13 @@ var generalTools = [
37406
37638
  ];
37407
37639
 
37408
37640
  // src/server.ts
37409
- var VERSION = "0.5.11";
37641
+ var VERSION = "0.5.13";
37410
37642
  var INSTRUCTIONS = `Helipod is a cloud platform (Indonesia): containers, managed Postgres databases, VPS, domains, email and an AI gateway, billed from a prepaid wallet in Rupiah.
37411
37643
  - Start with list_projects to find projects and environment ids. Account tools (get_wallet, invoices, statements, notifications, get_project_activity, support tickets) cover the account; AI tools (list_ai_models, get_ai_overview, get_ai_usage, AI keys, top-ups, generate_ai_image) cover the AI gateway.
37412
37644
  - Anything that costs money (create/deploy/scale services, resize volumes, upgrade a database plan, create/renew/upgrade VPS, VPS backups, register/renew/transfer domains, email plans and inbox add-ons, AI top-ups and auto top-up, generating images): call it with dryRun=true first (or the price lookup when it has no dry run), tell the user the cost in IDR and the wallet balance after, and wait for an explicit yes before the real call. Never treat silence or an earlier general OK as a yes.
37645
+ - What the user really pays: container services are paid from the account's bundle first (get_bundle: a monthly bundle with a CPU / RAM / storage quota) and from the wallet only beyond it. Container dry runs return walletDailyCost (what the wallet pays per day) and bundle.coversIt: when the bundle covers it, say it is included in their bundle and deploy after their OK; never ask for a top-up for something walletDailyCost says is 0, whatever the balance. Quote dailyCost only as the price without a bundle. The bundle covers containers only: VPS, domains, AI, paid database plans and paid email plans are paid from the wallet.
37646
+ - Free first: the managed Postgres database (create_database) starts on the FREE plan and email (buy_email_plan with the FREE plan) costs nothing. For a database, use create_database rather than running Postgres as a container service, and do not offer upgrade_database or a paid email plan unless the user asks for more or hits a limit.
37647
+ - Deploying an app, step by step: list_projects (pick the project and its production environmentId) -> get_bundle (is it covered?) -> if it needs Postgres: create_database, then get_database_connection and store DATABASE_URL with set_variables (secrets) after the service exists, or pass it in create_service variables -> create_service with dryRun=true (repo or image, port, variables) -> tell the user the cost (included in the bundle, or walletDailyCost per day) and wait for their OK -> create_service for real -> poll get_deployment until it settles, read get_deployment_logs if it failed -> give the user the *.helipod.app URL from get_service. Ask the user for secrets (API keys) only when the app needs them; never invent values.
37413
37648
  - Destructive tools (delete, terminate, reinstall, rollback, restore a backup or an import, copy a backup onto another VPS, replace DNS, revoke a key, remove an SSH key or port forward, send a broadcast, execute_database_sql): confirm with the user and name what will be lost. Before execute_database_sql, run classify_database_sql.
37414
37649
  - Email: when a project has no email yet (email_status shows activated false) or its plan ended, start it with buy_email_plan (dryRun first; the FREE plan costs nothing, still confirm). That also sets email up for the project; then add and verify a sending domain.
37415
37650
  - Before replacing all DNS records (set_dns_records), read list_dns_records and keep every record the user still needs. Before sending or scheduling a broadcast, tell the user how many contacts it reaches. Before deleting or replacing code, files or variables, read the current value. After renaming a service, fix the variable references listed in warnings.