@awesomate/hosting-mcp 0.171.21 → 0.171.24

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
@@ -40465,6 +40465,7 @@ function retryAfterSeconds(headers, now = Date.now()) {
40465
40465
  const reset = /(?:^|[;,\s])reset=(\d+)/i.exec(headers.get("ratelimit") ?? "");
40466
40466
  return reset ? Number(reset[1]) : null;
40467
40467
  }
40468
+ var SELF_EXPLAINING_CONFLICTS = /* @__PURE__ */ new Set(["needs_documents", "locked"]);
40468
40469
  function inAbout(seconds) {
40469
40470
  if (seconds < 90) return "about a minute";
40470
40471
  if (seconds < 55 * 60) return `about ${Math.round(seconds / 60)} minutes`;
@@ -40574,6 +40575,7 @@ async function hubRequest(config3, method, path, jsonBody, opts = {}) {
40574
40575
  const settingsUrl = body && typeof body === "object" && typeof body.settingsUrl === "string" ? body.settingsUrl : `${chatHub ? hub : "https://hub.awesomate.ai"}/n8n/settings`;
40575
40576
  const instanceUrl = body && typeof body === "object" && typeof body.instanceUrl === "string" ? body.instanceUrl : null;
40576
40577
  hint = ` THIS IS NOT A HUB OUTAGE and not your workflow: the user's own n8n rejected the API key Awesomate has stored. Tell the user to fix it in two steps: (1) in their n8n${instanceUrl ? ` at ${instanceUrl}` : ""}, open Settings \u2192 n8n API and create a new API key; (2) paste it into their Awesomate account at ${settingsUrl} under "New n8n API Key" and save. Then retry. Do not retry before they confirm, and do not investigate hub/Cloudflare status: reads and validation keep working because those never touch their instance.`;
40578
+ } else if (res.status === 409 && typeof code === "string" && SELF_EXPLAINING_CONFLICTS.has(code)) {
40577
40579
  } else if (res.status === 409) {
40578
40580
  hint = " Conflict: the payload carries the specifics (a limit reached, or a prerequisite missing). Read its code field; do not blind-retry.";
40579
40581
  } else if (res.status === 422) {
@@ -42069,8 +42071,15 @@ async function knowledgeSearch(config3, args) {
42069
42071
  return mapKnowledgeError(err, config3);
42070
42072
  }
42071
42073
  }
42074
+ function teamScopeNote(audience, scope) {
42075
+ if (audience !== "internal") return null;
42076
+ const s = scope ?? {};
42077
+ if (s.all === true) return null;
42078
+ const narrows = ["source_ids", "tags", "kinds"].some((k) => Array.isArray(s[k]) && s[k].length > 0);
42079
+ return narrows ? null : "This Team agent reads nothing narrower than everything the team can see, so publishing it will be refused (scope_required). Ask the owner which collections it should read and set collectionIds, or, only if they say it should read everything, everything:true.";
42080
+ }
42072
42081
  function touchesScope(args) {
42073
- return Boolean(args.collectionIds || args.kinds || args.sourceIds);
42082
+ return Boolean(args.collectionIds || args.kinds || args.sourceIds || args.everything !== void 0);
42074
42083
  }
42075
42084
  var SCOPE_KEYS = ["source_ids", "tags", "datasets", "kinds", "data_sets", "allow_media", "allow_data"];
42076
42085
  function agentPatchBody(args, currentScope = {}) {
@@ -42083,7 +42092,9 @@ function agentPatchBody(args, currentScope = {}) {
42083
42092
  ...kept,
42084
42093
  ...args.collectionIds ? { tags: [...currentTags.filter((t) => !t.startsWith("collection:")), ...args.collectionIds.map((id) => `collection:${id}`)] } : {},
42085
42094
  ...args.kinds ? { kinds: args.kinds } : {},
42086
- ...args.sourceIds ? { source_ids: args.sourceIds } : {}
42095
+ ...args.sourceIds ? { source_ids: args.sourceIds } : {},
42096
+ // the tick rides in the scope, beside the stored fields (kept above), so it never wipes them
42097
+ ...args.everything !== void 0 ? { all: args.everything } : {}
42087
42098
  };
42088
42099
  }
42089
42100
  return {
@@ -42414,7 +42425,7 @@ async function knowledgeAgents(config3, args) {
42414
42425
  if (!(used.agents ?? []).some((a) => a.agent_id === args.agentId)) {
42415
42426
  return { error: "not_found", detail: "No such agent on this account. Read list for the agent ids." };
42416
42427
  }
42417
- const out2 = await hubDelete(config3, `${base2}/${encodeURIComponent(args.agentId)}`);
42428
+ const out2 = await hubDelete(config3, `${base2}/${encodeURIComponent(args.agentId)}`, { confirm: true });
42418
42429
  return { ...out2, status_note: "Deleted: it no longer answers on any key." };
42419
42430
  }
42420
42431
  if (args.action === "policies") {
@@ -42453,12 +42464,12 @@ async function knowledgeAgents(config3, args) {
42453
42464
  return await hubGet(config3, `/api/knowledge/agents/${encodeURIComponent(args.agentId)}`);
42454
42465
  }
42455
42466
  if (args.action === "create") {
42456
- const scopeArgs = { action: "update", collectionIds: args.collectionIds, kinds: args.kinds, sourceIds: args.sourceIds };
42467
+ const scopeArgs = { action: "update", collectionIds: args.collectionIds, kinds: args.kinds, sourceIds: args.sourceIds, everything: args.everything };
42457
42468
  const withScope = (scope) => {
42458
42469
  const current = scope && typeof scope === "object" && !Array.isArray(scope) ? scope : {};
42459
42470
  return touchesScope(scopeArgs) ? { scope: agentPatchBody(scopeArgs, current).scope } : scope !== void 0 ? { scope } : {};
42460
42471
  };
42461
- const callerFields = agentPatchBody({ ...args, collectionIds: void 0, kinds: void 0, sourceIds: void 0 });
42472
+ const callerFields = agentPatchBody({ ...args, collectionIds: void 0, kinds: void 0, sourceIds: void 0, everything: void 0 });
42462
42473
  let created;
42463
42474
  let sentScope;
42464
42475
  let extra = {};
@@ -42468,7 +42479,10 @@ async function knowledgeAgents(config3, args) {
42468
42479
  const body = { ...draft.proposal, ...callerFields, ...withScope(draft.proposal.scope) };
42469
42480
  sentScope = body.scope;
42470
42481
  created = await hubPost(config3, "/api/knowledge/agents", body);
42471
- extra = { test_questions: draft.test_questions ?? [], status_note: `Created as a private DRAFT serving audience '${args.audience ?? "private"}': test it, then publish when the user approves.` };
42482
+ extra = {
42483
+ test_questions: draft.test_questions ?? [],
42484
+ status_note: `Created as a private DRAFT serving audience '${args.audience ?? "private"}': test it, then publish when the user approves.`
42485
+ };
42472
42486
  } else {
42473
42487
  if (!args.name) return { error: "name (or goal) is required for create" };
42474
42488
  const body = { ...callerFields, name: args.name, ...withScope(void 0) };
@@ -42479,7 +42493,8 @@ async function knowledgeAgents(config3, args) {
42479
42493
  const storedScope = agent.scope && typeof agent.scope === "object" ? agent.scope : sentScope;
42480
42494
  const { collections, byKind } = await libraryShape(config3);
42481
42495
  const warning = draftScopeWarning(String(agent.agent_id ?? ""), storedScope, collections, byKind);
42482
- return { ...created, ...extra, ...warning ? { warning } : {} };
42496
+ const scopeNote = teamScopeNote(agent.audience ?? args.audience, storedScope);
42497
+ return { ...created, ...extra, ...warning ? { warning } : {}, ...scopeNote ? { scope_note: scopeNote } : {} };
42483
42498
  }
42484
42499
  if (args.action === "update") {
42485
42500
  if (!args.agentId) return { error: "agentId is required for update" };
@@ -42488,7 +42503,7 @@ async function knowledgeAgents(config3, args) {
42488
42503
  if (!Object.keys(body).length) {
42489
42504
  return {
42490
42505
  error: "invalid_request",
42491
- note: "update needs at least one of name, description, systemMessage, noAnswerMessage, grounding, audience, collectionIds, kinds, sourceIds, maxSources, temperature"
42506
+ note: "update needs at least one of name, description, systemMessage, noAnswerMessage, grounding, audience, collectionIds, kinds, sourceIds, everything, maxSources, temperature"
42492
42507
  };
42493
42508
  }
42494
42509
  const out2 = await hubPatch(config3, `/api/knowledge/agents/${encodeURIComponent(args.agentId)}`, body);
@@ -44017,7 +44032,7 @@ var groups_default = {
44017
44032
  awesomate_knowledge_agent: { group: "knowledge", surface: ["stdio", "chat"] },
44018
44033
  awesomate_knowledge_agent_change: { group: "knowledge", surface: ["stdio"] },
44019
44034
  awesomate_knowledge_agents: { group: "knowledge", surface: ["stdio", "chat"] },
44020
- awesomate_knowledge_agents_change: { group: "knowledge", surface: ["stdio", "chat"], chat: { actions: ["create", "update", "visitor_test"], omit: ["audience"], fixed: { create: { audience: "private" } } } },
44035
+ awesomate_knowledge_agents_change: { group: "knowledge", surface: ["stdio", "chat"], chat: { actions: ["create", "update", "visitor_test"], omit: ["audience", "everything"], fixed: { create: { audience: "private" } } } },
44021
44036
  awesomate_knowledge_ask: { group: "knowledge", surface: ["stdio", "chat"] },
44022
44037
  awesomate_knowledge_collections: { group: "knowledge", surface: ["stdio", "chat"] },
44023
44038
  awesomate_knowledge_collections_change: { group: "knowledge", surface: ["stdio", "chat"], chat: { actions: ["create", "update", "add", "remove"], omit: ["defaultVisibility"], destructive: true, fixed: { create: { defaultVisibility: "private" } }, refuse: { update: ["slug"] } } },
@@ -46363,7 +46378,7 @@ function registerKnowledge(r) {
46363
46378
  "awesomate_knowledge_agents_change",
46364
46379
  {
46365
46380
  annotations: annotate("awesomate_knowledge_agents_change", DESTRUCTIVE),
46366
- description: "Change the account's knowledge agents (the Knowledge agent builder; a hub agent's actions and skills are drafted with the hub agent tools in Claude Code, not here): 'publish' answers with map (a hint, while the agent is on no role of the business map): build a helper.attach from its map.attach, adding roleId (its suggestedRole, or the role the owner names), declaredLevel and the duty it does, propose it with awesomate_business_map_change, and say it waits for the owner in Tasks. Read them first with awesomate_knowledge_agents (list, get, policies, website_keys), and try a draft there with 'test'. 'create' {goal}: AI drafts the whole setup (instructions, scope, tone, test questions) from the account's own content and saves it as a PRIVATE DRAFT (never live, nothing lost); or {name} for a blank draft. The drafted scope is often too wide: it can come back limited to no collection (so it answers from every business's and every audience's content) or limited to kinds that leave out PDFs (stored as 'book'), FAQs ('faq') or images. Pass collectionIds (and kinds if needed) WITH create to scope it in one step; when the account has collections and the new agent reads none of them, or its kinds skip content the library holds, the result carries a warning listing the collections: fix it with update before testing or publishing. 'update' {agentId, ...fields}: edit the DRAFT config: name, description, systemMessage, noAnswerMessage, grounding, audience, collectionIds (scope to collections from awesomate_knowledge_collections), kinds, sourceIds, maxSources, temperature. Nothing changes for callers until 'publish'. 'visitor_test' {agentId, message (max 2000 chars), sessionId?}: ask the PUBLISHED agent through the real public visitor path, the only way to check what a website visitor actually gets; run it after publishing whenever the agent is public-facing or its scope includes internal/private sources. It works on every plan, and a question it cannot answer lands in the owner's Questions inbox like a real visitor's, so say so before using it. 'publish' {agentId}: makes the draft LIVE immediately for every key bound to the agent: get the user's explicit approval first, and read the version back. 'suspend' / 'resume' {agentId}: stop the agent answering on every key bound to it, or start it again (its last published version); both change what live callers get at once, so get the owner's explicit approval first. 'delete' {agentId, confirm:true}: removes the agent for good and every key bound to it stops answering; tell the owner that and pass confirm:true only after they say yes. 'policy_create' {name, description?, collectionIds?|kinds?|sourceIds?|tags?}: a policy named segment:all or segment:<group> is what an agent's customer groups use, so a person in that group answers only from what it allows; 'policy_update' {policyId, name?|description?|scope fields} (a scope REPLACES the stored one); 'policy_delete', 'policy_suspend', 'policy_resume' {policyId}. Every policy change applies to live callers at once: show the owner what changes and get a yes first. Website chat (owner only; every plan, answers count against the month's Knowledge answers): 'website_key' {agentId, origins, title?, subtitle?, label?, monthlyAnswerCap?, confirm:true}: makes a website key for a PUBLISHED, public-audience agent (refused otherwise, with what to do first) and returns it ONCE with the ready <script> snippet to paste before </body>; anyone on those sites can then ask the agent, and answers count against the account's monthly answers. Each key has its own monthly answer limit (by default half the account's at the time it is made), returned as monthly_answer_cap: tell the user the number. A key's limit cannot be changed later; a different limit is a new key, then revoke the old one. Ask the owner which sites, say what it means, and pass confirm:true only after they say yes. Only https:// sites work. For a site being built on the owner's own computer, pass localPort (the port, 8500 for http://localhost:8500) instead of origins: a separate TEST code for http://localhost and http://127.0.0.1 on that port, never mixed with real sites, that stops by itself after 7 days (stops_at) and counts against the same monthly answers; put it in the local copy only, and make a real key for the live site. 'revoke_website_key' {keyId, confirm:true}: stops the chat on every site using that key at once; ask first. Other keys (for automations and servers) are made in the hub (Knowledge, Agents) and never pass through this tool.",
46381
+ description: `Change the account's knowledge agents (the Knowledge agent builder; a hub agent's actions and skills are drafted with the hub agent tools in Claude Code, not here): 'publish' answers with map (a hint, while the agent is on no role of the business map): build a helper.attach from its map.attach, adding roleId (its suggestedRole, or the role the owner names), declaredLevel and the duty it does, propose it with awesomate_business_map_change, and say it waits for the owner in Tasks. Read them first with awesomate_knowledge_agents (list, get, policies, website_keys), and try a draft there with 'test'. 'create' {goal}: AI drafts the whole setup (instructions, scope, tone, test questions) from the account's own content and saves it as a PRIVATE DRAFT (never live, nothing lost); or {name} for a blank draft. The drafted scope is often too wide: it can come back limited to no collection (so it answers from every business's and every audience's content) or limited to kinds that leave out PDFs (stored as 'book'), FAQs ('faq') or images. Pass collectionIds (and kinds if needed) WITH create to scope it in one step; when the account has collections and the new agent reads none of them, or its kinds skip content the library holds, the result carries a warning listing the collections: fix it with update before testing or publishing. 'update' {agentId, ...fields}: edit the DRAFT config: name, description, systemMessage, noAnswerMessage, grounding, audience, collectionIds (scope to collections from awesomate_knowledge_collections), kinds, sourceIds, everything, maxSources, temperature. A Team ('internal') agent goes live (publish, resume) only with collectionIds, kinds or sourceIds set, or with everything:true, the user's explicit "Everything your team can see" choice (never set it on your own); otherwise publish and resume answer 400 scope_required: ask the owner which collections it should read (or whether it really should read everything the team can see), update, then publish. A create from a goal for a Team agent with no scope says so in scope_note. An agent already live with no scope is not changed: list and get mark it reads_everything; tell the owner and offer to scope it. Nothing changes for callers until 'publish'. 'visitor_test' {agentId, message (max 2000 chars), sessionId?}: ask the PUBLISHED agent through the real public visitor path, the only way to check what a website visitor actually gets; run it after publishing whenever the agent is public-facing or its scope includes internal/private sources. It works on every plan, and a question it cannot answer lands in the owner's Questions inbox like a real visitor's, so say so before using it. 'publish' {agentId}: makes the draft LIVE immediately for every key bound to the agent: get the user's explicit approval first, and read the version back. 'suspend' / 'resume' {agentId}: stop the agent answering on every key bound to it, or start it again (its last published version); both change what live callers get at once, so get the owner's explicit approval first. 'delete' {agentId, confirm:true}: the account owner's alone (their own sign-in or Claude Code key; a team member, staff or a chat connection gets owner_only). Only for an agent that lives in Knowledge alone: it deletes it for good and every key bound to it stops answering; tell the owner that and pass confirm:true only after they say yes. An agent on the Agents page answers use_remove: the owner removes it there instead (Remove on the Agents page, or the hub agent tools' remove in Claude Code), which they can undo for 30 days. 'policy_create' {name, description?, collectionIds?|kinds?|sourceIds?|tags?}: a policy named segment:all or segment:<group> is what an agent's customer groups use, so a person in that group answers only from what it allows; 'policy_update' {policyId, name?|description?|scope fields} (a scope REPLACES the stored one); 'policy_delete', 'policy_suspend', 'policy_resume' {policyId}. Policy changes are the account owner's (a team member gets owner_only). Every policy change applies to live callers at once: show the owner what changes and get a yes first. Website chat (owner only; every plan, answers count against the month's Knowledge answers): 'website_key' {agentId, origins, title?, subtitle?, label?, monthlyAnswerCap?, confirm:true}: makes a website key for a PUBLISHED, public-audience agent (refused otherwise, with what to do first) and returns it ONCE with the ready <script> snippet to paste before </body>; anyone on those sites can then ask the agent, and answers count against the account's monthly answers. Each key has its own monthly answer limit (by default half the account's at the time it is made), returned as monthly_answer_cap: tell the user the number. A key's limit cannot be changed later; a different limit is a new key, then revoke the old one. Ask the owner which sites, say what it means, and pass confirm:true only after they say yes. Only https:// sites work. For a site being built on the owner's own computer, pass localPort (the port, 8500 for http://localhost:8500) instead of origins: a separate TEST code for http://localhost and http://127.0.0.1 on that port, never mixed with real sites, that stops by itself after 7 days (stops_at) and counts against the same monthly answers; put it in the local copy only, and make a real key for the live site. 'revoke_website_key' {keyId, confirm:true}: stops the chat on every site using that key at once; ask first. Other keys (for automations and servers) are made in the hub (Knowledge, Agents) and never pass through this tool.`,
46367
46382
  inputSchema: {
46368
46383
  action: splitActions([...KNOWLEDGE_AGENTS_CHANGES], KNOWLEDGE_AGENTS_READS, "awesomate_knowledge_agents"),
46369
46384
  confirm: external_exports.boolean().optional().describe("delete, website_key, revoke_website_key: true only after the owner said yes"),
@@ -46387,6 +46402,7 @@ function registerKnowledge(r) {
46387
46402
  collectionIds: external_exports.array(external_exports.string().max(64)).max(16).optional().describe("create/update: scope the agent to these collections (collection_id from awesomate_knowledge_collections list); replaces the collection scope only, other scope fields and free-form tags are kept. policy_create/update: the collections the policy allows"),
46388
46403
  kinds: external_exports.array(external_exports.string().max(40)).max(16).optional().describe("create/update: restrict retrieval to source kinds (web, document, video, audio, image, book, faq, dataset; PDFs are stored as 'book'); omit for all kinds. policy_create/update: the kinds the policy allows"),
46389
46404
  sourceIds: external_exports.array(external_exports.string().max(200)).max(500).optional().describe("create/update, policy_create/update: pin the scope to specific sources"),
46405
+ everything: external_exports.boolean().optional().describe(`create/update: a Team ('internal') agent's "Everything your team can see" tick. A Team agent with no collectionIds, kinds or sourceIds is published or resumed only with this true (else 400 scope_required). Anyone who may edit the agent can set it, so set it only when the user has said in words that the agent should read everything the team can see; prefer collections. false clears it`),
46390
46406
  maxSources: external_exports.number().int().min(1).max(10).optional().describe("create/update: how many sources one answer may cite (1-10)"),
46391
46407
  temperature: external_exports.number().min(0).max(1).optional().describe("create/update: 0 is the most literal"),
46392
46408
  message: external_exports.string().max(4e3).optional().describe("visitor_test: the question a visitor asks the published agent (max 2000 characters)"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesomate/hosting-mcp",
3
- "version": "0.171.21",
3
+ "version": "0.171.24",
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,23 @@
1
1
  {
2
2
  "versions": [
3
+ {
4
+ "version": "0.171.24",
5
+ "highlights": [
6
+ "awesomate_knowledge_agents_change: a Team (internal) agent is published or resumed only with collectionIds, kinds or sourceIds set, or with the new everything:true (the user's explicit \"Everything your team can see\" choice); otherwise the hub answers 400 scope_required. create returns scope_note for a Team agent made with no scope, and awesomate_knowledge_agents marks an agent live with no scope as reads_everything"
7
+ ]
8
+ },
9
+ {
10
+ "version": "0.171.23",
11
+ "highlights": [
12
+ "awesomate_knowledge_agents_change: deleting an agent and changing access policies are the account owner's (a team member gets owner_only); delete now sends confirm:true, and an agent on the Agents page, a website, a channel or the business map answers use_remove: remove it on the Agents page, which can be undone for 30 days"
13
+ ]
14
+ },
15
+ {
16
+ "version": "0.171.22",
17
+ "highlights": [
18
+ "awesomate_business: a document refused because the ones it builds on are not written reads as one plain sentence ('Write FAQ questions, Brand voice and Products and services first'), with no generic Conflict tail; the same for a locked document. Document 1 is called Business description everywhere, the plan shows its approval time, and a context for a blog includes it"
19
+ ]
20
+ },
3
21
  {
4
22
  "version": "0.171.21",
5
23
  "highlights": [
@@ -79,7 +79,7 @@ platform's answer beats anything you remember.
79
79
  | Instant search with facet counts (find WHAT is in there: moments, pages, datasets; free) | `awesomate_knowledge_search` |
80
80
  | Ask a question → verified answer + numbered sources (accepts the same facet `filters` to ask within a slice) | `awesomate_knowledge_ask` |
81
81
  | Agent persona, fallback message and model tier: get and set (the single workspace default). Every account answers on Gemini Flash (`flash`) until the owner picks another; Claude Sonnet is a choice on any plan, Claude Opus on Embedded. Which model answers ONE live agent is its `effective_model` on `awesomate_knowledge_agents` list/get (absent while it is off, paused or has changes not live yet) | `awesomate_knowledge_agent` (read) · `awesomate_knowledge_agent_change` (change) |
82
- | 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, delete (explicit approval first) / `logs`, `answer_rates`, `where_used` / `ai_key_status`, `models` (read only: the AI key is saved in the hub) / customer-group access policies (`policies`, `policy_create`, `policy_update`, `policy_delete`, `policy_suspend`, `policy_resume`) | `awesomate_knowledge_agents` (read) · `awesomate_knowledge_agents_change` (change) |
82
+ | 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; a TEAM (`internal`) agent is published or resumed only with `collectionIds`/`kinds`/`sourceIds` set or `everything:true`, the user's own "Everything your team can see" choice, else 400 `scope_required`: ask which collections, and set `everything` only when they say in words it should read everything; relay `scope_note` and any `reads_everything` mark) / 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, delete (explicit approval first) / `logs`, `answer_rates`, `where_used` / `ai_key_status`, `models` (read only: the AI key is saved in the hub) / customer-group access policies (`policies`, `policy_create`, `policy_update`, `policy_delete`, `policy_suspend`, `policy_resume`) | `awesomate_knowledge_agents` (read) · `awesomate_knowledge_agents_change` (change) |
83
83
  | People, places, topics: list / name / hide / merge / alias suggestions / re-run resolution / look one up by name (`explore`), who appears with it (`related`), open the passage behind a citation (`evidence`) | `awesomate_knowledge_people` (read) · `awesomate_knowledge_people_change` (change) |
84
84
  | Business-data warehouse: `metrics` / `datasets` / `query` / `imports`: answer quantitative questions from their own imported business data (query is free-form but read-only); one `dataset`, `dataset_update` (name, column decisions), one `import`, and `import_action` (approve, reject, withdraw with confirm, reimport, answer), each after the owner's yes | `awesomate_knowledge_data` (read) · `awesomate_knowledge_data_change` (change) |
85
85
  | Refresh these skills from the latest package | `awesomate_skill_update` |
@@ -151,8 +151,13 @@ PAT. Rotating the n8n key, buying a pack and deleting the WHOLE knowledge
151
151
  base deliberately have NO tool: they're consequential enough to route
152
152
  through explicit REST calls (or the hub) the user has just approved.
153
153
  Deleting ONE source is `awesomate_knowledge_sources_change {action:'remove'}` and
154
- deleting an agent is `awesomate_knowledge_agents_change {action:'delete',
155
- confirm:true}`, both after the owner's yes.
154
+ deleting an agent that lives in Knowledge alone is
155
+ `awesomate_knowledge_agents_change {action:'delete', confirm:true}`, both after
156
+ the owner's yes. Deleting an agent is the account owner's alone (owner_only for
157
+ anyone else), and an agent on the Agents page answers use_remove: remove it with
158
+ `awesomate_agents_change {action:'remove'}`, which the owner can undo for 30
159
+ days. Policy changes are the account owner's too (a team member gets
160
+ owner_only).
156
161
 
157
162
  | Action | Endpoint |
158
163
  |---|---|
@@ -161,7 +166,7 @@ confirm:true}`, both after the owner's yes.
161
166
  | Whole-library counts | `GET /api/knowledge/sources/summary` — a PATH. **`?action=summary` is NOT a thing:** it returns 200 with a plain source list, so `.total` is `undefined` and any count derived from it silently becomes 0 or NaN. |
162
167
  | 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. |
163
168
  | Business-data warehouse (what `awesomate_knowledge_data` and `awesomate_knowledge_data_change` call: metrics, datasets, `dataset`, `dataset_update`, imports, `import`, `import_action`, query) | `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) |
164
- | Agent builder (what `awesomate_knowledge_agents` and `awesomate_knowledge_agents_change` call) | `GET\|POST /api/knowledge/agents` · `GET\|PATCH\|DELETE /api/knowledge/agents/:agent_id` · `POST /api/knowledge/agents/:agent_id/{publish,suspend,resume}` · `GET /api/knowledge/agents/{logs,answer-rates,where-used}` · `GET\|POST /api/knowledge/agents/policies` · `GET\|PATCH\|DELETE /api/knowledge/agents/policies/:policy_id` · `POST /api/knowledge/agents/policies/:policy_id/{suspend,resume}` |
169
+ | Agent builder (what `awesomate_knowledge_agents` and `awesomate_knowledge_agents_change` call) | `GET\|POST /api/knowledge/agents` · `GET\|PATCH /api/knowledge/agents/:agent_id` · `DELETE /api/knowledge/agents/:agent_id` (body `{confirm:true}`, the owner only) · `POST /api/knowledge/agents/:agent_id/{publish,suspend,resume}` · `GET /api/knowledge/agents/{logs,answer-rates,where-used}` · `GET\|POST /api/knowledge/agents/policies` · `GET\|PATCH\|DELETE /api/knowledge/agents/policies/:policy_id` · `POST /api/knowledge/agents/policies/:policy_id/{suspend,resume}` |
165
170
  | **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 is not what the public sees (it can quote internal or private sources); a team member gets 403 `owner_only_agent` for an agent whose audience is private. |
166
171
  | **Ask the PUBLISHED agent as a visitor** (`action:'visitor_test'`) | `POST /api/knowledge/agents/:agent_id/visitor-chat` `{message (max 2000), session_id?}`. Every plan; an unanswered question lands in the Questions inbox. |
167
172
  | **Website chat key** (`action:'website_key'`, `website_keys`, `revoke_website_key`; owner only, every plan) | `POST /api/knowledge/agents/keys` `{class:'p', agent_id, allowed_origins (https only, no path or wildcard), label?, request_id?, monthly_answer_cap?}` returns the key ONCE with its `monthly_answer_cap`; with no cap the hub sets half the account's monthly answers at that moment, and a key's cap cannot be changed later (a new limit is a new key). The tool refuses an agent that is not published, not public-audience, or paused. List with `GET /api/knowledge/agents/keys` (class `p`), revoke with `DELETE /api/knowledge/agents/keys/:key_id`. Every one only after the owner's yes. **Testing on the owner's own computer** (a site built locally, e.g. http://localhost:8500): pass `localPort: 8500` instead of `origins`. That makes a separate TEST code for `http://localhost:8500` and `http://127.0.0.1:8500` only, which stops by itself after 7 days (`stops_at`), counts against the same monthly answers, and is marked `test_only` in `website_keys`. Never mix it with real sites, never put it on the live site, and make a real https key for the live site. Any other http:// address is refused. Use this instead of falling back to an n8n Chat Trigger for local testing. |
@@ -157,8 +157,8 @@ inbox, so say so before using it.
157
157
  Access policies (the customer groups an agent narrows to: a policy named
158
158
  `segment:all` or `segment:<group>`) are `policies` / `policy_create` /
159
159
  `policy_update` / `policy_delete` / `policy_suspend` / `policy_resume` on the
160
- same tool; each change applies to live callers at once, so show the owner
161
- what changes first. API keys stay hub UI only (Knowledge, Agents): a key is
160
+ same tool; only the account owner changes them, and each change applies to
161
+ live callers at once, so show the owner what changes first. API keys stay hub UI only (Knowledge, Agents): a key is
162
162
  shown once there and never passes through a tool.
163
163
 
164
164
  ## 6. Publish only with explicit approval