@awesomate/hosting-mcp 0.60.0 → 0.61.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
@@ -39879,13 +39879,15 @@ var SENTENCE = {
39879
39879
  not_released: "This isn't on your account yet.",
39880
39880
  turned_off_by_awesomate: "Awesomate has turned this off for your account.",
39881
39881
  switched_off_by_you: "You switched this off in Settings, Features.",
39882
- not_on_plan: "This comes with a higher plan."
39882
+ not_on_plan: "This comes with a higher plan.",
39883
+ plan_unreadable: "We couldn't check this just now. Try again shortly."
39883
39884
  };
39884
39885
  var NEXT = {
39885
39886
  not_released: "Do not retry and do not offer this feature. If the user asks for it, say it is not on their account yet: Awesomate opens new features account by account.",
39886
39887
  turned_off_by_awesomate: "Do not retry. If the user wants it, they can ask Awesomate (hub.awesomate.ai/support); nothing here can switch it back on.",
39887
39888
  switched_off_by_you: "Do not retry. The account owner can switch it back on in the hub under Settings, Features (hub.awesomate.ai/settings?tab=features); never do that for them.",
39888
- not_on_plan: "Do not retry. Relay the plan that includes it honestly (hub.awesomate.ai/billing) and let the user decide."
39889
+ not_on_plan: "Do not retry. Relay the plan that includes it honestly (hub.awesomate.ai/billing) and let the user decide.",
39890
+ plan_unreadable: "Awesomate could not read the account's plan just now: a moment's trouble on our side, not the user's plan. Wait a few seconds and try once more; if it still fails, tell the user to try again shortly. Never suggest an upgrade."
39889
39891
  };
