@awesomate/hosting-mcp 0.19.0 → 0.19.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/dist/index.js CHANGED
@@ -39906,6 +39906,10 @@ async function hubRequest(config3, method, path, jsonBody, opts = {}) {
39906
39906
  hint = " Payment/allowance required \u2014 NOTHING was purchased. State the cost plainly and let the user decide in the hub; this tool never spends money.";
39907
39907
  } else if (res.status === 404) {
39908
39908
  hint = " Not found \u2014 usually the resource does not exist for THIS account. Re-check the id/domain before retrying; do not invent one.";
39909
+ } else if (code === "n8n_credential_invalid") {
39910
+ const settingsUrl = body && typeof body === "object" && typeof body.settingsUrl === "string" ? body.settingsUrl : "https://hub.awesomate.ai/n8n/settings";
39911
+ const instanceUrl = body && typeof body === "object" && typeof body.instanceUrl === "string" ? body.instanceUrl : null;
39912
+ hint = ` THIS IS NOT A HUB OUTAGE and not your workflow \u2014 the user's own n8n rejected the API key Awesomate has stored. Tell the user to fix it in two steps: (1) in their n8n${instanceUrl ? ` at ${instanceUrl}` : ""}, open Settings \u2192 n8n API and create a new API key; (2) paste it into their Awesomate account at ${settingsUrl} under "New n8n API Key" and save. Then retry. Do not retry before they confirm, and do not investigate hub/Cloudflare status \u2014 reads and validation keep working because those never touch their instance.`;
39909
39913
  } else if (res.status === 409) {
39910
39914
  hint = " Conflict \u2014 the payload carries the specifics (a limit reached, or a prerequisite missing). Read its code field; do not blind-retry.";
39911
39915
  } else if (res.status === 422) {
@@ -39915,7 +39919,8 @@ async function hubRequest(config3, method, path, jsonBody, opts = {}) {
39915
39919
  } else if (res.status === 503) {
39916
39920
  hint = " The hub is temporarily unable to serve this \u2014 retry shortly.";
39917
39921
  }
39918
- throw new HubApiError(`${serverMsg}.${hint}`, res.status, body);
39922
+ const stem = /[.!?]$/.test(serverMsg) ? serverMsg : `${serverMsg}.`;
39923
+ throw new HubApiError(`${stem}${hint}`, res.status, body);
39919
39924
  }
39920
39925
  return body;
39921
39926
  }
