@awesomate/hosting-mcp 0.46.0 → 0.48.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
@@ -40136,6 +40136,25 @@ function packConfirmationPayload(body) {
40136
40136
  note: "This ingest would exceed the included allowance. NOTHING was purchased and the source was NOT added. An Ingestion Pack costs 1 credit ($100). State that plainly, get an explicit yes, then send the user to the hub Knowledge \u2192 Usage page to buy it (this tool never spends credits)."
40137
40137
  };
40138
40138
  }
40139
+ function addonRequiredPayload(body) {
40140
+ return {
40141
+ addon_required: true,
40142
+ purchased: false,
40143
+ dimension: body.dimension ?? null,
40144
+ addon: body.addon ?? null,
40145
+ message: typeof body.message === "string" ? body.message : null,
40146
+ note: "This is over the account's allowance, and the way past it is a monthly add-on billed to their card every month until they stop it. NOTHING was bought and the source was NOT added. Relay the message as it is, and if they want the add-on, send the owner to the hub Knowledge \u2192 Usage page to add it (this tool never buys it). Removing sources they no longer need also works."
40147
+ };
40148
+ }
40149
+ function storageFullPayload(body) {
40150
+ return {
40151
+ storage_full: true,
40152
+ purchased: false,
40153
+ reason: body.reason ?? null,
40154
+ message: typeof body.message === "string" ? body.message : null,
40155
+ note: "The Knowledge Base storage is full and the source was NOT added. Relay the message exactly as it is; offer no purchase, because none is open to this account or this person right now. Removing sources they no longer need frees space."
40156
+ };
40157
+ }
40139
40158
  function bodyOf(err) {
40140
40159
  return err.body && typeof err.body === "object" ? err.body : null;
40141
40160
  }
@@ -40148,6 +40167,8 @@ function mapKnowledgeError(err, apiBase) {
40148
40167
  return consentPayload(typeof body.error === "string" ? body.error : "Knowledge Platform consent is off");
40149
40168
  }
40150
40169
  if (err.status === 402 && body?.error === "pack_required") return packConfirmationPayload(body);
40170
+ if (err.status === 402 && body?.error === "addon_required") return addonRequiredPayload(body);
40171
+ if (err.status === 402 && body?.error === "storage_full") return storageFullPayload(body);
40151
40172
  throw err;
40152
40173
  }
