@awesomate/hosting-mcp 0.13.0 → 0.14.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
@@ -39913,8 +39913,8 @@ function hubPost(config3, path, jsonBody = {}) {
39913
39913
  function hubPatch(config3, path, jsonBody = {}) {
39914
39914
  return hubRequest(config3, "PATCH", path, jsonBody);
39915
39915
  }
39916
- function hubDelete(config3, path) {
39917
- return hubRequest(config3, "DELETE", path);
39916
+ function hubDelete(config3, path, jsonBody) {
39917
+ return hubRequest(config3, "DELETE", path, jsonBody);
39918
39918
  }
39919
39919
 
39920
39920
  // src/skills.ts
@@ -40282,6 +40282,132 @@ server.registerTool(
40282
40282
  }
40283
40283
  }
40284
40284
  );
40285
+ server.registerTool(
40286
+ "awesomate_support",
40287
+ {
40288
+ description: "Help the user with the service itself \u2014 questions, being stuck, or reaching a human. action 'faq' {q} searches the published help library (answer FROM the results; never invent policy or pricing). action 'create_ticket' {subject, message} opens a support ticket \u2014 draft it in the user's words, SHOW it, and get an explicit yes before sending; it emails the Awesomate team and returns a portal URL. action 'list_tickets' shows their tickets and status. Use the awesomate-support skill for the full flow. Not for building \u2014 route n8n work to awesomate-n8n and hosting to awesomate-hosting.",
40289
+ inputSchema: {
40290
+ action: external_exports.enum(["faq", "create_ticket", "list_tickets"]),
40291
+ q: external_exports.string().optional().describe("faq only: the question"),
40292
+ subject: external_exports.string().optional().describe("create_ticket only"),
40293
+ message: external_exports.string().optional().describe("create_ticket only: the body, in the user's words")
40294
+ }
40295
+ },
40296
+ async ({ action, q, subject, message }) => {
40297
+ try {
40298
+ const cfg = requireConfig();
40299
+ if (action === "faq") {
40300
+ return textResult(await hubGet(cfg, `/api/help/faq${q ? `?q=${encodeURIComponent(q)}` : ""}`));
40301
+ }
40302
+ if (action === "list_tickets") {
40303
+ return textResult(await hubGet(cfg, "/api/support/tickets"));
40304
+ }
40305
+ if (!subject || !message) return errorResult(new Error("create_ticket needs subject and message"));
40306
+ return textResult(await hubPost(cfg, "/api/support/tickets", { subject, body_text: message }));
40307
+ } catch (err) {
40308
+ return errorResult(err);
40309
+ }
40310
+ }
40311
+ );
40312
+ server.registerTool(
40313
+ "awesomate_request_build",
40314
+ {
40315
+ description: "Submit a DONE-FOR-YOU automation request \u2014 the Awesomate team builds it, for clients who'd rather not build it themselves or whose request is beyond what you can build here. This SPENDS 1 CREDIT ($100). Two steps, always: call WITHOUT confirmCredit first \u2014 it returns the cost and the user's available balance and spends nothing; state both to the user in plain words, get an explicit yes, THEN call again with confirmCredit:true. Needs a wizard-enabled plan (Pro/Embedded) \u2014 a Support Plus user gets upgrade_required, relay it honestly. On success returns a tracking URL (progress shows on My Automations).",
40316
+ inputSchema: {
40317
+ title: external_exports.string().describe("Short name for the automation"),
40318
+ description: external_exports.string().describe("What it should do, triggered by what, with what outcome (min 20 chars)"),
40319
+ details: external_exports.record(external_exports.unknown()).optional().describe("Optional structured extras (apps, volumes)"),
40320
+ confirmCredit: external_exports.boolean().optional().describe("Omit for the free preview; true ONLY after the user approves the 1-credit cost")
40321
+ }
40322
+ },
40323
+ async ({ title, description, details, confirmCredit }) => {
40324
+ try {
40325
+ return textResult(await hubPost(requireConfig(), "/api/workflows/machine-request", { title, description, details, confirmCredit }));
40326
+ } catch (err) {
40327
+ return errorResult(err);
40328
+ }
40329
+ }
40330
+ );
40331
+ server.registerTool(
40332
+ "awesomate_site_create",
40333
+ {
40334
+ description: "Create a WordPress site on the user's hosting. Plan limits are enforced server-side (429/403 with an upgrade hint if they're at their cap \u2014 relay it). Ask 'live or dev?' first per the awesomate-hosting skill. Returns the new site's admin details.",
40335
+ inputSchema: {
40336
+ domain: external_exports.string().optional().describe("Custom domain if they have one; omit for a default *.awesomate.site subdomain"),
40337
+ siteTitle: external_exports.string().optional(),
40338
+ adminEmail: external_exports.string().optional().describe("Defaults to the account email")
40339
+ }
40340
+ },
40341
+ async ({ domain, siteTitle, adminEmail }) => {
40342
+ try {
40343
+ return textResult(await hubPost(requireConfig(), "/api/client-hosting/sites", { domain, siteTitle, adminEmail }));
40344
+ } catch (err) {
40345
+ return errorResult(err);
40346
+ }
40347
+ }
40348
+ );
40349
+ server.registerTool(
40350
+ "awesomate_domain_add",
40351
+ {
40352
+ description: "Add a custom domain to the user's hosting account. Returns the DNS steps they need to complete at their registrar. Plan-gated (some plans allow zero custom domains \u2014 relay the upgrade hint on 403).",
40353
+ inputSchema: { domain: external_exports.string().describe("The domain to add, e.g. example.com") }
40354
+ },
40355
+ async ({ domain }) => {
40356
+ try {
40357
+ return textResult(await hubPost(requireConfig(), "/api/client-hosting/domains", { domain }));
40358
+ } catch (err) {
40359
+ return errorResult(err);
40360
+ }
40361
+ }
40362
+ );
40363
+ server.registerTool(
40364
+ "awesomate_run_wp_cli",
40365
+ {
40366
+ description: "Run an allowlisted WP-CLI command on one of the user's WordPress sites (plugin/theme list+activate+update, cache flush, option get/update, post/media/menu/comment/user list). Installs accept wp.org SLUGS only \u2014 never URLs. args is the command as an array, e.g. ['plugin','list'] or ['plugin','install','wordpress-seo','--activate']. A 400 wp_cli_not_allowed means that command isn't permitted; a 502 wp_cli_unavailable is a temporary server-side issue, not your command.",
40367
+ inputSchema: {
40368
+ domain: external_exports.string().describe("The site domain"),
40369
+ args: external_exports.array(external_exports.string()).describe("WP-CLI args, e.g. ['plugin','list']")
40370
+ }
40371
+ },
40372
+ async ({ domain, args }) => {
40373
+ try {
40374
+ return textResult(await hubPost(requireConfig(), `/api/client-hosting/sites/${encodeURIComponent(domain)}/wp-cli`, { args }));
40375
+ } catch (err) {
40376
+ return errorResult(err);
40377
+ }
40378
+ }
40379
+ );
40380
+ server.registerTool(
40381
+ "awesomate_uninstall_site",
40382
+ {
40383
+ description: "Permanently delete a WordPress site (files + database). IRREVERSIBLE \u2014 snapshot first if the user might want it back, and always get explicit confirmation. You MUST pass confirm equal to the exact domain, or the hub refuses. Support Plus+.",
40384
+ inputSchema: {
40385
+ domain: external_exports.string().describe("The site domain to delete"),
40386
+ confirm: external_exports.string().describe("Must equal domain exactly \u2014 proof of intent")
40387
+ }
40388
+ },
40389
+ async ({ domain, confirm }) => {
40390
+ try {
40391
+ return textResult(await hubDelete(requireConfig(), `/api/client-hosting/sites/${encodeURIComponent(domain)}`, { confirm }));
40392
+ } catch (err) {
40393
+ return errorResult(err);
40394
+ }
40395
+ }
40396
+ );
40397
+ server.registerTool(
40398
+ "awesomate_app_provision_db",
40399
+ {
40400
+ description: "Add a Postgres database to an EXISTING Node app that doesn't have one \u2014 one DB per environment, with DATABASE_URL injected into each app environment (restart/redeploy to pick it up). The password is set server-side and never returned. Support Plus+; static apps and apps that already have a DB are refused. Use the awesomate-database skill's decision tree first \u2014 a simple list an automation reads/writes is often better as an n8n data table.",
40401
+ inputSchema: { appId: external_exports.number().int().positive().describe("The app id from awesomate_app_list / _get") }
40402
+ },
40403
+ async ({ appId }) => {
40404
+ try {
40405
+ return textResult(await hubPost(requireConfig(), `/api/my-apps/apps/${appId}/provision-db`, {}));
40406
+ } catch (err) {
40407
+ return errorResult(err);
40408
+ }
40409
+ }
40410
+ );
40285
40411
  readTool(
40286
40412
  "awesomate_get_hosting_status",
40287
40413
  "The hosting account's provisioning state: eligible/provisioned flags, in-progress provisioning step, primary domain, cPanel server, DNS targets. Use before suggesting any site action.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Awesomate MCP server \u2014 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",
@@ -24,7 +24,9 @@ own hosting) but you should always confirm the **stack + name** before creating.
24
24
  off to the awesomate-hosting skill).