39890
39892
  function isReason(value) {
39891
39893
  return typeof value === "string" && value in SENTENCE;
@@ -39911,7 +39913,7 @@ function featureRefusal(tool, features) {
39911
39913
  const key = TOOL_FEATURE[tool];
39912
39914
  if (!key || !features) return null;
39913
39915
  const entry = features[key];
39914
- if (!entry || entry.available) return null;
39916
+ if (!entry || entry.available || entry.reason === "plan_unreadable") return null;
39915
39917
  const reason = entry.reason ?? "not_released";
39916
39918
  const sentence = entry.message || SENTENCE[reason];
39917
39919
  const name = entry.label ?? key;
@@ -40009,7 +40011,7 @@ async function hubRequest(config3, method, path, jsonBody, opts = {}) {
40009
40011
  let hint = "";
40010
40012
  if (res.status === 401) {
40011
40013
  hint = " Your access token is invalid or expired \u2014 ask the user to open the hub Claude page (hub.awesomate.ai/claude), generate a fresh Connect prompt, and re-run the bootstrap.";
40012
- } else if (res.status === 403 && code === "feature_unavailable") {
40014
+ } else if ((res.status === 403 || res.status === 503) && code === "feature_unavailable") {
40013
40015
  const reason = body && typeof body === "object" ? body.reason : null;
40014
40016
  hint = featureUnavailableHint(reason);
40015
40017
  } else if (res.status === 403 && code === "consent_required") {
@@ -43027,7 +43029,7 @@ server.registerTool(
43027
43029
  "awesomate_crm_apps",
43028
43030
  {
43029
43031
  annotations: annotate("awesomate_crm_apps", MUTATING),
43030
- description: "The account's own apps (a client portal, a members' app) whose users sign in by email link and then read and change only what each kind's access rules allow them (awesomate_crm_kinds set_access). Pro and above to create or change; reading is every plan. action 'list': each app with its publishable key, allowed origins, sign-up mode and default role. action 'create' {name, allowed_origins, sign_up?, default_role?}: name appears in the sign-in email; allowed_origins are the exact origins the app runs on (https://portal.example.com; http://localhost:5173 for development; capacitor://localhost for the mobile shell), with no path and no wildcard; sign_up 'invite' (default: only people added with awesomate_crm_app_users) or 'open' (anyone who uses the email link gets the default role). action 'update' {app_id, ...any of those, status?}: status 'disabled' signs everyone out of that app and stops its server keys. The publishable key (pk_...) is not a secret: it goes in the app's browser code, with @awesomate/sdk. Never put the account's own token (amt_pat_...) in browser code. Confirm origins and sign-up mode with the user: open sign-up lets strangers in under the default role. action 'customer_lookup' {app_id, roles?}: which roles in that app may look customers up (name, email and phone, by search or id, with @awesomate/sdk lookupCustomers) and so put a record under any customer, not only themselves. Without roles it reads the setting; roles ['staff'] switches it on for staff; [] switches it off. Never the app's default role (the one customers sign in with): that would show every customer to every other customer, and the hub refuses it. Off until the owner asks for it. SERVER KEYS (ak_...), for the app's own server or an n8n workflow, used with @awesomate/sdk createClient({ token: <key> }) or as a Bearer token on https://hub.awesomate.ai/api/sdk/v1/server: action 'keys' {app_id} lists them (never the secrets); 'create_key' {app_id, name, access: 'read'|'write', kinds?} makes one (kinds leaves it to those kinds, 'contact' to read contacts; leave it out for every kind) and returns the key ONCE: put it straight into the app server's environment (awesomate_app_set_env for an app hosted with us) and never into browser code, a repository or a reply to the user. For an n8n workflow pass n8n_credential: true instead (prefer it): the hub puts the key into a Header Auth credential 'Awesomate app key: <name>' on their n8n (Authorization: Bearer, usable only towards the hub) and returns only its id and name, so the key never passes through you. 'revoke_key' {app_id, key_id} stops it at once, and removes a credential the hub made. A key reads every attribute of an app kind, contacts only as you read them, and writes need Support Plus and above. Prefer the narrowest key: read unless the server writes, and only the kinds it uses.",
43032
+ description: "The account's own apps (a client portal, a members' app) whose users sign in by email link and then read and change only what each kind's access rules allow them (awesomate_crm_kinds set_access). Pro and above to create or change; reading is every plan. action 'list': each app with its publishable key, allowed origins, sign-up mode and default role. action 'create' {name, allowed_origins, sign_up?, default_role?}: name appears in the sign-in email; allowed_origins are the exact origins the app runs on (https://portal.example.com; http://localhost:5173 for development; capacitor://localhost for the mobile shell), with no path and no wildcard; sign_up 'invite' (default: only people added with awesomate_crm_app_users) or 'open' (anyone who uses the email link gets the default role). action 'update' {app_id, ...any of those, status?}: status 'disabled' signs everyone out of that app and stops its server keys; voice_agent_id names the account's agent that signed-in people talk to by voice (Talk to the agent: @awesomate/sdk voiceAgent() and voiceSession() with the hub's AwesomateAgent widget; the agent greets them by name and, when the app's assistant is set up, knows the 10 most recent conversations they can see, read as them; the app's origin must also be listed under the agent's 'Where your app runs'), null takes it away. The publishable key (pk_...) is not a secret: it goes in the app's browser code, with @awesomate/sdk. Never put the account's own token (amt_pat_...) in browser code. Confirm origins and sign-up mode with the user: open sign-up lets strangers in under the default role. action 'customer_lookup' {app_id, roles?}: which roles in that app may look customers up (name, email and phone, by search or id, with @awesomate/sdk lookupCustomers) and so put a record under any customer, not only themselves. Without roles it reads the setting; roles ['staff'] switches it on for staff; [] switches it off. Never the app's default role (the one customers sign in with): that would show every customer to every other customer, and the hub refuses it. Off until the owner asks for it. SERVER KEYS (ak_...), for the app's own server or an n8n workflow, used with @awesomate/sdk createClient({ token: <key> }) or as a Bearer token on https://hub.awesomate.ai/api/sdk/v1/server: action 'keys' {app_id} lists them (never the secrets); 'create_key' {app_id, name, access: 'read'|'write', kinds?} makes one (kinds leaves it to those kinds, 'contact' to read contacts; leave it out for every kind) and returns the key ONCE: put it straight into the app server's environment (awesomate_app_set_env for an app hosted with us) and never into browser code, a repository or a reply to the user. For an n8n workflow pass n8n_credential: true instead (prefer it): the hub puts the key into a Header Auth credential 'Awesomate app key: <name>' on their n8n (Authorization: Bearer, usable only towards the hub) and returns only its id and name, so the key never passes through you. 'revoke_key' {app_id, key_id} stops it at once, and removes a credential the hub made. A key reads every attribute of an app kind, contacts only as you read them, and writes need Support Plus and above. Prefer the narrowest key: read unless the server writes, and only the kinds it uses.",
43031
43033
  inputSchema: {
43032
43034
  action: external_exports.enum(["list", "create", "update", "keys", "create_key", "revoke_key", "customer_lookup"]),
43033
43035
  app_id: external_exports.string().max(48).optional().describe("update, keys, create_key, revoke_key, customer_lookup: the app"),
@@ -43040,10 +43042,11 @@ server.registerTool(
43040
43042
  allowed_origins: external_exports.array(external_exports.string().max(200)).max(10).optional(),
43041
43043
  sign_up: external_exports.enum(["invite", "open"]).optional(),
43042
43044
  default_role: external_exports.string().max(31).optional().describe("lower case; the role open sign-up gives"),
43043
- status: external_exports.enum(["active", "disabled"]).optional().describe("update only")
43045
+ status: external_exports.enum(["active", "disabled"]).optional().describe("update only"),
43046
+ voice_agent_id: external_exports.string().uuid().nullable().optional().describe("update only: the account's own agent (awesomate_knowledge_agents list) that signed-in people talk to by voice in this app; null takes voice away")
43044
43047
  }
43045
43048
  },
43046
- async ({ action, app_id, name, allowed_origins, sign_up, default_role, status, access, kinds, key_id, roles, n8n_credential }) => {
43049
+ async ({ action, app_id, name, allowed_origins, sign_up, default_role, status, voice_agent_id, access, kinds, key_id, roles, n8n_credential }) => {
43047
43050
  try {
43048
43051
  const cfg = requireConfig();
43049
43052
  if (action === "list") return textResult(await hubGet(cfg, "/api/my-crm/v1/apps"));
@@ -43066,7 +43069,11 @@ server.registerTool(
43066
43069
  const fields = Object.fromEntries(Object.entries({ name, allowed_origins, sign_up, default_role }).filter(([, v]) => v !== void 0));
43067
43070
  if (action === "create") return textResult(await hubPost(cfg, "/api/my-crm/v1/apps", fields));
43068
43071
  if (!app_id) return errorResult(new Error("update needs app_id, from list."));
43069
- return textResult(await hubPatch(cfg, `/api/my-crm/v1/apps/${encodeURIComponent(app_id)}`, { ...fields, ...status ? { status } : {} }));
43072
+ return textResult(await hubPatch(cfg, `/api/my-crm/v1/apps/${encodeURIComponent(app_id)}`, {
43073
+ ...fields,
43074
+ ...status ? { status } : {},
43075
+ ...voice_agent_id === void 0 ? {} : { voice_agent_id }
43076
+ }));
43070
43077
  } catch (err) {
43071
43078
  return errorResult(err);
43072
43079
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.60.0",
3
+ "version": "0.61.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",
@@ -1,5 +1,11 @@
1
1
  {
2
2
  "versions": [
3
+ {
4
+ "version": "0.60.1",
5
+ "highlights": [
6
+ "When Awesomate can't check your plan for a moment, Claude says to try again shortly instead of suggesting an upgrade"
7
+ ]
8
+ },
3
9
  {
4
10
  "version": "0.60.0",
5
11
  "highlights": [