40153
40174
  async function knowledgeStatus(config3) {
@@ -41195,6 +41216,7 @@ var TITLES = {
41195
41216
  awesomate_crm_recipes: "Save named write recipes",
41196
41217
  awesomate_crm_apps: "Set up sign-in for your own apps",
41197
41218
  awesomate_crm_app_users: "Manage the people who sign in to your apps",
41219
+ awesomate_crm_assistant: "Set up the AI in your app's conversations",
41198
41220
  awesomate_crm_email: "Draft an email to a contact list"
41199
41221
  };
41200
41222
  function annotate(name, kind) {
@@ -41883,23 +41905,13 @@ readTool(
41883
41905
  "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.",
41884
41906
  "/api/client-hosting/limits"
41885
41907
  );
41886
- var KNOWLEDGE_NOT_INCLUDED = {
41887
- included: false,
41888
- onboardingMediaHours: 0,
41889
- onboardingPages: 0,
41890
- onboardingUrls: 0,
41891
- monthlyMediaHours: 0,
41892
- monthlyAnswers: 0,
41893
- maxStorageGb: 0,
41894
- agentModelTier: "sonnet"
41895
- };
41896
41908
  var PLAN_LADDER_FALLBACK = {
41897
- note: "Live per-account limits come from awesomate_get_limits \u2014 this is the plan ladder reference (static fallback).",
41909
+ note: "Live per-account limits come from awesomate_get_limits. This is the plan ladder reference (static fallback).",
41898
41910
  plans: [
41899
- { name: "Essentials", purchasable: false, monthlyPriceUsd: 75, maxSites: 1, maxCustomDomains: 1, maxApps: 0, cpanelAccess: true, shellAccess: false, appBuilder: false, knowledgeBase: KNOWLEDGE_NOT_INCLUDED },
41900
- { name: "Support Plus", purchasable: true, monthlyPriceUsd: 175, maxSites: 2, maxCustomDomains: 5, maxApps: 5, cpanelAccess: true, shellAccess: true, appBuilder: true, knowledgeBase: KNOWLEDGE_NOT_INCLUDED },
41901
- { name: "Pro", purchasable: true, monthlyPriceUsd: 375, maxSites: 10, maxCustomDomains: 20, maxApps: 20, cpanelAccess: true, shellAccess: true, appBuilder: true, knowledgeBase: { included: true, onboardingMediaHours: 10, onboardingPages: 2e3, onboardingUrls: 500, monthlyMediaHours: 5, monthlyAnswers: 1e3, maxStorageGb: 10, agentModelTier: "sonnet" } },
41902
- { name: "Embedded", purchasable: false, monthlyPriceUsd: null, maxSites: 100, maxCustomDomains: 100, maxApps: 100, cpanelAccess: true, shellAccess: true, appBuilder: true, knowledgeBase: { included: true, onboardingMediaHours: 50, onboardingPages: 1e4, onboardingUrls: 2500, monthlyMediaHours: 20, monthlyAnswers: 1e4, maxStorageGb: 50, agentModelTier: "opus" }, note: "Not generally available yet" }
41911
+ { name: "Essentials", purchasable: false, monthlyPriceUsd: 75, maxSites: 1, maxCustomDomains: 1, maxApps: 0, cpanelAccess: true, shellAccess: false, appBuilder: false, knowledgeBase: { included: true, onboardingMediaHours: 0, onboardingPages: 50, onboardingUrls: 10, monthlyMediaHours: 0, monthlyAnswers: 50, maxStorageGb: 5, agentModelTier: "sonnet" } },
41912
+ { name: "Support Plus", purchasable: true, monthlyPriceUsd: 175, maxSites: 2, maxCustomDomains: 5, maxApps: 5, cpanelAccess: true, shellAccess: true, appBuilder: true, knowledgeBase: { included: true, onboardingMediaHours: 5, onboardingPages: 1e3, onboardingUrls: 250, monthlyMediaHours: 2, monthlyAnswers: 500, maxStorageGb: 250, agentModelTier: "sonnet" } },
41913
+ { name: "Pro", purchasable: true, monthlyPriceUsd: 375, maxSites: 10, maxCustomDomains: 20, maxApps: 20, cpanelAccess: true, shellAccess: true, appBuilder: true, knowledgeBase: { included: true, onboardingMediaHours: 10, onboardingPages: 2e3, onboardingUrls: 500, monthlyMediaHours: 5, monthlyAnswers: 1e3, maxStorageGb: 1024, agentModelTier: "sonnet" } },
41914
+ { name: "Embedded", purchasable: false, monthlyPriceUsd: null, maxSites: 100, maxCustomDomains: 100, maxApps: 100, cpanelAccess: true, shellAccess: true, appBuilder: true, knowledgeBase: { included: true, onboardingMediaHours: 50, onboardingPages: 1e4, onboardingUrls: 2500, monthlyMediaHours: 20, monthlyAnswers: 1e4, maxStorageGb: 1024, agentModelTier: "opus" }, note: "Not generally available yet" }
41903
41915
  ],
41904
41916
  upgradePath: "Essentials \u2192 Support Plus \u2192 Pro \u2192 Embedded; upgrades at hub.awesomate.ai/billing (only Support Plus and Pro are purchasable)"
41905
41917
  };
@@ -42928,6 +42940,44 @@ server.registerTool(
42928
42940
  }
42929
42941
  }
42930
42942
  );