25
25
  - `firstRun` + `suggestions[]` — on first run, greet warmly and offer the
26
26
  suggestions as a short menu ("Here's what I can do for you… what would
27
- you like?"). Don't dump all tools.
27
+ you like?"). Don't dump all tools. Pick what to offer from
28
+ [references/solutions.md](references/solutions.md) — the recipe catalog
29
+ of business outcomes, with what each needs and who builds each part.
28
30
  - `apps[]` — their existing apps; offer to continue one instead of starting
29
31
  over.
30
32
 
@@ -0,0 +1,125 @@
1
+ # Solutions — the recipes the greeter offers from
2
+
3
+ Business-outcome recipes, each composed only of parts that exist. Lead with
4
+ the outcome, never the technology. Reads work on every plan; **every build
5
+ below needs Support Plus+** — say so once, honestly, before starting (a 403
6
+ on a write is the plan gate; offer the upgrade, don't retry). Anything that
7
+ sends email needs an email credential in THEIR n8n — check the inventory
8
+ (`awesomate_n8n_inspect {what:'credentials'}`) before promising it.
9
+
10
+ ## capture-leads-and-follow-up
11
+
12
+ **What you get:** every enquiry on your website lands in your inbox and on a
13
+ list — answered the same day, never lost, never duplicated.
14
+ **Made of:** a WP page or `static-landing` page with a form → server-side
15
+ forwarder → n8n webhook workflow that emails the owner, saves the lead to a
16
+ data table (deduped by email), and optionally sends the lead an instant reply.
17
+ **Needs:** Support Plus+. Email credential (existing Gmail, or SMTP/Resend
18
+ key). WP wiring per awesomate-n8n `references/wp-form-handler.md`.
19
+ **Build order:**
20
+ 1. awesomate-n8n — webhook workflow + lead data table; test with fake payloads.
21
+ 2. awesomate-credentials — email key if none exists (routes to n8n).
22
+ 3. awesomate-app-builder (static page) or awesomate-hosting (WP page) — form +
23
+ forwarder per wp-form-handler.md; verify both hops end-to-end.
24
+ 4. awesomate-seo — the page is public.
25
+
26
+ ## take-bookings
27
+
28
+ **What you get:** customers pick a time on your site; it lands in your
29
+ calendar with a confirmation email to both of you — no double bookings.
30
+ **Made of:** WP/static page with a booking form → forwarder → n8n webhook
31
+ workflow: check a slots data table (double-booking guard) → create the
32
+ calendar event → send confirmations.
33
+ **Needs:** Support Plus+. Google Calendar credential + email credential in
34
+ their n8n (guided OAuth if missing).
35
+ **Build order:**
36
+ 1. awesomate-n8n — workflow + slots data table; test slot-taken and happy path.
37
+ 2. awesomate-credentials — calendar/email credentials (routes to n8n).
38
+ 3. awesomate-app-builder or awesomate-hosting — booking page + forwarder.
39
+ 4. awesomate-seo — the page is public.
40
+
41
+ ## customer-database-plus-simple-portal
42
+
43
+ **What you get:** one place holding all your customers, and a login page
44
+ where each customer sees their own details.
45
+ **Made of:** Node app (`node-auth-sync` — signup/login built in) + its own
46
+ app database (`awesomate_app_provision_db` — one Postgres per env,
47
+ `DATABASE_URL` injected). Customer data lives in the app DB, never a data
48
+ table. Optional n8n workflow for "new customer" email alerts.
49
+ **Needs:** Support Plus+ (app building). No external credential to start;
50
+ email credential only if alerts are wanted.
51
+ **Build order:**
52
+ 1. awesomate-app-builder — confirm name + stack, `awesomate_app_create`,
53
+ scaffold, build on dev; awesomate-github backup immediately after scaffold.
54
+ 2. awesomate-credentials — any secrets the app needs (encrypted, injected).
55
+ 3. awesomate-n8n — optional alert workflow called from the app.
56
+ 4. Promote dev → live only on explicit approval; awesomate-seo if public.
57
+
58
+ ## quote-or-invoice-follow-up
59
+
60
+ **What you get:** quotes and invoices that go quiet get a polite chaser
61
+ automatically — you stop leaving money on the table.
62
+ **Made of:** n8n scheduled workflow + data table holding each quote's status
63
+ and last-chase date (the cursor + dedupe) + email credential. Source of
64
+ quotes: a data table the owner updates, or an already-connected app from the
65
+ credential inventory — verify, never assume a credential works.
66
+ **Needs:** Support Plus+. Email credential. No page required.
67
+ **Build order:**
68
+ 1. awesomate-n8n — quotes data table + scheduled chaser workflow.
69
+ 2. awesomate-credentials — email key if none exists.
70
+ 3. Test with fake quotes ([TEST] subjects to the owner's own inbox); hand
71
+ over the workflow URL and how to add/close a quote.
72
+
73
+ ## newsletter-signup
74
+
75
+ **What you get:** a signup box on your site that builds a clean subscriber
76
+ list and sends each new subscriber a welcome email.
77
+ **Made of:** WP/static page with a signup form → forwarder → n8n webhook
78
+ workflow → subscriber data table (deduped by email) + welcome email.
79
+ **Needs:** Support Plus+. Email credential.
80
+ **Build order:**
81
+ 1. awesomate-n8n — webhook workflow + subscriber data table.
82
+ 2. awesomate-credentials — email key if none exists.
83
+ 3. awesomate-app-builder or awesomate-hosting — signup form + forwarder
84
+ (wp-form-handler.md); verify a test signup lands once, not twice.
85
+ 4. awesomate-seo — the page is public.
86
+
87
+ ## ai-chat-on-your-site
88
+
89
+ **What you get:** a chat bubble on your site that answers customer questions
90
+ about your business, day and night.
91
+ **Made of:** n8n chat agent (chatTrigger `mode:"webhook"` → agent + model
92
+ credential — awesomate-n8n `references/ai-agents.md`, incl. the chat widget
93
+ embed) + the embed snippet on their WP or static page. Optional data table
94
+ for FAQs the agent looks up.
95
+ **Needs:** Support Plus+. A model credential (OpenRouter/OpenAI/Anthropic)
96
+ in their n8n — none = stop and ask, never invent one.
97
+ **Build order:**
98
+ 1. awesomate-n8n — agent workflow per ai-agents.md; test conversations first.
99
+ 2. awesomate-credentials — model API key if none exists (routes to n8n).
100
+ 3. awesomate-app-builder or awesomate-hosting — embed the widget on the page.
101
+ 4. Try it together on the live page; agree what the agent must NOT answer.
102
+
103
+ ## order-status-notifications
104
+
105
+ **What you get:** customers hear from you automatically the moment their
106
+ order is received, shipped, or delayed — fewer "where's my order?" emails.
107
+ **Made of:** n8n webhook workflow fed by their shop (WooCommerce webhook,
108
+ server-to-server) or their own Node app → status-ledger data table (dedupe:
109
+ one notification per order per status) → email to the customer.
110
+ **Needs:** Support Plus+. Email credential. A shop or app that emits order
111
+ events — if neither exists yet, this recipe comes after the shop does.
112
+ **Build order:**
113
+ 1. awesomate-n8n — webhook workflow + status data table; test every status.
114
+ 2. awesomate-credentials — email key if none exists.
115
+ 3. awesomate-hosting — point the WooCommerce webhook at the workflow (or
116
+ wire the app's order code to call it).
117
+ 4. Confirm a real test order notifies exactly once per status change.
118
+
119
+ ## Offering these
120
+
121
+ After understanding the business (first-run questions + inventory), offer
122
+ the **2–3 most relevant recipes** as a one-line menu — "I could set up A, B,
123
+ or C — which sounds most useful?" Never list all seven, never lead with the
124
+ technology, and state the plan requirement before building. If none fit,
125
+ ask one more short question instead of forcing a recipe.
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: awesomate-database
3
+ description: Pick and set up the right place to keep the user's data — an n8n data table, an app Postgres database, or a workflow Postgres. Use when the user says "database", "postgres", "store data", "keep track of", "customer records", "save submissions", "remember this", "where should this data live", or expresses any need to persist data for an app or automation.
4
+ ---
5
+
6
+ # Awesomate Database — put the data in the right place
7
+
8
+ The user is a business owner, not a developer. They say "I need to keep
9
+ track of X" — your whole job here is routing that to the right store and
10
+ setting it up without making them learn the difference. Plain words, one
11
+ or two short questions at a time, cost and plan before acting. For tone,
12
+ read the voice reference installed at
13
+ ~/.claude/skills/awesomate-hosting/references/voice.md.
14
+
15
+ ## 0. The decision tree FIRST
16
+
17
+ Do not provision anything until you know which of these four the ask is.
18
+ One question usually settles it: "is this for an automation to read and
19
+ write, or for an app your customers log into?"
20
+
21
+ **(a) A list an AUTOMATION reads/writes** — a dedupe ledger, a task
22
+ queue, a lookup map, form submissions feeding a workflow. → n8n DATA
23
+ TABLE, via the awesomate-n8n skill. Create and write with
24
+ `awesomate_n8n_datatable_write`, and pass `workflowId` so the table is
25
+ co-located with the workflow that uses it. No hosting slot consumed, and
26
+ workflows query it directly — this is the default answer for anything
27
+ automation-shaped. Inspect what exists with
28
+ `awesomate_n8n_inspect {what:'datatables'}`.
29
+
30
+ **(b) Real APP data** — logins, dashboards, anything relational that an
31
+ app serves to people. → the app's own Postgres.
32
+ - Existing app: `awesomate_app_provision_db {appId}`. Support Plus and
33
+ above. One database per environment; `DATABASE_URL` appears in the
34
+ app's environment, and the app needs a restart/redeploy to pick it up.
35
+ - New app: don't provision separately — create the app WITH a database
36
+ via the awesomate-app-builder skill, which wires it in from the start.
37
+
38
+ **(c) A WORKFLOW that needs raw SQL against its own Postgres** — real
39
+ joins, aggregates, or volumes a data table shouldn't carry. →
40
+ `awesomate_n8n_provision_pg`. One step creates the database AND the n8n
41
+ credential, so the workflow can query it immediately.
42
+
43
+ **(d) Analytics/BI or data shared with other systems** — reporting
44
+ warehouses, a spreadsheet the whole team lives in, a CRM. → recommend
45
+ keeping the data where it already lives and connecting n8n to it. Moving
46
+ source-of-truth data to make a workflow's life easier creates two truths;
47
+ say so in one sentence and connect instead.
48
+
49
+ When two branches could fit, recommend one and say why in a line —
50
+ never quiz the user on architecture.
51
+
52
+ ## 1. Schema talk, in plain words
53
+
54
+ Never ask for a schema. Ask what they want to remember:
55
+
56
+ > "Tell me what you want to remember about each customer — I'll set up
57
+ > the columns."
58
+
59
+ Translate their answer yourself. For data tables the column types are
60
+ string, number, boolean, and date — map "their email" to string, "how
61
+ much they paid" to number, "have we contacted them" to boolean, "when
62
+ they signed up" to date. Read the plan back as an outcome, not DDL:
63
+ "each row will be one customer: name, email, amount paid, contacted
64
+ yes/no, signup date — sound right?" Then build it. Same conversation for
65
+ Postgres tables; the SQL is your problem, not theirs.
66
+
67
+ If anything created here will be public-facing (an app people can
68
+ reach), ask "live or dev?" before provisioning against it.
69
+
70
+ ## 2. Safety rules
71
+
72
+ - **Passwords are shown ONCE by provisioning and land where they
73
+ belong** — the app's environment for `awesomate_app_provision_db`,
74
+ the n8n credential for `awesomate_n8n_provision_pg`. Never echo a
75
+ password into chat, and never put a `DATABASE_URL` in a message. Tell
76
+ the user where it lives instead: "the app already has its connection —
77
+ nothing for you to copy."
78
+ - Secrets the user's own app code needs (API keys, tokens) go through
79
+ the awesomate-credentials skill, never pasted into files or chat.
80
+ - **Deleting data requires an explicit filter and an explicit yes.**
81
+ "Delete the test rows" → show which rows match ("that's 14 rows where
82
+ email ends in @example.com — delete them?"), get the yes, then act.
83
+ There is deliberately no delete-all; do not build one by looping.
84
+
85
+ ## 3. Limits, honestly
86
+
87
+ Provisioning quotas are per-day and plan-gated. App databases
88
+ (`awesomate_app_provision_db`) and workflow Postgres
89
+ (`awesomate_n8n_provision_pg`) need Support Plus or above; data tables
90
+ work on any plan with n8n access. If the user's plan doesn't cover what
91
+ branch (b) or (c) needs, say it once — "app databases are on Support
92
+ Plus" — point them at hub.awesomate.ai/billing to upgrade, then help
93
+ fully within what their plan allows. Usually that means branch (a): a
94
+ data table covers more "keep track of X" asks than people expect. If a
95
+ daily quota is hit, say when it resets and what can proceed meanwhile.
96
+
97
+ Report every result as a business outcome: "your workflow now remembers
98
+ every invoice it's processed, so no customer gets emailed twice" — with
99
+ the URL where they can see it.
@@ -0,0 +1,106 @@
1
+ # Voice — talking to business owners
2
+
3
+ Shared reference for every awesomate skill. The user runs a business, not a
4
+ terminal. Every message should survive being read aloud to them. When in
5
+ doubt: outcome first, cost before spend, one question at a time.
6
+
7
+ ## The rules
8
+
9
+ 1. **Lead with the outcome, not the technology.**
10
+ Bad: "Provisioned a node-crud-postgres scaffold with a managed PG16 db."
11
+ Good: "Your booking app exists now — next I'll add the signup form."
12
+
13
+ 2. **Translate every artifact into what it does for the business.**
14
+ Bad: "The webhook returns 200 and the workflow is active."
15
+ Good: "From now on, every new enquiry lands in your inbox automatically."
16
+
17
+ 3. **One or two short questions at a time.** Never a questionnaire.
18
+ Bad: "What's the name, audience, colour scheme, CTA, domain, and budget?"
19
+ Good: "What should the page get people to do — book a call, or buy?"
20
+
21
+ 4. **Say what it costs before doing it.** Credits, plan gates, or "free on
22
+ your plan" — before the action, never as a surprise after.
23
+ Bad: "Done! That used 2 credits."
24
+ Good: "This build will use 2 credits ($200). Want me to go ahead?"
25
+
26
+ 5. **Ask "live or dev?" before anything public.** Recommend dev.
27
+ Bad: "Pushed to production."
28
+ Good: "Want this on your live site, or on your dev site to review first?
29
+ I'd start with dev — nobody sees it until you're happy."
30
+
31
+ 6. **Report results with a URL they can click, right now.**
32
+ Bad: "Deploy pipeline succeeded on main."
33
+ Good: "It's live — have a look: https://offers.acme.awesomate.dev"
34
+
35
+ 7. **Recommend; never quiz them on architecture.** You are the expert.
36
+ Bad: "Do you want Postgres or MySQL? SSR or static? REST or webhooks?"
37
+ Good: "I'd build this as a simple landing page — fastest to load and
38
+ easiest to change. Sound good?"
39
+
40
+ 8. **No unexplained jargon.** Explain a term only when they need it to
41
+ decide; otherwise use the plain word.
42
+ Bad: "Your DNS CNAME needs to propagate before TLS issuance."
43
+ Good: "Your new domain takes up to an hour to switch on. I'll check it."
44
+
45
+ 9. **Confirm names and anything hard to undo before acting.** App names
46
+ become web addresses; deletes are forever.
47
+ Bad: "Created app xk9-test-2."
48
+ Good: "I'll call it 'bookings' — that becomes bookings.acme.awesomate.site.
49
+ OK?"
50
+
51
+ 10. **When something fails, say what you're doing about it.** Never paste a
52
+ stack trace or raw error.
53
+ Bad: "TypeError: Cannot read properties of undefined at line 114..."
54
+ Good: "The form isn't saving yet — I found the cause and I'm fixing it.
55
+ Two minutes."
56
+
57
+ 11. **Honest upsells only.** Name the plan and price once, link, move on.
58
+ Never pressure, never repeat it in the same conversation.
59
+ Bad: "Unlock the FULL power of automation with Support Plus today!!"
60
+ Good: "Building automations needs Support Plus ($x/mo). You can upgrade
61
+ at hub.awesomate.ai/billing — or I can keep going with what your plan
62
+ includes."
63
+
64
+ 12. **Say what happens next, not how it works inside.**
65
+ Bad: "The reconciler cron will pick this up within 15 minutes."
66
+ Good: "This finishes on its own in about 15 minutes — I'll confirm when
67
+ it's done."
68
+
69
+ ## Money talk
70
+
71
+ - A **credit is $100, always, on every plan** — one pool for everything: an
72
+ automation build, a request, or a 1:1 session. Never invent a second
73
+ currency and never say "free workflows".
74
+ - **State the cost before spending.** "This will use 1 credit ($100) — go
75
+ ahead?" If their balance can't cover it, say so before starting, not after.
76
+ - **Purchases and upgrades happen in the browser**, not in chat. Link to the
77
+ hub billing page; never take card details or simulate a purchase here.
78
+ - If something is included in their plan, say that too — "this one's covered
79
+ by your plan" is information they want.
80
+
81
+ ## Failure talk
82
+
83
+ Three beats, in order, every time:
84
+
85
+ 1. **What happened**, in business terms: "the email step failed, so the last
86
+ 3 enquiries didn't get a reply."
87
+ 2. **What I'm doing about it**: retrying, fixing the cause, rolling back.
88
+ Give a time horizon when you can. Never paste the raw error.
89
+ 3. **When to escalate**: if you can't fix it in this session, or it involves
90
+ billing, account access, or data loss, say plainly: "This needs the
91
+ Awesomate team — I'll summarise it so you can send it to support." Don't
92
+ keep retrying in silence.
93
+
94
+ If you broke it, say so. "My last change caused this; I've rolled it back"
95
+ builds more trust than vagueness.
96
+
97
+ ## Pacing
98
+
99
+ - **Menus beat open questions.** "Want A, B, or C?" gets an answer;
100
+ "what are your requirements?" gets silence.
101
+ - **Don't over-interview.** Two or three exchanges of discovery, then
102
+ recommend and start. You can adjust once they see something real.
103
+ - **Show early.** A rough page they can click teaches more than a paragraph
104
+ describing it. Bias toward "here's a first version" over "here's my plan".
105
+ - **One thing at a time.** Finish and show a step before proposing the next
106
+ three. Progress they can see is the pace they can feel.
@@ -50,6 +50,14 @@ const apiBase = (arg('api', 'https://hub.awesomate.ai')).replace(/\/$/, '');
50
50
  if (process.argv.includes('--update')) {
51
51
  try {
52
52
  installSkill();
53
+ // Also converge the MCP registration: --update is the no-token repair
54
+ // path, and a broken registration (e.g. bare-npx on Windows) is exactly
55
+ // what people run it to fix.
56
+ try {
57
+ ensureMcpRegistration();
58
+ } catch (regErr) {
59
+ console.error('Skill files refreshed, but the MCP registration could not be updated:', regErr?.message ?? regErr);
60
+ }
53
61
  console.log('Skills refreshed. New content applies in your next Claude Code session.');
54
62
  process.exit(0);
55
63
  } catch (err) {
@@ -345,10 +353,18 @@ function installSkill() {
345
353
  // 2026-07-28). npx treats both forms identically at runtime; the = form keeps
346
354
  // the value glued to the token so these args are safe to copy anywhere.
347
355
  // The explicit package must stay: this package ships two bins.
348
- const CLEAN_ENTRY = {
349
- command: 'npx',
350
- args: ['-y', '--package=@awesomate/hosting-mcp', 'awesomate-hosting-mcp'],
351
- };
356
+ // Windows: a bare `npx` spawn fails silently (it's npx.cmd there), so the
357
+ // server never starts and the tools never appear — even after a restart.
358
+ // First observed on the first Windows client, 2026-08-19. cmd /c resolves it.
359
+ const CLEAN_ENTRY = process.platform === 'win32'
360
+ ? {
361
+ command: 'cmd',
362
+ args: ['/c', 'npx', '-y', '--package=@awesomate/hosting-mcp', 'awesomate-hosting-mcp'],
363
+ }
364
+ : {
365
+ command: 'npx',
366
+ args: ['-y', '--package=@awesomate/hosting-mcp', 'awesomate-hosting-mcp'],
367
+ };
352
368
  const MANUAL_ADD_JSON = JSON.stringify({ mcpServers: { 'awesomate-hosting': CLEAN_ENTRY } }, null, 2);
353
369
 
354
370
  /**
@@ -377,7 +393,11 @@ function ensureMcpRegistration() {
377
393
 
378
394
  const entry = cfg.mcpServers?.['awesomate-hosting'];
379
395
  const entryIsClean =
380
- entry && !entry.env?.AWESOMATE_PAT && JSON.stringify(entry.args ?? []).includes('awesomate-hosting-mcp');
396
+ entry &&
397
+ !entry.env?.AWESOMATE_PAT &&
398
+ JSON.stringify(entry.args ?? []).includes('awesomate-hosting-mcp') &&
399
+ // A bare-npx registration is broken on Windows — rewrite it.
400
+ (process.platform !== 'win32' || entry.command === 'cmd');
381
401
 
382
402
  let changed = false;
383
403
  if (!entryIsClean) {
@@ -550,7 +570,13 @@ async function main() {
550
570
 
551
571
  const who = profile.email ? `${slug} (${profile.email}, plan ${redeemed.plan})` : `${slug} (plan ${redeemed.plan})`;
552
572
  console.log(`\n✓ Connected: ${who}${pinPath ? ` — pinned ${dirname(pinPath)}` : ''}`);
553
- console.log('Setup complete. Next: run awesomate_whoami to confirm the account, then ask me to read your plan and list your sites.');
573
+ console.log('Setup complete.');
574
+ console.log('');
575
+ console.log('IMPORTANT — restart Claude Code now: the MCP tools and skills load only at startup.');
576
+ console.log('Until the restart, builds still work — the assistant should follow');
577
+ console.log('~/.claude/skills/awesomate-n8n/references/rest-fallback.md (n8n) or');
578
+ console.log('~/.claude/skills/awesomate-hosting/references/rest-fallback.md (hosting).');
579
+ console.log('After restarting: run awesomate_whoami to confirm the account, then ask for your first build.');
554
580
  console.log('(The skill works in your current Claude session right away via its REST fallback — restart Claude Code when convenient to load the MCP tools.)');
555
581
  if (issues.length) {
556
582
  console.log(SUPPORT_HINT);
@@ -64,9 +64,11 @@ conflicts with anything under `references/vendor/`, platform-notes wins.
64
64
  | Provision a Postgres DB + n8n credential | `awesomate_n8n_provision_pg` |
65
65
  | Refresh these skills from the latest package | `awesomate_skill_update` |
66
66
 
67
- No MCP tools available (server not connected yet)? One restart of Claude
68
- Code usually fixes it; the awesomate-hosting skill's
69
- `references/rest-fallback.md` covers the interim.
67
+ No `awesomate_n8n_*` tools in this session (fresh bootstrap, or the server
68
+ didn't load)? Suggest a Claude Code restart once then BUILD ANYWAY:
69
+ [references/rest-fallback.md](references/rest-fallback.md) maps every tool
70
+ to its REST endpoint, and the full loop works over it. Never tell the user
71
+ they're blocked on a restart.
70
72
 
71
73
  ## 2. References — read on demand
72
74
 
@@ -0,0 +1,69 @@
1
+ # No MCP tools? The full build loop works over REST
2
+
3
+ The `awesomate_n8n_*` tools load only when Claude Code starts — a session
4
+ that just ran the bootstrap doesn't have them until the app restarts. That
5
+ must not block the user's first build: every tool is a thin wrapper over
6
+ these endpoints, so the ENTIRE loop (context → inventory → validate → draft
7
+ → test → activate) runs over plain REST. Tell the user a restart will make
8
+ this smoother, then build anyway.
9
+
10
+ ## Auth (never echo the token)
11
+
12
+ Read `~/.awesomate/credentials.json` (Windows:
13
+ `%USERPROFILE%\.awesomate\credentials.json`) with a small Node script — it
14
+ is JSON: `{ profiles: { <slug>: { pat, apiBase } }, defaultProfile }`. Pick
15
+ the profile named by `.awesomate.json`'s `{"account"}` in the project root
16
+ if present, else `defaultProfile`, else the sole profile. Send
17
+ `Authorization: Bearer <pat>` to `<apiBase>` (default
18
+ `https://hub.awesomate.ai`). On macOS/Linux,
19
+ `node ~/.claude/skills/awesomate-hosting/scripts/resolve-account.mjs --api`
20
+ prints `ACCT/API/PAT` in shell format (NOT JSON). Never print the PAT into
21
+ the conversation or logs.
22
+
23
+ ## Reads (any plan, consent-gated server-side)
24
+
25
+ | What | Endpoint |
26
+ |---|---|
27
+ | Session context + consent + limits + fingerprint (CALL FIRST) | `GET /api/my-n8n/machine/context` |
28
+ | All workflows, node-level summaries | `GET /api/my-n8n/machine/workflows?active=&limit=&offset=` |
29
+ | One workflow, full JSON | `GET /api/my-n8n/workflows/:id` |
30
+ | Node inventory rollup | `GET /api/my-n8n/machine/nodes` |
31
+ | Credential inventory (names/types, never secrets) | `GET /api/my-n8n/machine/credentials` |
32
+ | Credential type schema | `GET /api/my-n8n/machine/credentials/schema/:type` |
33
+ | `$vars` keys | `GET /api/my-n8n/machine/variables` |
34
+ | Datatables (+ rows) | `GET /api/my-n8n/machine/datatables` · `GET …/datatables/:id/rows?limit=` |
35
+ | Possibilities brief | `GET /api/my-n8n/machine/possibilities` |
36
+ | Executions | `GET /api/my-n8n/workflows/:id/executions` · `GET /api/my-n8n/executions/:execId` |
37
+ | Node-by-node execution debug | `GET /api/my-n8n/machine/executions/:execId/debug` |
38
+ | Live node docs + community templates | `POST /api/my-n8n/machine/node-catalog/:tool` — tool ∈ search_nodes, get_node, search_templates, get_template, validate_node, tools_documentation; body = the tool's args (e.g. `{"query":"gmail"}`, `{"nodeType":"n8n-nodes-base.gmail"}`) |
39
+
40
+ ## Writes (Support Plus+, consent + quotas + audit apply identically)
41
+
42
+ | Action | Endpoint |
43
+ |---|---|
44
+ | Validate workflow JSON | `POST /api/my-n8n/machine/workflows/validate` `{workflow}` |
45
+ | Create inactive `[CLI]` draft | `POST /api/my-n8n/machine/workflows/draft` `{name, nodes, connections, settings?}` |
46
+ | Update a draft in place | `PATCH /api/my-n8n/machine/workflows/:id` `{name?, nodes, connections, settings?}` |
47
+ | Activate / deactivate | `POST /api/my-n8n/machine/workflows/:id/activate` `{active: true|false}` |
48
+ | Test-fire the production webhook | `POST /api/my-n8n/machine/workflows/:id/test-fire` `{payload}` |
49
+ | Promote draft → live (webhookIds preserved) | `POST /api/my-n8n/machine/workflows/:id/promote` `{draftId}` (`:id` = LIVE id) |
50
+ | Roll a promote back | `POST /api/my-n8n/machine/operations/:operationId/rollback` |
51
+ | Delete an inactive draft | `DELETE /api/my-n8n/machine/workflows/:id` |
52
+ | Create a datatable (pass workflowId!) | `POST /api/my-n8n/machine/datatables` `{name, columns, workflowId?}` |
53
+ | Add a column / write rows | `POST …/datatables/:id/columns` · `POST …/datatables/:id/rows` `{mode, rows?/filter?/data?}` |
54
+ | Provision Postgres + n8n credential | `POST /api/my-n8n/machine/pg-credentials` |
55
+
56
+ ## Error contract (same as the tools)
57
+
58
+ - `403 consent_required` + `flag` + `settingsUrl` → relay the link, re-check
59
+ after the user toggles (a null `settingsUrl` means contact support).
60
+ - `403 missingScopes` → token predates n8n support — reconnect from
61
+ hub.awesomate.ai/sites.
62
+ - `429 quota_exceeded` → the plan's daily cap; stop, don't retry-loop.
63
+ - `503 node_catalog_unavailable` → use `references/vendor/` knowledge.
64
+ - `404` on a path in this table → check the path against this file
65
+ EXACTLY; do not probe variations — anything not listed here does not
66
+ exist, and everything listed here is the complete surface.
67
+
68
+ The skill's judgment (six-phase loop, approval gates, testing policy,
69
+ never-activate-a-copy) applies unchanged — only the transport differs.
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: awesomate-support
3
+ description: Help the user when they're stuck or have questions about the Awesomate service — plans, credits, billing, requesting a done-for-you build, or reaching a human. Use when the user says "I'm stuck", "help", "support", "talk to a human", "how do credits work", "what plan am I on", "how much does...", "request a build", "can you guys build this for me", or asks anything about pricing, policy, or what their plan includes.
4
+ ---
5
+
6
+ # Awesomate Support — answers, tickets, and done-for-you builds
7
+
8
+ The user is a business owner, not a developer. Answer in plain words, one or
9
+ two short questions at a time, and always say what something costs before
10
+ doing it. For tone, read the voice reference installed at
11
+ ~/.claude/skills/awesomate-hosting/references/voice.md.
12
+
13
+ ## 0. Orient
14
+
15
+ On the first support question in a session, call `awesomate_whoami` so you
16
+ know whose account and plan you're speaking for (`awesomate_get_context`
17
+ also carries the plan). Describe what a plan or upgrade INCLUDES from
18
+ `awesomate_get_plan_features`, not memory. For a live credit balance, use
19
+ `awesomate_request_build`'s free preview (below) — it returns the available
20
+ balance without spending anything. Never quote a plan, price, or balance
21
+ from memory.
22
+
23
+ ## 1. FAQ first
24
+
25
+ For any "how do I", "why does", "what is" question about the service:
26
+
27
+ 1. Call `awesomate_support {action:'faq', q:'<their question>'}`.
28
+ 2. Answer FROM the returned entries, in your own plain words. Cite nothing
29
+ the FAQ and tools didn't say — no invented policy, no guessed pricing.
30
+ 3. If the FAQ answers it, you're done. If it partially answers, give what
31
+ you have and say which part is unconfirmed.
32
+ 4. If it doesn't answer it: "I don't have a confirmed answer for that. Want
33
+ me to ask the Awesomate team? I'll draft a support ticket for you to
34
+ approve first." Then go to §2 if they say yes.
35
+
36
+ ## 2. Ticket flow — talking to a human
37
+
38
+ When the user wants a human, or §1 came up empty:
39
+
40
+ 1. Draft the ticket in the USER'S words — their description of the problem,
41
+ what they were trying to do, what happened. Add context you observed
42
+ (which site/app, what you already tried) in one short paragraph. No
43
+ stack traces, no jargon dumps.
44
+ 2. Show the full draft (subject + message) and ask plainly: "Send this to
45
+ the Awesomate team?" NEVER call `create_ticket` without an explicit yes.
46
+ 3. On yes: `awesomate_support {action:'create_ticket', subject, message}`.
47
+ Confirm: "Sent. The team replies by email, usually within a business
48
+ day."
49
+ 4. Later, "any update on my ticket?" →
50
+ `awesomate_support {action:'list_tickets'}` and report each ticket's
51
+ status in one line.
52
+
53
+ ## 3. Done-for-you build — spending a credit
54
+
55
+ Offer this when the ask exceeds what you can build from here, or the user
56
+ would rather hand it off ("can you guys just do it?"). It submits a request
57
+ to the Awesomate team, who scope, build, test, and deliver it.
58
+
59
+ 1. Summarize the automation in plain words — what triggers it, what it
60
+ does, what the user gets. Confirm the summary matches what they want.
61
+ 2. Call `awesomate_request_build` WITHOUT `confirmCredit` — a free
62
+ preview that returns the cost and their available balance, spending
63
+ nothing. State both in the same breath: "This costs 1 credit ($100).
64
+ You have N available. Go ahead?"
65
+ - Available = 0 → don't dead-end. Point them at hub.awesomate.ai/billing to top up;
66
+ purchases happen in the browser, never here.
67
+ 3. Only on an explicit yes:
68
+ `awesomate_request_build {title, description, confirmCredit:true}`.
69
+ The server refuses without `confirmCredit` — that flag is the user's
70
+ yes, so never set it before you have one.
71
+ 4. Explain what happens next: the Awesomate team reviews the request and
72
+ builds it; progress is visible at hub.awesomate.ai/my-workflows, and
73
+ the team follows up if anything needs clarifying.
74
+
75
+ ## 4. Plans and billing — honest, never pushy
76
+
77
+ - "What plan am I on?" / "what do I get?" → `awesomate_whoami` for the
78
+ plan, `awesomate_get_plan_features` for what it includes — report as facts.
79
+ - "How much to upgrade?" / "what would X plan give me?" →
80
+ `awesomate_get_plan_features` for what the plan includes, then point them
81
+ at hub.awesomate.ai/billing to see the price and upgrade. Name the plan once, link, move on.
82
+ All purchases happen
83
+ in the BROWSER at those links — never take payment details in chat.
84
+ - Credits: one currency, $100 each, spendable on a build request, an
85
+ automation, or a 1:1 session. Say "credits", never "free workflows".
86
+ - If a feature the user wants is on a higher plan, say so once, honestly
87
+ ("that's on Support Plus — here's the link if you want it"), then help
88
+ fully within what their plan allows. Never manufacture urgency.
89
+
90
+ ## 5. Hard rules
91
+
92
+ - **Never invent policy or pricing.** If the FAQ and tools don't say it,
93
+ say so and offer to check with the team via a ticket (§2).
94
+ - **Never create a ticket or spend a credit without explicit approval.**
95
+ Show the draft or the cost, get a clear yes, then act.
96
+ - **Route work to the right skill:** building or debugging n8n automations
97
+ → awesomate-n8n; sites, domains, WP-CLI, snapshots, deploys, hosting
98
+ limits → awesomate-hosting. This skill is for questions, humans, and
99
+ done-for-you requests — not for doing the technical work itself.
100
+ - When something fails mid-flow, tell the user what you're doing about it
101
+ in one sentence. Never paste an error dump at a business owner.