@awesomate/hosting-mcp 0.74.0 → 0.85.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.74.0",
3
+ "version": "0.85.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,81 @@
1
1
  {
2
2
  "versions": [
3
+ {
4
+ "version": "0.85.0",
5
+ "highlights": [
6
+ "When the Knowledge Base answers from general knowledge instead of your content, Claude no longer passes that answer off as your \"no answer\" message: it tells you your content does not cover the question"
7
+ ]
8
+ },
9
+ {
10
+ "version": "0.84.0",
11
+ "highlights": [
12
+ "A website chat only ever runs a Public agent: Claude checks the agent is Public before connecting a chat to your site, and a chat with no agent set now says it is not set up yet instead of answering"
13
+ ]
14
+ },
15
+ {
16
+ "version": "0.83.0",
17
+ "highlights": [
18
+ "Adding a web page or a whole website as public now asks first: Claude checks with you, then confirms with your account name, because anything public can be seen by your customers and public chatbots"
19
+ ]
20
+ },
21
+ {
22
+ "version": "0.82.0",
23
+ "highlights": [
24
+ "Claude can read your customers' support inbox (awesomate_support_desk): whether it is on, your tickets, and one ticket's messages, your team's notes and any reply the AI is holding for your OK. It reads only: replying stays a person's click in the hub, under Contacts, Support"
25
+ ]
26
+ },
27
+ {
28
+ "version": "0.81.0",
29
+ "highlights": [
30
+ "Claude can list the decisions waiting in your business (awesomate_tasks 'decisions'): what your agents and automations are holding for a person's OK, who decides each and by when. It can never approve one: that stays a person's tap in the hub",
31
+ "Your business map holds what each role approves alone (an amount and a discount); Claude reads the limits and can suggest them, and lowering one applies straight away",
32
+ "Claude can build an automation that waits for a person's OK before it acts: Hold for a decision, then a Wait that only the hub can resume"
33
+ ]
34
+ },
35
+ {
36
+ "version": "0.80.0",
37
+ "highlights": [
38
+ "Spreadsheets in your Files folders go into Knowledge too: Claude adds one as knowledge or as data, and a synced folder adds its spreadsheets the way you choose (until you choose, they are skipped and the sync says why)",
39
+ "After publishing your FAQs, Claude tells you which of your agents won't answer from them yet (an agent limited to another collection, or to other kinds of content) and how to fix it. An FAQ set can be put in a collection as it is created",
40
+ "Claude limits a new agent to the right collection when it creates it, and warns you when an agent it drafted would read every collection, or would skip your PDFs, FAQs or images"
41
+ ]
42
+ },
43
+ {
44
+ "version": "0.79.0",
45
+ "highlights": [
46
+ "Spreadsheets upload again: Claude says whether a spreadsheet goes in as knowledge (each row a record people can ask about, like a price list or timetable) or as data (totals and trends, like invoice history), and asks you when it isn't obvious",
47
+ "Renaming a source works: Claude can give an uploaded file a proper title, since uploads arrive titled from the file name with underscores",
48
+ "Claude sends you to the right switch for Knowledge: Settings, Features, then \"Use your content for Knowledge\" under Knowledge",
49
+ "Claude can ask your published agent a question the way a website visitor would, to check what the public actually sees, and pause or restart an agent with your yes"
50
+ ]
51
+ },
52
+ {
53
+ "version": "0.78.0",
54
+ "highlights": [
55
+ "1Brain onboarding: Claude can build a 1Brain course for a role on your business map from that role's 1Brain systems, or a starter course for everyone joining, and start someone's onboarding, which gives them their courses as Tasks",
56
+ "Each morning the hub checks the quizzes passed and acknowledgements done in 1Brain, and when someone has finished a role's course it asks their future manager whether to hand the role over. Finishing a course never changes anyone's access by itself"
57
+ ]
58
+ },
59
+ {
60
+ "version": "0.77.0",
61
+ "highlights": [
62
+ "Claude now reads and changes your business map in the same words you see: departments, sub-departments and roles. Its 1Brain actions are 'systems for role' and 'link role' (the old names still work)"
63
+ ]
64
+ },
65
+ {
66
+ "version": "0.76.0",
67
+ "highlights": [
68
+ "Your business map uses plainer words, the same as 1Brain: its seven parts are departments, each with sub-departments, and the jobs people hold in them are roles. Claude talks about them the same way"
69
+ ]
70
+ },
71
+ {
72
+ "version": "0.75.0",
73
+ "highlights": [
74
+ "Claude can look up your procedures in 1Brain for you (awesomate_onebrain): search them, read a page, and answer \"what are the procedures for this hat?\" with a link to every page it used, all through your own 1Brain login",
75
+ "Your business map shows 1Brain: pick the 1Brain category that is your business, place each 1Brain Department in a division, search 1Brain from the map, and keep a list of 1Brain systems for each hat, tagged in 1Brain as well",
76
+ "Claude can save a new procedure in 1Brain as a draft, written from your own words, for a person to review and publish there"
77
+ ]
78
+ },
3
79
  {
4
80
  "version": "0.74.0",
5
81
  "highlights": [
@@ -134,34 +134,36 @@ What makes a good one, and the tokens to start from: the awesomate-app-builder s
134
134
 
135
135
  When the owner asks what to automate, delegate or build next, read the
136
136
  business map first: **`awesomate_business_map`** action `gaps` (or attach
137
- `awesomate://business/map`). Every business has seven divisions (Envision,
138
- Form, Promise, Balance, Fulfil, Refine, Share). Inside them are **hats**: the
139
- roles people wear, one person often wearing several. The API calls a hat a
140
- `job`, but say "hat" to the owner. The gaps say which divisions have nothing
141
- helping them, which hats nobody wears, and how many divisions still fall to the
142
- owner, most important first. Work from the top gap, not from a guess.
137
+ `awesomate://business/map`). Every business has seven departments (Envision,
138
+ Form, Promise, Balance, Fulfil, Refine, Share), each with sub-departments.
139
+ Inside them are **roles**, one person often holding several. The tool uses the
140
+ same words as the owner sees: `departmentNo` (1 to 7), `subDepartmentNo` and
141
+ `roleId`. The gaps say
142
+ which departments have nothing helping them, which roles nobody holds, and how
143
+ many departments still fall to the owner, most important first. Work from the top gap, not from a guess.
143
144
 
144
145
  To fill a gap end to end: install what fits (`awesomate_n8n_library`), then
145
- `propose` putting it on the hat it helps, at `declaredLevel` 3 (it recommends, a person
146
+ `propose` putting it on the role it helps, at `declaredLevel` 3 (it recommends, a person
146
147
  approves) unless the owner says otherwise. Only the owner changes the map, so
147
148
  every change you send is a suggestion they accept from Tasks in the hub: say
148
149
  "it's waiting for you in Tasks", never "done". If the map feature is not on the
149
150
  account, the tool says so in one line; relay it and move on.
150
151
 
151
- When you write an agent's instructions, take action `job` {slug} for the hat it
152
+ When you write an agent's instructions, take action `job` {slug} for the role it
152
153
  helps and copy that helper's `instructionLine` into the instructions: it names
153
- the hat, the person it answers to, how far it may go and where everything else
154
+ the role, the person it answers to, how far it may go and where everything else
154
155
  goes.
155
156
 
156
157
  The map also holds the customer's path (finding the business through to
157
- coming back, the hat looking after each step, the hand-offs) and each hat's
158
- 1Brain tag (`job:<slug>`), where its procedures live. A gap that says to write a
159
- hat down comes first: help the owner list its responsibilities before you add
158
+ coming back, the role looking after each step, the hand-offs) and each role's
159
+ 1Brain tag (`job:<slug>`), where its procedures live. To list or read a role's
160
+ procedures, use `awesomate_onebrain` (awesomate-onebrain skill). A gap that says to write a
161
+ role down comes first: help the owner list its responsibilities before you add
160
162
  another helper to it.
161
163
 
162
- Each hat can carry up to five **quarterly priorities**: the few things it must
164
+ Each role can carry up to five **quarterly priorities**: the few things it must
163
165
  move this quarter. When the owner talks about goals for the quarter, suggest
164
- them with `propose` `priority.add` on the right hat, worded so anyone could
166
+ them with `propose` `priority.add` on the right role, worded so anyone could
165
167
  tell at the end of the quarter whether it was done.
166
168
 
167
169
  ## After creating a site
@@ -221,7 +223,7 @@ MCP, so say that rather than stopping.
221
223
  | `awesomate_get_limits` | Before any create/change — live plan limits + workflow/AI-editor credit balances |
222
224
  | `awesomate_get_plan_features` | The live plan ladder, so upgrade talk is accurate |
223
225
  | `awesomate_business` | Before writing anything in the business's name: its own name, services, voice, colours, contact details |
224
- | `awesomate_business_map` | What to automate or delegate next (`gaps`), who wears which hat, an agent's hat line (`job`), and suggesting changes to the map (`propose`, owner decides) |
226
+ | `awesomate_business_map` | What to automate or delegate next (`gaps`), who holds which role, an agent's role line (`job`), and suggesting changes to the map (`propose`, owner decides) |
225
227
  | `awesomate_get_hosting_status` | Is hosting provisioned at all — eligible/provisioned flags, in-progress step, primary domain, DNS targets. Check before suggesting any site action |
226
228
  | `awesomate_get_hosting_account` | cPanel account details: package, server, provisioned-at, masked username |
227
229
  | `awesomate_list_sites` | What WordPress sites exist on this account |
@@ -37,11 +37,14 @@ platform's answer beats anything you remember.
37
37
  link once, honestly, then help within what reads allow. Never retry
38
38
  into the gate.
39
39
  - `consent.knowledge_platform_enabled: false` → the user must turn it on
40
- themselves: hub.awesomate.ai/settings?tab=privacy, under the heading
41
- **"Knowledge Base"**, the toggle **"Send My Content to the Knowledge
42
- Platform"**. Name it exactly like that — one heading and one switch, so
43
- they can find it without hunting. You cannot flip it for them, and
44
- there is no tool that can. If you're unsure which toggle is blocking
40
+ themselves: **Settings → Features** (hub.awesomate.ai/settings?tab=features),
41
+ the **Knowledge** row, then the second line under it, **"Use your
42
+ content for Knowledge"**. Say plainly that switching on the Knowledge
43
+ feature itself is NOT this consent: it is the separate line beneath it.
44
+ It is not on the Privacy tab any more (an owner who was sent there
45
+ switched on the Knowledge feature and four unrelated Privacy toggles
46
+ before finding it). You cannot flip it for them, and there is no tool
47
+ that can. If you're unsure which toggle is blocking
45
48
  (or a knowledge call 403s), call `awesomate_privacy_settings` — it
46
49
  reads which consents are on or off and names the one that's stopping
47
50
  you. Explain what it consents to (their selected content is indexed in
@@ -67,15 +70,15 @@ platform's answer beats anything you remember.
67
70
  |---|---|
68
71
  | Tenant state, plan gate, consent, quota, packs (CALL FIRST) | `awesomate_knowledge_status` |
69
72
  | Enable the knowledge base (idempotent; 202 = keep polling status) | `awesomate_knowledge_provision` |
70
- | The LIBRARY: search by title/tag/collection/visibility, list, add url·sitemap (with visibility, tags, collections), tag, set visibility (public needs the slug typed), move between collections, remove, ingest jobs | `awesomate_knowledge_sources` |
73
+ | The LIBRARY: search by title/tag/collection/visibility, list, add url·sitemap (with visibility, tags, collections), tag, rename (uploaded titles arrive slugified), set visibility (public needs the slug typed), move between collections, remove, ingest jobs | `awesomate_knowledge_sources` |
71
74
  | Collections — named sets of sources a chatbot is scoped to: list / create / update / delete / add / remove members | `awesomate_knowledge_collections` |
72
75
  | FAQs: sets of question-and-answer entries, imported as drafts, published with ONE owner yes, edited one answer at a time ([faqs.md](references/faqs.md)) | `awesomate_knowledge_faq` |
73
76
  | Questions the public assistant couldn't answer: read why, publish the owner's answer with ONE yes, close similar ones in one go ([faqs.md](references/faqs.md)) | `awesomate_knowledge_faq` (`questions`, `question`, `answer`) |
74
- | Keep a File Manager folder (their n8n file system) synced into the knowledge base: `sync_rules` / `sync_rule_create` / `sync_rule_delete` / `sync_run` / `sync_state` on the sources tool; one file at a time via `awesomate_knowledge_upload {fromFilesPath}` | `awesomate_knowledge_sources`, `awesomate_knowledge_upload` |
77
+ | Keep a File Manager folder (their n8n file system) synced into the knowledge base: `sync_rules` / `sync_rule_create` / `sync_rule_delete` / `sync_run` / `sync_state` on the sources tool; one file at a time via `awesomate_knowledge_upload {fromFilesPath}` (a spreadsheet needs `kind`, a folder rule `sheetKind`) | `awesomate_knowledge_sources`, `awesomate_knowledge_upload` |
75
78
  | Instant search with facet counts (find WHAT is in there: moments, pages, datasets; free) | `awesomate_knowledge_search` |
76
79
  | Ask a question → verified answer + numbered sources (accepts the same facet `filters` to ask within a slice) | `awesomate_knowledge_ask` |
77
80
  | Agent persona / fallback message / model tier — get & set (the single workspace default) | `awesomate_knowledge_agent` |
78
- | Agent BUILDER: list / get / create (AI-drafted from their content, saved as a private draft; pass `audience:'public'` for anything customers will talk to; it then answers from sources marked public ONLY) / update (edit the draft's instructions, grounding, no-answer message, audience and collection scope; nothing changes for callers until publish) / test the draft / publish (explicit approval first) | `awesomate_knowledge_agents` |
81
+ | Agent BUILDER: list / get / create (AI-drafted from their content, saved as a private draft; pass `audience:'public'` for anything customers will talk to; it then answers from sources marked public ONLY; ALWAYS scope it to the right collection with `collectionIds` and check `kinds`, since a drafted scope can read every collection, and relay the `warning` it returns) / update (edit the draft's instructions, grounding, no-answer message, audience and collection scope; nothing changes for callers until publish) / test the draft (ignores audience: NOT what the public sees) / visitor_test (the PUBLISHED agent as a website visitor gets it) / publish, suspend, resume (explicit approval first) | `awesomate_knowledge_agents` |
79
82
  | People, places, topics: list / name / hide / merge / alias suggestions / re-run resolution | `awesomate_knowledge_people` |
80
83
  | Business-data warehouse: `metrics` / `datasets` / `query` / `imports` — answer quantitative questions from their own imported business data (query is free-form but read-only) | `awesomate_knowledge_data` |
81
84
  | Refresh these skills from the latest package | `awesomate_skill_update` |
@@ -86,11 +89,14 @@ contents never enter the conversation. The owner can also use the hub's
86
89
  Knowledge → Sources upload page themselves (100 MB per file; bigger media by
87
90
  URL). Formats + caps: [ingestion-sources.md](references/ingestion-sources.md).
88
91
 
89
- **`awesomate_knowledge_upload {path, title?}`** — ingest ONE file from the
92
+ **`awesomate_knowledge_upload {path, title?, kind?}`** — ingest ONE file from the
90
93
  user's own computer. Pass a local path; the server streams it from disk, so
91
94
  file contents never pass through the conversation. 100 MB max, one call per
92
95
  file, explicit approval first (it spends allowance). URLs and sitemaps stay on
93
- `awesomate_knowledge_sources`.
96
+ `awesomate_knowledge_sources`. A spreadsheet (csv, tsv, xls, xlsx, xlsm, json)
97
+ needs `kind`: `sheet` for rows a customer asks about (price lists, fee tables,
98
+ timetables), `data-import` for totals and trends (job or invoice history).
99
+ Ask when it is not obvious; never guess.
94
100
 
95
101
  ## 2. References — read on demand
96
102
 
@@ -151,7 +157,8 @@ enough to route through explicit REST calls the user has just approved.
151
157
  | Faceted search (what `awesomate_knowledge_search` calls) | `GET /api/knowledge/explore?q=…` + the same facet params. **Add `&include=media` to get `url`/`poster_url` on image/video hits** — without it you get titles with nothing to display. |
152
158
  | Business-data warehouse (what `awesomate_knowledge_data` calls) | `GET /api/knowledge/data/{metrics,datasets,datasets/:id,imports,imports/:id}` · `PATCH /api/knowledge/data/datasets/:id` · `POST /api/knowledge/data/imports/:id/:action` · `POST /api/knowledge/data/query` (read-only SQL) |
153
159
  | Agent builder (what `awesomate_knowledge_agents` calls) | `GET\|POST /api/knowledge/agents` · `GET\|PATCH\|DELETE /api/knowledge/agents/:agent_id` · `POST /api/knowledge/agents/:agent_id/{publish,suspend,resume}` |
154
- | **Test a DRAFT agent** (`action:'test'`) | `POST /api/knowledge/agents/:agent_id/chat` `{message, session_id?}`. There is **no** `/test` endpoint — guessing one returns 404. |
160
+ | **Test a DRAFT agent** (`action:'test'`) | `POST /api/knowledge/agents/:agent_id/chat` `{message, session_id?}`. There is **no** `/test` endpoint — guessing one returns 404. It ignores the agent's audience. |
161
+ | **Ask the PUBLISHED agent as a visitor** (`action:'visitor_test'`) | `POST /api/knowledge/agents/:agent_id/visitor-chat` `{message (max 2000), session_id?}`. 403 `upgrade_required` below the public-widget plan; an unanswered question lands in the Questions inbox. |
155
162
  | Entity layer probe (`available` false = not enabled yet, stop) | `GET /api/knowledge/entities` |
156
163
  | People list / detail | `GET /api/knowledge/people?status=named\|unknown\|hidden\|all` · `GET /api/knowledge/people/:id` — returns `{people, next_cursor}` and **no `counts` key**. |
157
164
  | Entity COUNTS + availability | `GET /api/knowledge/entities` → `{available, counts: {...}}` — counts are nested under `counts`. Reading `people.counts?.x ?? 0` prints a confident row of zeros next to data that plainly exists. |
@@ -10,7 +10,8 @@ automatic fail triggers.
10
10
  mutating call, and reads plan/consent/tenant state from the results
11
11
  rather than assuming.
12
12
  2. When status shows `consent.knowledge_platform_enabled: false`, sends the
13
- user to Settings → Privacy in their own words, explains plainly what the
13
+ user to Settings → Features, the second line under Knowledge ("Use your
14
+ content for Knowledge"), in their own words, never to Settings → Privacy, explains plainly what the
14
15
  consent means (their selected content is indexed for AI answers,
15
16
  deletable any time), and waits/re-checks — it never claims to flip the
16
17
  consent itself.
@@ -105,20 +105,35 @@ whenever it is in your tools. The Markdown method above is the fallback, for whe
105
105
  answers `faq_unavailable`.
106
106
 
107
107
  1. Find and extract the pairs exactly as above: word for word, checked against the page.
108
- 2. `import {setTitle: "<Business> FAQ", visibility: "public", entries: [...]}` in batches of
109
- 200. Entries land as **drafts**, so nothing is live yet. Re-running it later updates the
110
- same entries rather than duplicating them.
111
- 3. Show the count, a few samples and anything you dropped, then ask the one question:
108
+ 2. **Find out which assistants should answer from it.** `awesomate_knowledge_agents
109
+ {action:'list'}`: an assistant scoped to a collection only reads sets IN that collection,
110
+ and one limited to kinds (say `document` and `book`) skips FAQ sets unless `faq` is one of
111
+ them. Seen live: a set imported into no collection never reached the owner's assistant,
112
+ which was scoped to a collection and to `[document, book]`.
113
+ 3. `import {setTitle: "<Business> FAQ", visibility: "public", collectionIds: [<the assistant's
114
+ collection>], entries: [...]}` in batches of 200. `collectionIds` places a NEW set; an
115
+ existing set keeps its own collections (move it with `awesomate_knowledge_sources
116
+ {action:'move', sourceId: setId, collectionIds}`). Ask which collection only when there are
117
+ two or more candidates. Entries land as **drafts**, so nothing is live yet. Re-running it
118
+ later updates the same entries rather than duplicating them.
119
+ 4. Show the count, a few samples and anything you dropped, then ask the one question:
112
120
  *"Publish these 42 answers to your website assistant?"*
113
- 4. On yes, `publish {setId}`. A public set answers `confirm_required` the first time; repeat
121
+ 5. On yes, `publish {setId}`. A public set answers `confirm_required` the first time; repeat
114
122
  it with `confirm` set to the account slug, which is only allowed because the owner just
115
123
  said yes. Never pass the slug on your own initiative.
116
124
  On no, first `awesomate_knowledge_sources {action:'set_visibility', sourceId: setId,
117
125
  visibility:'internal'}` (lowering visibility needs no confirm), then `publish {setId}`:
118
126
  the team's assistants and the owner's own use the answers, the website assistant does
119
127
  not. Leaving them as drafts would hide them from everyone.
120
- 5. Prove it: ask `awesomate_knowledge_ask` two of the questions reworded, and one thing the
121
- FAQ does not cover.
128
+ 6. **Read the publish result for a `warning`.** It names every assistant that still will not
129
+ answer from the set (limited to another collection, to other kinds, or to picked sources)
130
+ and the call that fixes each: move the set into the collection, or add `faq` to the
131
+ assistant's kinds with `awesomate_knowledge_agents {action:'update', agentId, kinds}` and
132
+ publish the assistant. Tell the owner and fix it on their yes.
133
+ 7. Prove it: ask `awesomate_knowledge_ask` two of the questions reworded, and one thing the
134
+ FAQ does not cover. `awesomate_knowledge_ask` reads the whole library, so also ask the
135
+ assistant itself (`awesomate_knowledge_agents {action:'visitor_test'}` for a public one,
136
+ `test` otherwise) one of the questions.
122
137
 
123
138
  Fixing one answer later is `list {setId, q: "<words from the question>"}` to find it, then
124
139
  `update {entryId, answer}` (a live public answer needs the owner's yes again). `archive` takes
@@ -41,13 +41,30 @@ contents never pass through the conversation and a 100 MB PDF costs no context.
41
41
  Files — `public/`, `private/`, `temp/`, where their workflows write
42
42
  outputs): `awesomate_knowledge_upload {fromFilesPath: 'public/reports/x.md'}`
43
43
  for one file, or a folder rule with `awesomate_knowledge_sources
44
- {action:'sync_rule_create', pathPrefix, visibility, collectionIds}` so
44
+ {action:'sync_rule_create', pathPrefix, visibility, collectionIds, sheetKind?}` so
45
45
  every file a workflow drops there is ingested automatically (uploads sync
46
- at once, everything else on a 15-minute sweep). A `public/` folder being
46
+ at once, everything else on a 15-minute sweep). Spreadsheets in the folder
47
+ are added only when the rule has `sheetKind` (the same choice as below);
48
+ without it each one is skipped and `sync_state` says why. A `public/` folder being
47
49
  web-served does NOT make its knowledge sources public — say which
48
50
  visibility the rule should use, default private.
49
- - **What parses:** pdf, md, txt (documents); csv, tsv, xls, xlsx, json (business data);
50
- audio, video, images. Word/PowerPoint/RTF/EPUB/HTML files are refused with a
51
+ - **What parses:** pdf, md, txt (documents); csv, tsv, xls, xlsx, xlsm, json (spreadsheets);
52
+ audio, video, images.
53
+ - **A spreadsheet needs `kind`**, and the tool refuses one without it before
54
+ uploading anything: `kind:'sheet'` makes each row a searchable, citable
55
+ record (price lists, fee tables, timetables, anything a customer asks
56
+ about); `kind:'data-import'` builds a dataset for totals and trends (job or
57
+ invoice history), read with `awesomate_knowledge_data`. Ask the user when it
58
+ is not obvious; never guess. A spreadsheet in the File Manager takes the
59
+ same `kind`: `awesomate_knowledge_upload {fromFilesPath, kind}`.
60
+ - **Titles.** An uploaded source is titled from its filename, slugified:
61
+ spaces, punctuation and non-ASCII letters become `_`
62
+ ("Kōwhai Dance — Questions parents ask us" lands as
63
+ `K_whai_Dance_Questions_parents_ask_us`), even when you pass `title`. Fix it
64
+ with `awesomate_knowledge_sources {action:'rename', sourceId, title}` once the
65
+ job has succeeded. The library shows the new title at once; search hits and
66
+ citations can keep the old one for a while, so check with a search before
67
+ telling the user citations have changed. Word/PowerPoint/RTF/EPUB/HTML files are refused with a
51
68
  workaround — export to PDF or save as .md/.txt; a web page goes in by URL.
52
69
 
53
70
  ## 3. Wait for ingestion, and check it actually succeeded
@@ -92,10 +109,23 @@ before a customer sees it. Show the citations.
92
109
 
93
110
  ## 5. Draft the agent
94
111
 
95
- `awesomate_knowledge_agents {action:'create', goal, audience}` — describe what
96
- the agent is for and the platform drafts instructions, scope, tone and test
97
- questions from the account's own content. It saves as a **private draft**;
98
- nothing is live and nothing is lost.
112
+ `awesomate_knowledge_agents {action:'create', goal, audience, collectionIds}` —
113
+ describe what the agent is for and the platform drafts instructions, scope,
114
+ tone and test questions from the account's own content. It saves as a
115
+ **private draft**; nothing is live and nothing is lost.
116
+
117
+ **Always scope a drafted agent to the right collection, and check its kinds.**
118
+ The draft's scope is the platform's guess, and it is often too wide: it can
119
+ come back limited to no collection at all, so it answers from everything in
120
+ the library (seen live: an internal staff agent for one business, drafted
121
+ unscoped on an account with one collection per business, answered with
122
+ another business's door PIN and Wi-Fi password). When the account has
123
+ collections, ask which one(s) the agent is for and pass `collectionIds` with
124
+ `create` (or set them with `update` straight after). Also check `kinds`: PDFs
125
+ are stored as `book`, FAQ sets as `faq`, so a draft limited to `document`
126
+ skips them. The `create` result carries a `warning` when the new agent reads
127
+ no collection while the account has some, or when its kinds leave out
128
+ content the library holds; fix it before testing or publishing.
99
129
 
100
130
  **`audience` is the retrieval ceiling, and it is enforced.** `public` for
101
131
  anything customers or a website will talk to: the agent then answers from
@@ -112,6 +142,16 @@ way to check behaviour. Test the awkward cases: something out of scope, a
112
142
  pricing question, a complaint, an ambiguous question. Confirm the refusal
113
143
  wording is what the business would actually want to say.
114
144
 
145
+ **The draft test is not what the public sees.** It ignores the agent's
146
+ audience, so a public-audience draft can quote internal or private sources
147
+ (seen live: a draft quoted an internal staff handbook's door code and Wi-Fi
148
+ password). After publishing a customer-facing agent, ask the same awkward
149
+ questions with `{action:'visitor_test', agentId, message}`: it runs the
150
+ PUBLISHED agent through the real public visitor path, which is what a website
151
+ visitor actually gets (the published agent refused the door code). It needs
152
+ the plan the public widget ships with, and a question it cannot answer lands
153
+ in the owner's Questions inbox, so say so before using it.
154
+
115
155
  Editing fields, policies, and API keys is hub UI only (Knowledge → Agents).
116
156
 
117
157
  ## 6. Publish only with explicit approval
@@ -119,6 +159,10 @@ Editing fields, policies, and API keys is hub UI only (Knowledge → Agents).
119
159
  `{action:'publish', agentId}` makes it live **immediately for every key bound
120
160
  to the agent**. Ask first, publish, then read the version back and confirm.
121
161
 
162
+ `{action:'suspend', agentId}` stops it answering on every key at once, and
163
+ `{action:'resume', agentId}` starts it again on its last published version.
164
+ Both change what live callers get straight away: owner's approval first.
165
+
122
166
  ## 7. Put it where their customers are
123
167
 
124
168
  Two destinations. Ask which they want; do not assume.
@@ -16,7 +16,7 @@ estimating BEFORE asking approval.
16
16
  | Images | hub upload page | Vision-described, then indexed |
17
17
  | Facebook export | hub upload page | The platform's facebook-export lane |
18
18
  | FAQs | Markdown file via `awesomate_knowledge_upload` | One `##` per question, so each becomes its own citable section. **Never** a Q&A spreadsheet as it is: convert it to this file, so every answer stays word for word and citable. Full recipe: [faqs.md](faqs.md) |
19
- | Spreadsheet (`.csv`, `.xlsx`) | hub upload page | Must be declared: **knowledge** (one citable passage per row) or **data** (figures for `awesomate_knowledge_data`, not searchable passages). The hub's upload page asks the owner. FAQs in a sheet: convert to Markdown instead, see [faqs.md](faqs.md) |
19
+ | Spreadsheet (`.csv`, `.tsv`, `.xls`, `.xlsx`, `.xlsm`, `.json`) | `awesomate_knowledge_upload {path, kind}`, or the hub upload page | Must be declared, and the upload tool refuses one without it: `kind:'sheet'` (**knowledge**: one citable passage per row, for what a customer asks about, such as price lists, fee tables and timetables) or `kind:'data-import'` (**data**: figures for totals and trends, such as job or invoice history, read with `awesomate_knowledge_data`, not searchable passages). Ask the owner when it is not obvious; never guess. A spreadsheet in the File Manager takes the same choice: `awesomate_knowledge_upload {fromFilesPath, kind}`, and a folder sync rule adds spreadsheets only with `sheetKind`. FAQs in a sheet: convert to Markdown instead, see [faqs.md](faqs.md) |
20
20
 
21
21
  Local files go through `awesomate_knowledge_upload`, which streams them from
22
22
  disk so their contents never enter the conversation (the owner can also use
@@ -45,16 +45,18 @@ contract (§4) → the widget.
45
45
  Variables (all read from `$vars`, all with fallbacks):
46
46
 
47
47
  - `kb_agent_id` — **set automatically at install** when the member has
48
- exactly one published, unsuspended agent. Two or more is their choice:
49
- preflight lists it as manual setup and the value is the agent id shown in
50
- the hub. Unset, `/v1/answer` falls back to the tenant's default agent.
48
+ exactly one published, unsuspended agent with the **Public** audience.
49
+ Private and internal agents are never picked: anyone on the website can
50
+ ask the chat questions. Two or more Public agents is their choice: set the
51
+ variable to that agent's id from the hub. Unset, the chat never calls
52
+ `/v1/answer` and replies that it isn't set up yet.
51
53
  - `kb_allowed_origins` — the website origin (CORS). Default: any.
52
54
  - `kb_fallback_message` — shown only when the platform itself could not be
53
55
  reached (401/429/timeout). A verified "no answer" shows the agent's own
54
56
  no-answer message, never this.
55
57
 
56
58
  Flow you drive: confirm the knowledge base is active with indexed content and
57
- one published agent → the member installs the bundle from the hub's
59
+ one published agent with the Public audience → the member installs the bundle from the hub's
58
60
  **Library** page (`/templates`, card "Verified Content Chat Agent"), or you install it
59
61
  for them with `awesomate_n8n_library { action: 'install_plan' | 'install', slug }` (a
60
62
  redeem token Awesomate handed over goes through `{ action: 'redeem', token }`) → the workflow publishes on install once the scope credential
@@ -50,7 +50,7 @@ as outcomes ("your form now emails you") with URLs.
50
50
  use the owner's name, services, voice and contact details. Copy the values
51
51
  into the text you're building; don't build new workflows on `$vars.biz_*`,
52
52
  which are being replaced. Confirm anything marked *suggestion* first.
53
- For an agent that helps a hat (a role; the API says `job`) on the business
53
+ For an agent that helps a role (the API says `job`) on the business
54
54
  map, add its `instructionLine` from `awesomate_business_map` action `job`.
55
55
 
56
56
  Read [references/platform-notes.md](references/platform-notes.md) BEFORE
@@ -129,6 +129,7 @@ they're blocked on a restart.
129
129
  | "What could I automate?" | [possibilities.md](references/possibilities.md) |
130
130
  | WordPress form → n8n | [wp-form-handler.md](references/wp-form-handler.md) |
131
131
  | **1Brain** in a workflow or agent: procedures, SOPs, policies, the `CUSTOM.oneBrain` node (check it is on the instance first). Connecting 1Brain and its rules: the awesomate-onebrain skill | [onebrain.md](references/onebrain.md) |
132
+ | A person must **approve before the automation acts** (a quote, a refund, a reply it wrote): Hold for a decision and a Wait | [decisions.md](references/decisions.md) |
132
133
  | A designed page served BY n8n — form, phone capture mini-app, approval page, status page | [webhook-pages.md](references/webhook-pages.md) |
133
134
  | Expression syntax details | [vendor/expressions/](references/vendor/expressions/SKILL.md) |
134
135
  | Code-node JavaScript | [vendor/code-node/](references/vendor/code-node/SKILL.md) |
@@ -0,0 +1,64 @@
1
+ # Hold for a decision: a person's OK before an automation acts
2
+
3
+ Use this when a workflow is about to do something a person should approve first: send a quote, give
4
+ a refund or a discount, reply to a customer in words it wrote. The automation files a decision for a
5
+ role on the business map; it goes to whoever answers for that role (or to the owners when the role is
6
+ empty), waits in their Tasks in the hub and in an email, and the run carries on only when they answer.
7
+ Nothing is ever approved on silence: after the deadline the run is resumed with `expired`.
8
+
9
+ Check the map first: `awesomate_business_map` action `roles` gives each role's key (its slug). The
10
+ decision has to name one.
11
+
12
+ ## The shape
13
+
14
+ ```
15
+ … → Hold for a decision (POST to the hub) → Wait (On Webhook Call) → IF approved → do the thing
16
+ └ else → stop, or tell the customer "we'll be in touch"
17
+ ```
18
+
19
+ 1. **Hold for a decision.** Until the Awesomate node has its own "Hold for a decision" operation, use an
20
+ HTTP Request node with the account's **Awesomate Hub** credential (it is already on the instance):
21
+
22
+ - `POST https://hub.awesomate.ai/api/hub-key/v2/<account>/decisions`
23
+ - JSON body:
24
+
25
+ ```json
26
+ {
27
+ "role": "quotes-and-follow-up",
28
+ "title": "Refund $80 to a customer",
29
+ "type": "yes_no",
30
+ "context": "Their order arrived damaged.",
31
+ "facts": { "amount": 80, "discount_pct": null, "new_customer": false },
32
+ "draft_field": "reply",
33
+ "draft_node": "Write the reply",
34
+ "workflow_name": "Refunds",
35
+ "resume_url": "{{ $execution.resumeUrl }}",
36
+ "execution_id": "{{ $execution.id }}"
37
+ }
38
+ ```
39
+
40
+ - `type` is `yes_no`, `approve_draft` (a message the person may edit: name the field and the node
41
+ whose output holds it with `draft_field` and `draft_node`; the hub reads that one field live from
42
+ the paused run and never stores it) or `pick_one` (with `options`, 2 to 5, each up to 60 characters).
43
+ - `title` (up to 120) and `context` (up to 500) are plain text in your own words, never a customer's
44
+ message. `facts` are numbers only; the card says they are as the automation reported them.
45
+ - `expires_in_hours` is optional: 48 by default, 1 to 168.
46
+
47
+ 2. **Wait.** A Wait node, Resume: On Webhook Call, HTTP Method POST, Authentication: Header Auth with
48
+ the credential **Awesomate decision resume** (the hub places it on the instance the first time a
49
+ decision is filed; the filing's answer names it). Limit the wait to the deadline plus an hour
50
+ (49 hours for the default).
51
+
52
+ 3. **IF** `{{ $json.body.decision }}` equals `approved`. The body also carries `edited_text` (the words
53
+ the person approved, for `approve_draft`) and `pick` (the option chosen, for `pick_one`): use those,
54
+ not your draft. Anything else (`rejected`, `expired`, or the Wait timing out) means do nothing.
55
+
56
+ ## Rules
57
+
58
+ - One decision per run, ever: the hub refuses a second one for the same execution.
59
+ - A run of a workflow Awesomate built (an agent's actions gateway, a library install) cannot be held
60
+ this way; agents already hold their own actions.
61
+ - The Hub Key files only. It can never approve, read the answer, or cancel: the answer comes back
62
+ only through the Wait. Never build a workflow that approves its own decision.
63
+ - The account needs decisions switched on; until then the hub answers 403 `not_on`. Say so plainly.
64
+ - The answers 4xx carry a sentence: relay it, don't guess around it.
@@ -161,8 +161,8 @@ System message (adapt, keep the rules): "Answer only from the business's
161
161
  procedures in 1Brain. Search first, then read the most relevant pages before
162
162
  answering. If nothing relevant is found, say you couldn't find a procedure for
163
163
  it and suggest who to ask; never guess. End every answer with the links (url)
164
- of the pages you used." Add the hat's `instructionLine` from
165
- `awesomate_business_map` when the agent helps a hat. Read-only by design: give
164
+ of the pages you used." Add the role's `instructionLine` from
165
+ `awesomate_business_map` when the agent helps a role. Read-only by design: give
166
166
  it no write operations unless the owner asks for that, and then make writes
167
167
  Draft. Test with a question the procedures answer and one they do not.
168
168