@awesomate/hosting-mcp 0.10.0 → 0.11.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/dist/index.js CHANGED
@@ -40111,22 +40111,36 @@ readTool(
40111
40111
  "Usage vs plan limits across every dimension (sites, custom domains, apps, database provisions today, workflow credits, AI-editor credits) plus a nudges[] array. Call BEFORE any create action; when a nudge has severity 'approaching' or 'exceeded', surface it to the user with the recommended plan \u2014 never execute an upgrade without preview + explicit confirmation (upgrade tools ship in a later release; for now deep-link to the hub billing page). pgProvisionsToday is a flat daily cap that resets within 24h \u2014 no plan raises it, so don't pitch an upgrade for it.",
40112
40112
  "/api/client-hosting/limits"
40113
40113
  );
40114
+ var PLAN_LADDER_FALLBACK = {
40115
+ note: "Live per-account limits come from awesomate_get_limits \u2014 this is the plan ladder reference (static fallback).",
40116
+ plans: [
40117
+ { name: "Essentials", purchasable: false, monthlyPriceUsd: 75, maxSites: 1, maxCustomDomains: 0, maxApps: 0, cpanelAccess: true, shellAccess: false, appBuilder: false },
40118
+ { name: "Support Plus", purchasable: true, monthlyPriceUsd: 175, maxSites: 2, maxCustomDomains: 3, maxApps: 5, cpanelAccess: true, shellAccess: true, appBuilder: true },
40119
+ { name: "Pro", purchasable: true, monthlyPriceUsd: 375, maxSites: 10, maxCustomDomains: 10, maxApps: 20, cpanelAccess: true, shellAccess: true, appBuilder: true },
40120
+ { name: "Embedded", purchasable: false, monthlyPriceUsd: null, maxSites: 100, maxCustomDomains: 100, maxApps: 100, cpanelAccess: true, shellAccess: true, appBuilder: true, note: "Not generally available yet" }
40121
+ ],
40122
+ upgradePath: "Essentials \u2192 Support Plus \u2192 Pro \u2192 Embedded; upgrades at hub.awesomate.ai/billing (only Support Plus and Pro are purchasable)"
40123
+ };
40114
40124
  server.registerTool(
40115
40125
  "awesomate_get_plan_features",
40116
40126
  {
40117
- description: "Static reference: what each Awesomate plan includes for hosting (sites, custom domains, cPanel, shell/Claude Code access) and monthly pricing. Use to explain what an upgrade unlocks.",
40127
+ description: "The Awesomate plan ladder: what each plan includes for hosting (WordPress sites, custom domains, hosted apps, cPanel, shell/Claude Code access) and which plans are purchasable. Fetched live from the hub (single source of truth) with a static fallback. Use to explain what an upgrade unlocks; live per-account usage comes from awesomate_get_limits.",
40118
40128
  inputSchema: {}
40119
40129
  },
40120
- async () => textResult({
40121
- note: "Live per-account limits come from awesomate_get_limits \u2014 this is the plan ladder reference.",
40122
- plans: [
40123
- { name: "Essentials", monthlyPriceUsd: 75, maxSites: 1, maxCustomDomains: 0, cpanelAccess: true, shellAccess: false },
40124
- { name: "Support Plus", monthlyPriceUsd: 175, maxSites: 1, maxCustomDomains: 1, cpanelAccess: true, shellAccess: true },
40125
- { name: "Pro", monthlyPriceUsd: 375, maxSites: 3, maxCustomDomains: 3, cpanelAccess: true, shellAccess: true },
40126
- { name: "Embedded", monthlyPriceUsd: null, maxSites: null, maxCustomDomains: null, cpanelAccess: true, shellAccess: true, note: "Unlimited sites/domains; not generally available yet" }
40127
- ],
40128
- upgradePath: "Essentials \u2192 Support Plus \u2192 Pro \u2192 Embedded; upgrades at hub.awesomate.ai/billing"
40129
- })
40130
+ async () => {
40131
+ try {
40132
+ const live = await hubGet(requireConfig(), "/api/client-hosting/plan-ladder");
40133
+ if (Array.isArray(live?.plans) && live.plans.length > 0) {
40134
+ return textResult({
40135
+ note: "Live plan ladder from the hub. Per-account usage comes from awesomate_get_limits.",
40136
+ ...live,
40137
+ upgradePath: PLAN_LADDER_FALLBACK.upgradePath
40138
+ });
40139
+ }
40140
+ } catch {
40141
+ }
40142
+ return textResult(PLAN_LADDER_FALLBACK);
40143
+ }
40130
40144
  );