42943
+ server.registerTool(
42944
+ "awesomate_crm_assistant",
42945
+ {
42946
+ annotations: annotate("awesomate_crm_assistant", MUTATING),
42947
+ description: "An AI participant in an app's conversations (a portal's per-job messages): when a signed-in customer writes, it answers from what that customer may see plus the account's own Knowledge Base, or drafts an answer for staff. Each conversation has a mode staff switch: off (people only, the default), draft (a suggested reply only staff see, sent by a person as themselves) or auto (it replies at once under its own name, marked as AI, when its gate allows; otherwise it drafts). It reads AS the customer, so the account's access rules bound it, and only attributes marked readable_by_ai reach it. The hub writes its replies, never the model. Pro and above to change; reading is every plan. action 'get' {app_id}. action 'set' {app_id, assistant}: assistant is {name, thread_link (the message kind's link to the job/booking), instructions?, knowledge_agent_id? (a PUBLISHED agent from awesomate_knowledge_agents, audience public), default_mode? (off), message_kind? (message), body_attribute? (body), settings_kind? (assistant_thread), drafts_kind? (assistant_draft), staff_roles? ([owner, staff]), daily_cap? (200), enabled?}. The tenant must already hold: the message kind with the body attribute marked readable_by_ai, a yes/no from_assistant attribute and the thread link; a settings kind {mode: choice off|draft|auto, needs_person?: yes_no} and a drafts kind {body, why?}, both linked to the same thread kind and readable by staff only (set_access). Saving an enabled assistant is refused with every problem listed; fix them with awesomate_crm_kinds and save again. action 'runs' {app_id, limit?}: what it decided per customer message (send, draft, handoff, skip, error) and why, by reference only. Confirm the name, the default mode and the knowledge agent with the user before 'set': switching it on lets an AI reply to their customers.",
42948
+ inputSchema: {
42949
+ action: external_exports.enum(["get", "set", "runs"]),
42950
+ app_id: external_exports.string().max(48).describe("the app, from awesomate_crm_apps list"),
42951
+ assistant: external_exports.object({
42952
+ name: external_exports.string().max(40),
42953
+ thread_link: external_exports.string().max(41),
42954
+ instructions: external_exports.string().max(4e3).optional(),
42955
+ knowledge_agent_id: external_exports.string().max(64).nullable().optional(),
42956
+ default_mode: external_exports.enum(["off", "draft", "auto"]).optional(),
42957
+ message_kind: external_exports.string().max(41).optional(),
42958
+ body_attribute: external_exports.string().max(41).optional(),
42959
+ settings_kind: external_exports.string().max(41).optional(),
42960
+ drafts_kind: external_exports.string().max(41).optional(),
42961
+ staff_roles: external_exports.array(external_exports.string().max(31)).max(10).optional(),
42962
+ daily_cap: external_exports.number().int().min(1).max(1e3).optional(),
42963
+ enabled: external_exports.boolean().optional()
42964
+ }).optional().describe("set: the whole config; fields left out take their defaults"),
42965
+ limit: external_exports.number().int().min(1).max(200).optional().describe("runs: how many, newest first (default 50)")
42966
+ }
42967
+ },
42968
+ async ({ action, app_id, assistant, limit }) => {
42969
+ try {
42970
+ const cfg = requireConfig();
42971
+ const path = `/api/my-crm/v1/apps/${encodeURIComponent(app_id)}/assistant`;
42972
+ if (action === "get") return textResult(await hubGet(cfg, path));
42973
+ if (action === "runs") return textResult(await hubGet(cfg, `${path}/runs${limit ? `?limit=${limit}` : ""}`));
42974
+ if (!assistant) return errorResult(new Error("set needs assistant: {name, thread_link, ...}."));
42975
+ return textResult(await hubPut(cfg, path, { assistant }));
42976
+ } catch (err) {
42977
+ return errorResult(err);
42978
+ }
42979
+ }
42980
+ );
42931
42981
  var crmParam = external_exports.object({
42932
42982
  name: external_exports.string().max(41).describe("lower_case"),
42933
42983
  type: external_exports.enum(["text", "number", "date", "datetime", "boolean", "uuid", "text_list", "number_list"]).optional().describe("default text"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.46.0",
3
+ "version": "0.48.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,21 @@
1
1
  {
2
2
  "versions": [
3
+ {
4
+ "version": "0.48.0",
5
+ "highlights": [
6
+ "Knowledge Base answers are now a hard limit: when a month's answers run out, your assistants stop answering until the 1st, and you are emailed at 80% and again at the limit",
7
+ "Past the limit: an answer pack adds 2,500 answers for the rest of the month (1 credit), or the monthly answers add-on adds 2,500 every month for $100 a month, stop anytime. Support Plus and above",
8
+ "A full library on Support Plus and up now points at the monthly storage add-on (1 TB for $100 a month) instead of a storage pack, and Claude relays it without ever buying it"
9
+ ]
10
+ },
11
+ {
12
+ "version": "0.47.0",
13
+ "highlights": [
14
+ "Your app's conversations can have an AI in them (awesomate_crm_assistant). When a customer writes, it answers from their own records and your Knowledge Base, or drafts an answer for your team. Pro and above",
15
+ "Your team decides per conversation: off, draft (a suggested reply only staff see, sent by a person as themselves) or auto (it replies at once, marked as AI). New conversations start off unless you choose otherwise",
16
+ "It reads as the customer it is answering, so your access rules bound it, and it sees only the fields you marked readable by AI. When someone asks for a person, it hands the conversation over and flags it"
17
+ ]
18
+ },
3
19
  {
4
20
  "version": "0.46.0",
5
21
  "highlights": [
@@ -1,26 +1,40 @@
1
1
  # Quotas, allowances, and Ingestion Packs
2
2
 
3
3
  Live numbers ALWAYS come from `awesomate_knowledge_status` (`usage` vs
4
- `usage.included` + `usage.packs`) — this file explains the model.
4
+ `usage.included` + `usage.packs`). This file explains the model.
5
5
 
6
6
  ## Plan allowances
7
7
 
8
- | | Pro | Embedded |
9
- |---|---|---|
10
- | Included | yes | yes |
11
- | Onboarding (first month, one-off) | 10 media-hours, 2,000 pages / 500 URLs | 50 media-hours, 10,000 pages / 2,500 URLs |
12
- | Monthly media ingest | 5 hours | 20 hours |
13
- | Monthly verified answers | 1,000 | 10,000 |
14
- | Storage | 10 GB | 50 GB |
15
- | Agent model tier | sonnet | opus-eligible |
8
+ Every plan includes the Knowledge Base. The NUMBERS (pages, answers a month,
9
+ storage, business data) are not written here on purpose: they change as we learn
10
+ real usage. Read them from `awesomate_knowledge_status` (`usage.included`), or
11
+ from `awesomate_get_plan_features` for another plan.
16
12
 
17
- Essentials and Support Plus don't include Knowledge Base — status returns
18
- `upgrade_required` with the upsell copy; relay it once, honestly.
13
+ | | Essentials | Support Plus | Pro |
14
+ |---|---|---|---|
15
+ | What it is for | Trying it out: your FAQs and an agent that answers from them | Day-to-day use | Everything, at the highest usage |
16
+ | FAQs | Yes | Yes | Yes |
17
+ | Documents, spreadsheets, web pages, pasted text | A small allowance | More | The most |
18
+ | Website chat widget, unanswered-questions inbox | No | Yes | Yes |
19
+ | Audio and video, scanned documents and images | No | No | Yes |
20
+ | Ingestion Packs (below) | No: the answer is an upgrade | Yes | Yes |
21
+
22
+ FAQ entries don't use up the page allowance. When an Essentials client outgrows
23
+ it, say so plainly and point to Support Plus or Pro at hub.awesomate.ai/billing;
24
+ never offer a pack, since Essentials cannot buy one.
19
25
 
20
26
  ## Ingestion Packs (overage)
21
27
 
22
28
  One pack = **1 credit ($100)**, the user picks the dimension at purchase:
23
- +40 media-hours OR +5,000 pages OR +2,500 answers OR +50 GB-months.
29
+ +40 media-hours OR +5,000 pages OR +2,500 answers. The storage pack is no
30
+ longer sold (packs already held still count): extra storage is the monthly
31
+ storage add-on, 1 TB for $100 a month, which the owner adds on the hub's
32
+ Knowledge → Usage page. A full library on Support Plus and up answers 402
33
+ `addon_required` with the add-on's details when the owner can buy it, or 402
34
+ `storage_full` with a sentence when they can't (in a trial, at the cap, or
35
+ not the owner). Relay either one as it is; never buy anything.
36
+ An answers pack counts only for the calendar month (UTC) it is bought in, so
37
+ buying one late in the month buys less; say so before they confirm.
24
38
 
25
39
  - An ingest that would exceed included+packs returns `pack_required`. The
26
40
  tool response purchases NOTHING and queues NOTHING.
@@ -31,8 +45,25 @@ One pack = **1 credit ($100)**, the user picks the dimension at purchase:
31
45
  - Insufficient credits → 402 `insufficient_credits`: top up from Billing
32
46
  first. Never loop on it.
33
47
 
34
- ## Answer overage
48
+ ## Answer limit
49
+
50
+ Answers are a hard stop. The allowance is the plan's monthly answers plus
51
+ every answer pack held. When it is used up, every answer route (widget, agent
52
+ chat, n8n, `ask`) returns 429 `quota_exceeded` until the 1st of next month
53
+ (UTC), and a visitor sees "This assistant has reached its limit for this
54
+ month". Answers on the client's own OpenRouter key never count.
35
55
 
36
- Answers are soft-gated: warnings at 100% of allowance, throttling well past
37
- it — chat never silently debits credits. If a client consistently outgrows
38
- the allowance, that's an upgrade/pack conversation, not a workaround.
56
+ - The owner is emailed at 80% and again when the limit is reached.
57
+ - Nothing ever debits credits on its own. The ways past the limit, all applied
58
+ straight away:
59
+ - an answer pack: 2,500 for the rest of this month, 1 credit, via the pack
60
+ flow above;
61
+ - the monthly answers add-on: 2,500 more answers in every month it runs,
62
+ $100 a month on the card, stop anytime (the paid month runs out). The
63
+ owner adds it on the hub's Knowledge → Usage page. Don't buy it from here;
64
+ - an upgrade.
65
+ Packs and the add-on are Support Plus and above, so for Essentials it's the
66
+ upgrade.
67
+ - If a 429 `quota_exceeded` comes back from `ask` or a test chat, say so
68
+ plainly and offer those two routes. Don't retry: nothing changes until the
69
+ month turns or the allowance rises.