@@ -40677,7 +40682,7 @@ server.registerTool(
40677
40682
  "awesomate_n8n_deploy",
40678
40683
  {
40679
40684
  annotations: DESTRUCTIVE,
40680
- description: "Workflow lifecycle writes on the client's n8n, all consent-gated and audited server-side. Actions: 'validate' (structural + n8n-mcp check of workflowJson \u2014 ALWAYS validate before create_draft), 'create_draft' (creates an INACTIVE '[CLI] ' workflow tagged awm:client-cli; returns its webhook URLs), 'activate'/'deactivate' (activation strips the [CLI] prefix; production webhooks respond only while active; agency-managed workflows are refused), 'promote' (swaps a TESTED draft into the live workflow IN PLACE \u2014 live id + webhookIds preserved so external callers keep working; pass workflowId=the LIVE id and draftId=the tested draft; the draft is archived '[promoted <date>]'; response includes operationId for rollback), 'rollback' (restore a promote's pre-swap state \u2014 pass operationId), 'update_draft' (replace an INACTIVE self-built draft's full JSON in place \u2014 pass workflowId + workflowJson; live workflows are refused, use the promote path), 'delete_draft' (inactive self-built drafts only). Get explicit user approval before activate, promote, rollback, and delete_draft. 429 quota_exceeded = daily plan limit; 403 consent_required \u2192 send user to settingsUrl.",
40685
+ description: "Workflow lifecycle writes on the client's n8n, all consent-gated and audited server-side. Actions: 'validate' (structural + n8n-mcp check of workflowJson \u2014 ALWAYS validate before create_draft), 'create_draft' (creates an INACTIVE '[CLI] ' workflow tagged awm:client-cli; returns its webhook URLs), 'activate'/'deactivate' (activation strips the [CLI] prefix; production webhooks respond only while active; agency-managed workflows are refused), 'promote' (swaps a TESTED draft into the live workflow IN PLACE \u2014 live id + webhookIds preserved so external callers keep working; pass workflowId=the LIVE id and draftId=the tested draft; the draft is archived '[promoted <date>]'; response includes operationId for rollback), 'rollback' (restore a promote's pre-swap state \u2014 pass operationId), 'update_draft' (replace an INACTIVE self-built draft's full JSON in place \u2014 pass workflowId + workflowJson; live workflows are refused, use the promote path), 'delete_draft' (inactive self-built drafts only). Get explicit user approval before activate, promote, rollback, and delete_draft. 429 quota_exceeded = daily plan limit; 403 consent_required \u2192 send user to settingsUrl; 409 n8n_credential_invalid = the user's OWN n8n rejected the stored API key (NOT a hub outage \u2014 reads and validate keep working because they never touch their instance): tell them to create a new API key in their n8n under Settings \u2192 n8n API, paste it into their Awesomate account at hub.awesomate.ai/n8n/settings, then retry.",
40681
40686
  inputSchema: {
40682
40687
  action: external_exports.enum(["validate", "create_draft", "update_draft", "activate", "deactivate", "promote", "rollback", "delete_draft"]),
40683
40688
  workflowJson: external_exports.record(external_exports.unknown()).optional().describe("For validate: the full workflow JSON. For create_draft: must contain name, nodes, connections (settings optional)."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
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",
@@ -1,5 +1,11 @@
1
1
  {
2
2
  "versions": [
3
+ {
4
+ "version": "0.19.1",
5
+ "highlights": [
6
+ "When your n8n API key stops working, Claude now tells you exactly how to fix it instead of reporting a confusing server error"
7
+ ]
8
+ },
3
9
  {
4
10
  "version": "0.19.0",
5
11
  "highlights": [
@@ -14,13 +20,13 @@
14
20
  "highlights": [
15
21
  "Search your knowledge base with filters and ask questions within a slice of your content",
16
22
  "People & entities: your knowledge base now recognises who appears in your content, and you can name and merge them",
17
- "Build AI agents from your own content drafted, tested privately, and published only when you approve"
23
+ "Build AI agents from your own content \u2014 drafted, tested privately, and published only when you approve"
18
24
  ]
19
25
  },
20
26
  {
21
27
  "version": "0.14.0",
22
28
  "highlights": [
23
- "Tools built for business owners, not developers plain-language answers about your account, plan and limits",
29
+ "Tools built for business owners, not developers \u2014 plain-language answers about your account, plan and limits",
24
30
  "New support skill: get help, understand credits, or request a done-for-you build without leaving Claude",
25
31
  "New database skill: Claude picks the right place to keep your data and sets it up for you"
26
32
  ]
@@ -3,6 +3,34 @@
3
3
  Diagnosis playbook. Work the flow top-to-bottom; do not jump to fixes before
4
4
  you have the failing execution's detail.
5
5
 
6
+
7
+ ## "Could not create the draft" / writes fail while reads work
8
+
9
+ If reads, `awesomate_n8n_context` and `validate` all succeed but every WRITE
10
+ (create draft, activate, promote, test-fire) fails, the cause is almost always
11
+ the account's stored n8n API key — not the hub, not Cloudflare, not the
12
+ workflow JSON. Validation runs on Awesomate's side and never touches the
13
+ instance, which is exactly why it keeps passing.
14
+
15
+ The server says so explicitly: HTTP **409** with `code: n8n_credential_invalid`.
16
+ Older builds reported this as a 502, which reads like an outage — if you see a
17
+ bare 502 on writes only, suspect the key before you suspect the platform.
18
+
19
+ **Tell the user to do this, in this order:**
20
+
21
+ 1. Open their n8n (the response's `instanceUrl`, e.g. `https://<slug>.awesomate.io`)
22
+ → **Settings → n8n API** → **Create an API key**. Copy it.
23
+ 2. Open **https://hub.awesomate.ai/n8n/settings** → paste it into
24
+ **"New n8n API Key"** → save. The status chip should go from
25
+ *Key rejected* to *Connected*.
26
+ 3. Retry the action.
27
+
28
+ Do not retry before they confirm the new key is saved, and do not go probing
29
+ hub or Cloudflare status — a genuine hub problem breaks reads too.
30
+
31
+ Common causes: the key was revoked or regenerated in n8n, or the instance was
32
+ rebuilt (a rebuilt instance shows 0 workflows and invalidates every old key).
33
+
6
34
  ## Diagnosis flow
7
35
 
8
36
  1. `awesomate_n8n_context` — confirm consent flags, capabilities, and the