40131
40145
  server.registerTool(
40132
40146
  "awesomate_snapshot_site",
@@ -40207,7 +40221,7 @@ server.registerTool(
40207
40221
  server.registerTool(
40208
40222
  "awesomate_app_create",
40209
40223
  {
40210
- description: "Provision a new app on the client's cPanel account. Choose the stack deliberately (see the awesomate-app-builder skill): kind 'static' = a single fast landing/lead page served straight from the docroot (no DB, no server process \u2014 pick this for brochure/landing/lead-capture); kind 'node' = a dynamic app with a backend + database (logins, custom logic, an API). Pick the template by job \u2014 'node-auth-sync' (user accounts/logins, MySQL), 'node-crud-postgres' (structured data without logins: trackers/dashboards \u2014 ready-made CRUD + UI, Postgres), 'node-api-only' (webhooks/integrations/glue, no DB wiring), 'static-landing' (marketing/lead page). If dbEngine is omitted the template's native engine is used (node-crud-postgres \u2192 postgres). Returns 202 immediately with an appId + subdomain(s); poll awesomate_app_get until status=active, then fetch the starter files with awesomate_app_scaffold. Requires apps:write (Support Plus+) \u2014 a 403 means offer an upgrade. Get the user's confirmation on the stack + name before calling.",
40224
+ description: "Provision a new app on the client's cPanel account. Choose the stack deliberately (see the awesomate-app-builder skill): kind 'static' = a single fast landing/lead page served straight from the docroot (no DB, no server process \u2014 pick this for brochure/landing/lead-capture); kind 'node' = a dynamic app with a backend + database (logins, custom logic, an API). Pick the template by job \u2014 'node-auth-sync' (user accounts/logins, MySQL), 'node-crud-postgres' (structured data without logins: trackers/dashboards \u2014 ready-made CRUD + UI, Postgres), 'node-api-only' (webhooks/integrations/glue, no DB wiring), 'static-landing' (marketing/lead page). If dbEngine is omitted the template's native engine is used (node-crud-postgres \u2192 postgres). Returns 202 immediately with an appId + subdomain(s); poll awesomate_app_get until status=active, then fetch the starter files with awesomate_app_scaffold. Requires apps:write (Support Plus+) \u2014 a 403 means offer an upgrade. Plans also cap the NUMBER of apps (Support Plus 5, Pro 20 \u2014 check awesomate_get_limits.dimensions.apps first): a 409 with code 'app_limit' means the cap is reached \u2014 do NOT retry; tell the user their allowance is full and surface the recommendedPlan/deepLink from the error. Get the user's confirmation on the stack + name before calling.",
40211
40225
  inputSchema: {
40212
40226
  appSlug: external_exports.string().regex(/^[a-z][a-z0-9]{1,15}$/).describe("2-16 chars, starts with a letter, lowercase alphanumeric \u2014 used for subdomains + db names"),
40213
40227
  kind: external_exports.enum(["node", "static"]).default("node").describe("'static' for a landing/lead page (no DB); 'node' for a dynamic app"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Awesomate MCP server — lets Claude manage your Awesomate WordPress hosting, plan, limits, n8n automations, and build Node/static apps + databases",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -115,6 +115,10 @@ files directly (no build step).
115
115
  - Confirm the stack + name before `awesomate_app_create`. Default the target
116
116
  to **dev**; never push to prod without an explicit ask.
117
117
  - A `403` on a write = plan gate (Support Plus+). Offer an upgrade, don't retry.
118
+ - A `409` with code `app_limit` = the plan's app allowance is full (Support
119
+ Plus 5, Pro 20 — `awesomate_app_context.limits` has the live numbers).
120
+ Don't retry; tell the user and surface the `recommendedPlan`/`deepLink`
121
+ from the error. Deleting an unused app also frees a slot.
118
122
  - Never invent that a capability exists — read `awesomate_app_context` first.
119
123
  - Never print a secret or commit a `.env` (the credentials + github skills
120
124
  enforce this).
@@ -148,15 +148,18 @@ natural break so the richer MCP integration loads.
148
148
 
149
149
  ## 1. The plan model (so your nudges are accurate)
150
150
 
151
- | Plan | WP sites | Custom domains | Shell / Claude Code | Notes |
152
- |---|---|---|---|---|
153
- | **Essentials** | 1 | 0 | **No** | read/status + upgrade nudges only |
154
- | **Support Plus** | (per plan) | ≥1 | **Yes** | shell, WP-CLI, snapshot/rollback, deploy |
155
- | **Pro** | more | more | **Yes** | + higher limits |
156
- | **Embedded** | | | **Yes** | agency tier |
151
+ | Plan | WP sites | Hosted apps | Custom domains | Shell / Claude Code | Notes |
152
+ |---|---|---|---|---|---|
153
+ | **Essentials** | 1 | 0 | 0 | **No** | read/status + upgrade nudges only |
154
+ | **Support Plus** | 2 | 5 | 3 | **Yes** | shell, WP-CLI, snapshot/rollback, deploy, app builder |
155
+ | **Pro** | 10 | 20 | 10 | **Yes** | + higher limits |
156
+ | **Embedded** | 100 | 100 | 100 | **Yes** | agency tier, not generally available |
157
157
 
158
158
  Authoritative limits are always what `awesomate_get_limits` returns for THIS
159
- account never quote the table above as fact; use it only to explain upgrades.
159
+ account (and `awesomate_get_plan_features` fetches the live ladder from the
160
+ hub) — never quote the table above as fact; use it only to explain upgrades.
161
+ App creation past the cap returns a 409 with code `app_limit` — don't retry;
162
+ surface the recommended plan instead.
160
163
 
161
164
  ## 2. Branch by capability
162
165