@burdenoff/microfe-botmanor 2026.1115.2 → 2026.1117.1

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.
Files changed (53) hide show
  1. package/dist/botlit/components/BotFormFields.js +66 -87
  2. package/dist/botlit/components/BotFormFields.js.map +1 -1
  3. package/dist/botlit/components/EmojiPicker.d.ts +20 -0
  4. package/dist/botlit/components/EmojiPicker.js +42 -0
  5. package/dist/botlit/components/EmojiPicker.js.map +1 -0
  6. package/dist/botlit/components/index.d.ts +1 -0
  7. package/dist/botlit/hooks/internal/allPages.d.ts +2 -0
  8. package/dist/botlit/hooks/internal/allPages.js +25 -0
  9. package/dist/botlit/hooks/internal/allPages.js.map +1 -0
  10. package/dist/botlit/hooks/internal/workspaceGateway.js +33 -32
  11. package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -1
  12. package/dist/botlit/hooks/useAgents.d.ts +26 -3
  13. package/dist/botlit/hooks/useAgents.js +160 -110
  14. package/dist/botlit/hooks/useAgents.js.map +1 -1
  15. package/dist/botlit/hooks/useBotAgents.d.ts +35 -0
  16. package/dist/botlit/hooks/useBotAgents.js +95 -0
  17. package/dist/botlit/hooks/useBotAgents.js.map +1 -0
  18. package/dist/botlit/hooks/useBots.js +2 -2
  19. package/dist/botlit/hooks/useBots.js.map +1 -1
  20. package/dist/botlit/hooks/useKnowledgeBases.d.ts +13 -0
  21. package/dist/botlit/hooks/useKnowledgeBases.js +77 -58
  22. package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -1
  23. package/dist/botlit/hooks/useMCPServers.js +53 -57
  24. package/dist/botlit/hooks/useMCPServers.js.map +1 -1
  25. package/dist/botlit/pages/AgentBuilderPage.js +848 -425
  26. package/dist/botlit/pages/AgentBuilderPage.js.map +1 -1
  27. package/dist/botlit/pages/AgentDetailPage.js +629 -518
  28. package/dist/botlit/pages/AgentDetailPage.js.map +1 -1
  29. package/dist/botlit/pages/AgentsListPage.js +487 -291
  30. package/dist/botlit/pages/AgentsListPage.js.map +1 -1
  31. package/dist/botlit/pages/KnowledgeBaseDetailPage.js +519 -265
  32. package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -1
  33. package/dist/botlit/pages/KnowledgeBasesPage.js +269 -130
  34. package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -1
  35. package/dist/botlit/types/index.d.ts +4 -1
  36. package/dist/botlit/utils/agentDelete.d.ts +5 -0
  37. package/dist/botlit/utils/agentDelete.js +15 -0
  38. package/dist/botlit/utils/agentDelete.js.map +1 -0
  39. package/dist/botlit/utils/agentSettings.d.ts +77 -0
  40. package/dist/botlit/utils/agentSettings.js +78 -0
  41. package/dist/botlit/utils/agentSettings.js.map +1 -0
  42. package/dist/botlit/utils/kbDelete.d.ts +5 -0
  43. package/dist/botlit/utils/kbDelete.js +11 -0
  44. package/dist/botlit/utils/kbDelete.js.map +1 -0
  45. package/dist/botlit/utils/kbSettings.d.ts +41 -0
  46. package/dist/botlit/utils/kbSettings.js +60 -0
  47. package/dist/botlit/utils/kbSettings.js.map +1 -0
  48. package/dist/generated/wspace-operations.d.ts +75 -0
  49. package/dist/generated/wspace-operations.js +60 -48
  50. package/dist/generated/wspace-operations.js.map +1 -1
  51. package/dist/generated/wspace-types.d.ts +66 -0
  52. package/dist/generated/wspace-types.js.map +1 -1
  53. package/package.json +1 -1
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Agent form rules (BOFF-12447, BOFF-12449, BOFF-12455)
3
+ * @module botlit/utils
4
+ *
5
+ * What a valid agent name, slug, prompt, temperature, token limit and
6
+ * concurrency limit are, shared by the builder and mirrored in
7
+ * `wspace-botmanor-svc` (`agents/agent-settings.ts`), so the form and the server
8
+ * never disagree. 0 is a real temperature: absent and invalid are different
9
+ * from zero, and are never turned into a default silently.
10
+ */
11
+ export declare const AGENT_NAME_MAX_LENGTH = 100;
12
+ export declare const AGENT_SLUG_MAX_LENGTH = 64;
13
+ /** Slugs kept for the platform because they collide with agent route names. */
14
+ export declare const RESERVED_AGENT_SLUGS: ReadonlySet<string>;
15
+ /** The one default for each numeric setting (the API applies the same ones). */
16
+ export declare const AGENT_DEFAULTS: {
17
+ readonly temperature: 0.7;
18
+ readonly maxTokens: 2048;
19
+ readonly maxConcurrentExecutions: 10;
20
+ };
21
+ export declare const AGENT_TEMPERATURE_RANGE: {
22
+ readonly min: 0;
23
+ readonly max: 2;
24
+ };
25
+ export declare const AGENT_MAX_TOKENS_RANGE: {
26
+ readonly min: 1;
27
+ readonly max: 200000;
28
+ };
29
+ export declare const AGENT_MAX_CONCURRENT_RANGE: {
30
+ readonly min: 1;
31
+ readonly max: 100;
32
+ };
33
+ export type AgentFieldError = 'nameRequired' | 'nameTooLong' | 'slugRequired' | 'slugTooLong' | 'slugInvalid' | 'slugReserved' | 'promptRequired' | 'temperatureRange' | 'maxTokensRange' | 'maxConcurrentRange';
34
+ export interface AgentFormValues {
35
+ name: string;
36
+ slug: string;
37
+ systemPrompt: string;
38
+ temperature: string;
39
+ maxTokens: string;
40
+ maxConcurrentExecutions: string;
41
+ }
42
+ export type AgentFormErrors = Partial<Record<keyof AgentFormValues, AgentFieldError>>;
43
+ /** English fallbacks, keyed so callers translate through `useTr`. */
44
+ export declare const AGENT_FIELD_MESSAGES: Record<AgentFieldError, string>;
45
+ /** A blank field means "use the default" (undefined); text that is not a finite number is NaN, so it can be refused. */
46
+ export declare function parseNumberField(text: string): number | undefined;
47
+ /**
48
+ * Validates the agent form. An empty slug is fine when one can be derived from
49
+ * the name; it is an error when the name has no usable letters. Blank numeric
50
+ * fields are valid: they mean the default.
51
+ */
52
+ export declare function validateAgentForm(values: AgentFormValues): AgentFormErrors;
53
+ /** The slug to send: the typed one (normalised), else one made from the name. */
54
+ export declare function agentSlugFor(name: string, slug: string): string;
55
+ /**
56
+ * The capabilities the builder offers (BOFF-12450). Only these change what an
57
+ * agent does at runtime: MCP tools (when MCP servers are attached), RAG (when a
58
+ * knowledge base is attached) and agent-to-agent delegation. The others in the
59
+ * schema (REASONING, MULTIMODAL, MEMORY, CODE_EXECUTION, WEB_BROWSING) are not
60
+ * read by the chat or channel runtime, so they are not offered; a value an
61
+ * agent already carries is kept as saved, never dropped silently.
62
+ */
63
+ export declare const OFFERED_CAPABILITIES: readonly ["MCP_TOOLS", "RAG", "A2A"];
64
+ export type OfferedCapability = (typeof OFFERED_CAPABILITIES)[number];
65
+ export type CapabilityWarning = 'mcpToolsNeedsServer' | 'ragNeedsKnowledgeBase' | 'serversNeedMcpTools' | 'knowledgeBasesNeedRag';
66
+ /**
67
+ * Mismatches between the ticked capabilities and what is attached. Each one
68
+ * means something configured has no effect at runtime, which otherwise fails
69
+ * silently.
70
+ */
71
+ export declare function capabilityWarnings(input: {
72
+ capabilities: readonly string[];
73
+ mcpServerCount: number;
74
+ knowledgeBaseCount: number;
75
+ }): CapabilityWarning[];
76
+ /** Which builder tab holds each form field, so a tab can show that it has a problem. */
77
+ export declare const AGENT_FIELD_TAB: Record<keyof AgentFormValues, 'basics' | 'prompt'>;
@@ -0,0 +1,78 @@
1
+ import { BOT_SLUG_PATTERN as e, slugify as t } from "./botIdentity.js";
2
+ var n = /* @__PURE__ */ new Set([
3
+ "new",
4
+ "edit",
5
+ "create",
6
+ "admin",
7
+ "api",
8
+ "bots",
9
+ "approvals",
10
+ "settings"
11
+ ]), r = {
12
+ temperature: .7,
13
+ maxTokens: 2048,
14
+ maxConcurrentExecutions: 10
15
+ }, i = {
16
+ min: 0,
17
+ max: 2
18
+ }, a = {
19
+ min: 1,
20
+ max: 2e5
21
+ }, o = {
22
+ min: 1,
23
+ max: 100
24
+ }, s = {
25
+ nameRequired: "Enter a name for the agent.",
26
+ nameTooLong: "Use at most 100 characters for the name.",
27
+ slugRequired: "Enter a slug using letters, numbers and hyphens.",
28
+ slugTooLong: "Use at most 64 characters for the slug.",
29
+ slugInvalid: "Use only lowercase letters, numbers and single hyphens, for example support-agent.",
30
+ slugReserved: "This slug is reserved. Choose another one.",
31
+ promptRequired: "Enter the system prompt: the instructions the agent follows.",
32
+ temperatureRange: `Temperature must be a number from ${i.min} to ${i.max}.`,
33
+ maxTokensRange: `Max tokens must be a whole number from ${a.min} to ${a.max}.`,
34
+ maxConcurrentRange: `Max concurrent executions must be a whole number from ${o.min} to ${o.max}.`
35
+ };
36
+ function c(e) {
37
+ let t = e.trim();
38
+ if (t !== "") return Number(t);
39
+ }
40
+ function l(e, t, n, r) {
41
+ let i = c(e);
42
+ if (i !== void 0 && (!Number.isFinite(i) || i < t.min || i > t.max || n && !Number.isInteger(i))) return r;
43
+ }
44
+ function u(r) {
45
+ let s = {}, c = r.name.trim();
46
+ c.length === 0 ? s.name = "nameRequired" : c.length > 100 && (s.name = "nameTooLong");
47
+ let u = r.slug.trim() === "" ? t(c, 64) : r.slug.trim();
48
+ u === "" ? s.slug = "slugRequired" : u.length > 64 ? s.slug = "slugTooLong" : e.test(u) ? n.has(u) && (s.slug = "slugReserved") : s.slug = "slugInvalid", r.systemPrompt.trim().length === 0 && (s.systemPrompt = "promptRequired");
49
+ let d = l(r.temperature, i, !1, "temperatureRange");
50
+ d && (s.temperature = d);
51
+ let f = l(r.maxTokens, a, !0, "maxTokensRange");
52
+ f && (s.maxTokens = f);
53
+ let p = l(r.maxConcurrentExecutions, o, !0, "maxConcurrentRange");
54
+ return p && (s.maxConcurrentExecutions = p), s;
55
+ }
56
+ function d(e, n) {
57
+ return t(n.trim() === "" ? e : n, 64);
58
+ }
59
+ var f = [
60
+ "MCP_TOOLS",
61
+ "RAG",
62
+ "A2A"
63
+ ];
64
+ function p(e) {
65
+ let t = [], n = e.capabilities.includes("MCP_TOOLS"), r = e.capabilities.includes("RAG");
66
+ return n && e.mcpServerCount === 0 && t.push("mcpToolsNeedsServer"), r && e.knowledgeBaseCount === 0 && t.push("ragNeedsKnowledgeBase"), !n && e.mcpServerCount > 0 && t.push("serversNeedMcpTools"), !r && e.knowledgeBaseCount > 0 && t.push("knowledgeBasesNeedRag"), t;
67
+ }
68
+ var m = {
69
+ name: "basics",
70
+ slug: "basics",
71
+ systemPrompt: "prompt",
72
+ temperature: "prompt",
73
+ maxTokens: "prompt",
74
+ maxConcurrentExecutions: "prompt"
75
+ };
76
+ export { r as AGENT_DEFAULTS, s as AGENT_FIELD_MESSAGES, m as AGENT_FIELD_TAB, o as AGENT_MAX_CONCURRENT_RANGE, a as AGENT_MAX_TOKENS_RANGE, i as AGENT_TEMPERATURE_RANGE, f as OFFERED_CAPABILITIES, n as RESERVED_AGENT_SLUGS, d as agentSlugFor, p as capabilityWarnings, c as parseNumberField, u as validateAgentForm };
77
+
78
+ //# sourceMappingURL=agentSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentSettings.js","names":["RESERVED_AGENT_SLUGS","AGENT_DEFAULTS","AGENT_TEMPERATURE_RANGE","AGENT_MAX_TOKENS_RANGE","AGENT_MAX_CONCURRENT_RANGE","AGENT_FIELD_MESSAGES","parseNumberField","trimmed","text","numberError","value","range","whole","error","validateAgentForm","errors","name","values","slug","slugify","BOT_SLUG_PATTERN","temperature","maxTokens","maxConcurrent","agentSlugFor","OFFERED_CAPABILITIES","capabilityWarnings","warnings","hasTools","input","hasRag","AGENT_FIELD_TAB"],"sources":["../../../src/botlit/utils/agentSettings.ts"],"sourcesContent":["/**\n * Agent form rules (BOFF-12447, BOFF-12449, BOFF-12455)\n * @module botlit/utils\n *\n * What a valid agent name, slug, prompt, temperature, token limit and\n * concurrency limit are, shared by the builder and mirrored in\n * `wspace-botmanor-svc` (`agents/agent-settings.ts`), so the form and the server\n * never disagree. 0 is a real temperature: absent and invalid are different\n * from zero, and are never turned into a default silently.\n */\n\nimport { BOT_SLUG_PATTERN, slugify } from './botIdentity';\n\nexport const AGENT_NAME_MAX_LENGTH = 100;\nexport const AGENT_SLUG_MAX_LENGTH = 64;\n\n/** Slugs kept for the platform because they collide with agent route names. */\nexport const RESERVED_AGENT_SLUGS: ReadonlySet<string> = new Set([\n 'new',\n 'edit',\n 'create',\n 'admin',\n 'api',\n 'bots',\n 'approvals',\n 'settings',\n]);\n\n/** The one default for each numeric setting (the API applies the same ones). */\nexport const AGENT_DEFAULTS = {\n temperature: 0.7,\n maxTokens: 2048,\n maxConcurrentExecutions: 10,\n} as const;\n\nexport const AGENT_TEMPERATURE_RANGE = { min: 0, max: 2 } as const;\nexport const AGENT_MAX_TOKENS_RANGE = { min: 1, max: 200_000 } as const;\nexport const AGENT_MAX_CONCURRENT_RANGE = { min: 1, max: 100 } as const;\n\nexport type AgentFieldError =\n | 'nameRequired'\n | 'nameTooLong'\n | 'slugRequired'\n | 'slugTooLong'\n | 'slugInvalid'\n | 'slugReserved'\n | 'promptRequired'\n | 'temperatureRange'\n | 'maxTokensRange'\n | 'maxConcurrentRange';\n\nexport interface AgentFormValues {\n name: string;\n slug: string;\n systemPrompt: string;\n temperature: string;\n maxTokens: string;\n maxConcurrentExecutions: string;\n}\n\nexport type AgentFormErrors = Partial<Record<keyof AgentFormValues, AgentFieldError>>;\n\n/** English fallbacks, keyed so callers translate through `useTr`. */\nexport const AGENT_FIELD_MESSAGES: Record<AgentFieldError, string> = {\n nameRequired: 'Enter a name for the agent.',\n nameTooLong: `Use at most ${AGENT_NAME_MAX_LENGTH} characters for the name.`,\n slugRequired: 'Enter a slug using letters, numbers and hyphens.',\n slugTooLong: `Use at most ${AGENT_SLUG_MAX_LENGTH} characters for the slug.`,\n slugInvalid: 'Use only lowercase letters, numbers and single hyphens, for example support-agent.',\n slugReserved: 'This slug is reserved. Choose another one.',\n promptRequired: 'Enter the system prompt: the instructions the agent follows.',\n temperatureRange: `Temperature must be a number from ${AGENT_TEMPERATURE_RANGE.min} to ${AGENT_TEMPERATURE_RANGE.max}.`,\n maxTokensRange: `Max tokens must be a whole number from ${AGENT_MAX_TOKENS_RANGE.min} to ${AGENT_MAX_TOKENS_RANGE.max}.`,\n maxConcurrentRange: `Max concurrent executions must be a whole number from ${AGENT_MAX_CONCURRENT_RANGE.min} to ${AGENT_MAX_CONCURRENT_RANGE.max}.`,\n};\n\n/** A blank field means \"use the default\" (undefined); text that is not a finite number is NaN, so it can be refused. */\nexport function parseNumberField(text: string): number | undefined {\n const trimmed = text.trim();\n if (trimmed === '') return undefined;\n return Number(trimmed);\n}\n\nfunction numberError(\n text: string,\n range: { min: number; max: number },\n whole: boolean,\n error: AgentFieldError\n): AgentFieldError | undefined {\n const value = parseNumberField(text);\n if (value === undefined) return undefined;\n if (!Number.isFinite(value) || value < range.min || value > range.max) return error;\n if (whole && !Number.isInteger(value)) return error;\n return undefined;\n}\n\n/**\n * Validates the agent form. An empty slug is fine when one can be derived from\n * the name; it is an error when the name has no usable letters. Blank numeric\n * fields are valid: they mean the default.\n */\nexport function validateAgentForm(values: AgentFormValues): AgentFormErrors {\n const errors: AgentFormErrors = {};\n const name = values.name.trim();\n\n if (name.length === 0) errors.name = 'nameRequired';\n else if (name.length > AGENT_NAME_MAX_LENGTH) errors.name = 'nameTooLong';\n\n const slug =\n values.slug.trim() === '' ? slugify(name, AGENT_SLUG_MAX_LENGTH) : values.slug.trim();\n if (slug === '') errors.slug = 'slugRequired';\n else if (slug.length > AGENT_SLUG_MAX_LENGTH) errors.slug = 'slugTooLong';\n else if (!BOT_SLUG_PATTERN.test(slug)) errors.slug = 'slugInvalid';\n else if (RESERVED_AGENT_SLUGS.has(slug)) errors.slug = 'slugReserved';\n\n if (values.systemPrompt.trim().length === 0) errors.systemPrompt = 'promptRequired';\n\n const temperature = numberError(\n values.temperature,\n AGENT_TEMPERATURE_RANGE,\n false,\n 'temperatureRange'\n );\n if (temperature) errors.temperature = temperature;\n const maxTokens = numberError(values.maxTokens, AGENT_MAX_TOKENS_RANGE, true, 'maxTokensRange');\n if (maxTokens) errors.maxTokens = maxTokens;\n const maxConcurrent = numberError(\n values.maxConcurrentExecutions,\n AGENT_MAX_CONCURRENT_RANGE,\n true,\n 'maxConcurrentRange'\n );\n if (maxConcurrent) errors.maxConcurrentExecutions = maxConcurrent;\n\n return errors;\n}\n\n/** The slug to send: the typed one (normalised), else one made from the name. */\nexport function agentSlugFor(name: string, slug: string): string {\n return slugify(slug.trim() === '' ? name : slug, AGENT_SLUG_MAX_LENGTH);\n}\n\n/**\n * The capabilities the builder offers (BOFF-12450). Only these change what an\n * agent does at runtime: MCP tools (when MCP servers are attached), RAG (when a\n * knowledge base is attached) and agent-to-agent delegation. The others in the\n * schema (REASONING, MULTIMODAL, MEMORY, CODE_EXECUTION, WEB_BROWSING) are not\n * read by the chat or channel runtime, so they are not offered; a value an\n * agent already carries is kept as saved, never dropped silently.\n */\nexport const OFFERED_CAPABILITIES = ['MCP_TOOLS', 'RAG', 'A2A'] as const;\nexport type OfferedCapability = (typeof OFFERED_CAPABILITIES)[number];\n\nexport type CapabilityWarning =\n 'mcpToolsNeedsServer' | 'ragNeedsKnowledgeBase' | 'serversNeedMcpTools' | 'knowledgeBasesNeedRag';\n\n/**\n * Mismatches between the ticked capabilities and what is attached. Each one\n * means something configured has no effect at runtime, which otherwise fails\n * silently.\n */\nexport function capabilityWarnings(input: {\n capabilities: readonly string[];\n mcpServerCount: number;\n knowledgeBaseCount: number;\n}): CapabilityWarning[] {\n const warnings: CapabilityWarning[] = [];\n const hasTools = input.capabilities.includes('MCP_TOOLS');\n const hasRag = input.capabilities.includes('RAG');\n if (hasTools && input.mcpServerCount === 0) warnings.push('mcpToolsNeedsServer');\n if (hasRag && input.knowledgeBaseCount === 0) warnings.push('ragNeedsKnowledgeBase');\n if (!hasTools && input.mcpServerCount > 0) warnings.push('serversNeedMcpTools');\n if (!hasRag && input.knowledgeBaseCount > 0) warnings.push('knowledgeBasesNeedRag');\n return warnings;\n}\n\n/** Which builder tab holds each form field, so a tab can show that it has a problem. */\nexport const AGENT_FIELD_TAB: Record<keyof AgentFormValues, 'basics' | 'prompt'> = {\n name: 'basics',\n slug: 'basics',\n systemPrompt: 'prompt',\n temperature: 'prompt',\n maxTokens: 'prompt',\n maxConcurrentExecutions: 'prompt',\n};\n"],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ import { KnowledgeBaseUsage } from '../hooks/useKnowledgeBases';
2
+ type Translate = (key: string, fallback: string, params?: Record<string, string | number>) => string;
3
+ /** `usage` is null when it could not be read: the dialog says so instead of claiming nothing uses it. */
4
+ export declare function knowledgeBaseDeleteMessage(t: Translate, name: string, usage: KnowledgeBaseUsage | null): string;
5
+ export {};
@@ -0,0 +1,11 @@
1
+ // src/botlit/utils/kbDelete.ts
2
+ function e(e, t, n) {
3
+ return n === null ? e("botlit.kb.delete.confirmUnknown", "Delete \"{{name}}\" and all its documents? We could not check which agents use it; deleting removes it from any that do. This cannot be undone.", { name: t }) : n.agents.length === 0 ? e("botlit.kb.delete.confirm", "Delete \"{{name}}\" and all its documents? No agent uses it. This cannot be undone.", { name: t }) : e("botlit.kb.delete.confirmUsed", "Delete \"{{name}}\" and all its documents? It is used by {{count}} agent(s): {{agents}}. Deleting removes it from them, and they will answer without it. This cannot be undone.", {
4
+ name: t,
5
+ count: n.agents.length,
6
+ agents: n.agents.map((e) => e.name).join(", ")
7
+ });
8
+ }
9
+ export { e as knowledgeBaseDeleteMessage };
10
+
11
+ //# sourceMappingURL=kbDelete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbDelete.js","names":["knowledgeBaseDeleteMessage","usage","t","agent"],"sources":["../../../src/botlit/utils/kbDelete.ts"],"sourcesContent":["/**\n * Delete confirmation for a knowledge base (BOFF-12469, BOFF-12472)\n * @module botlit/utils\n *\n * Deleting a knowledge base removes it from the agents that use it (and frees a\n * plan slot), so the confirmation names them. One wording for the list and the\n * detail page, built from translated templates with parameters.\n */\n\nimport type { KnowledgeBaseUsage } from '../hooks/useKnowledgeBases';\n\ntype Translate = (\n key: string,\n fallback: string,\n params?: Record<string, string | number>\n) => string;\n\n/** `usage` is null when it could not be read: the dialog says so instead of claiming nothing uses it. */\nexport function knowledgeBaseDeleteMessage(\n t: Translate,\n name: string,\n usage: KnowledgeBaseUsage | null\n): string {\n if (usage === null) {\n return t(\n 'botlit.kb.delete.confirmUnknown',\n 'Delete \"{{name}}\" and all its documents? We could not check which agents use it; deleting removes it from any that do. This cannot be undone.',\n { name }\n );\n }\n if (usage.agents.length === 0) {\n return t(\n 'botlit.kb.delete.confirm',\n 'Delete \"{{name}}\" and all its documents? No agent uses it. This cannot be undone.',\n { name }\n );\n }\n return t(\n 'botlit.kb.delete.confirmUsed',\n 'Delete \"{{name}}\" and all its documents? It is used by {{count}} agent(s): {{agents}}. Deleting removes it from them, and they will answer without it. This cannot be undone.',\n { name, count: usage.agents.length, agents: usage.agents.map((agent) => agent.name).join(', ') }\n );\n}\n"],"mappings":";AAkBA,SAAgBA,EACd,GACA,GACA,GACQ;CAeR,OAdIC,MAAU,OACLC,EACL,mCACA,mJACA,EAAE,QAAK,CACT,IAEED,EAAM,OAAO,WAAW,IACnBC,EACL,4BACA,uFACA,EAAE,QAAK,CACT,IAEKA,EACL,gCACA,mLACA;EAAE;EAAM,OAAOD,EAAM,OAAO;EAAQ,QAAQA,EAAM,OAAO,KAAK,MAAUE,EAAM,IAAI,CAAC,CAAC,KAAK,IAAI;CAAE,CACjG;AACF"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Knowledge base form rules (BOFF-12470, BOFF-12477)
3
+ * @module botlit/utils
4
+ *
5
+ * What valid chunk settings are, mirrored from `wspace-botmanor-svc`
6
+ * (`knowledge-bases/kb-settings.ts`), so the form and the server never disagree.
7
+ * Chunk size is counted in approximate tokens. An overlap of 0 is a real value.
8
+ */
9
+ export declare const KB_CHUNK_SIZE_RANGE: {
10
+ readonly min: 1;
11
+ readonly max: 8000;
12
+ };
13
+ export declare const KB_DEFAULT_CHUNK_SIZE = 512;
14
+ export declare const KB_DEFAULT_CHUNK_OVERLAP = 50;
15
+ export type KbFieldError = 'nameRequired' | 'modelRequired' | 'chunkSizeRange' | 'chunkOverlapInvalid' | 'chunkOverlapTooLarge';
16
+ export interface KbFormValues {
17
+ name: string;
18
+ embeddingModel: string;
19
+ chunkSize: string;
20
+ chunkOverlap: string;
21
+ }
22
+ export type KbFormErrors = Partial<Record<keyof KbFormValues, KbFieldError>>;
23
+ /** English fallbacks, keyed so callers translate through `useTr`. */
24
+ export declare const KB_FIELD_MESSAGES: Record<KbFieldError, string>;
25
+ /** `undefined` for a blank field; NaN for text that is not a number, so it can be refused. */
26
+ export declare function parseKbNumber(text: string): number | undefined;
27
+ /**
28
+ * Validates the form. On create a blank chunk field means "use the default" (the
29
+ * field shows it); on edit a blank field is an error, because "keep the previous
30
+ * value" is exactly the silent behaviour this replaces.
31
+ */
32
+ export declare function validateKbForm(values: KbFormValues, mode: 'create' | 'edit'): KbFormErrors;
33
+ /** What a knowledge base's index status means, so a badge is never the whole explanation. */
34
+ export declare function indexStatusHelp(status: string): {
35
+ key: string;
36
+ fallback: string;
37
+ };
38
+ /** Index statuses that mean work is still running, so the page keeps refreshing. */
39
+ export declare function isIndexBusy(status: string | null | undefined): boolean;
40
+ /** Document statuses that mean the document is still being processed. */
41
+ export declare function isDocumentBusy(status: string | null | undefined): boolean;
@@ -0,0 +1,60 @@
1
+ // src/botlit/utils/kbSettings.ts
2
+ var e = {
3
+ min: 1,
4
+ max: 8e3
5
+ }, t = {
6
+ nameRequired: "Enter a name for the knowledge base.",
7
+ modelRequired: "Choose an embedding model.",
8
+ chunkSizeRange: `Chunk size must be a whole number from ${e.min} to ${e.max}.`,
9
+ chunkOverlapInvalid: "Chunk overlap must be a whole number, 0 or more.",
10
+ chunkOverlapTooLarge: "Chunk overlap must be smaller than the chunk size."
11
+ };
12
+ function n(e) {
13
+ let t = e.trim();
14
+ return t === "" ? void 0 : Number(t);
15
+ }
16
+ function r(t, r) {
17
+ let i = {};
18
+ t.name.trim() === "" && (i.name = "nameRequired"), r === "create" && t.embeddingModel === "" && (i.embeddingModel = "modelRequired");
19
+ let a = n(t.chunkSize), o = n(t.chunkOverlap), s = r === "create", c = a ?? 512;
20
+ return (a === void 0 && !s || !Number.isInteger(c) || c < e.min || c > e.max) && (i.chunkSize = "chunkSizeRange"), o === void 0 ? s || (i.chunkOverlap = "chunkOverlapInvalid") : !Number.isInteger(o) || o < 0 ? i.chunkOverlap = "chunkOverlapInvalid" : !i.chunkSize && o >= c && (i.chunkOverlap = "chunkOverlapTooLarge"), i;
21
+ }
22
+ function i(e) {
23
+ switch (e.toUpperCase()) {
24
+ case "READY": return {
25
+ key: "ready",
26
+ fallback: "Ready to search. Agents can answer from it."
27
+ };
28
+ case "EMPTY": return {
29
+ key: "empty",
30
+ fallback: "No documents are indexed yet. Agents cannot answer from it until there are."
31
+ };
32
+ case "INDEXING": return {
33
+ key: "indexing",
34
+ fallback: "Documents are being indexed. Agents cannot answer from it until this finishes."
35
+ };
36
+ case "REBUILDING": return {
37
+ key: "rebuilding",
38
+ fallback: "The index is being rebuilt. Agents cannot answer from it until this finishes."
39
+ };
40
+ case "FAILED": return {
41
+ key: "failed",
42
+ fallback: "Indexing failed. Rebuild the index or remove the document that failed."
43
+ };
44
+ default: return {
45
+ key: "unknown",
46
+ fallback: "Status unknown."
47
+ };
48
+ }
49
+ }
50
+ function a(e) {
51
+ let t = (e ?? "").toUpperCase();
52
+ return t === "INDEXING" || t === "REBUILDING";
53
+ }
54
+ function o(e) {
55
+ let t = (e ?? "").toUpperCase();
56
+ return t === "PENDING" || t === "PROCESSING" || t === "INDEXING";
57
+ }
58
+ export { e as KB_CHUNK_SIZE_RANGE, t as KB_FIELD_MESSAGES, i as indexStatusHelp, o as isDocumentBusy, a as isIndexBusy, n as parseKbNumber, r as validateKbForm };
59
+
60
+ //# sourceMappingURL=kbSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kbSettings.js","names":["KB_CHUNK_SIZE_RANGE","KB_FIELD_MESSAGES","parseKbNumber","trimmed","text","validateKbForm","errors","values","mode","givenSize","givenOverlap","blankOk","size","indexStatusHelp","status","isIndexBusy","value","isDocumentBusy"],"sources":["../../../src/botlit/utils/kbSettings.ts"],"sourcesContent":["/**\n * Knowledge base form rules (BOFF-12470, BOFF-12477)\n * @module botlit/utils\n *\n * What valid chunk settings are, mirrored from `wspace-botmanor-svc`\n * (`knowledge-bases/kb-settings.ts`), so the form and the server never disagree.\n * Chunk size is counted in approximate tokens. An overlap of 0 is a real value.\n */\n\nexport const KB_CHUNK_SIZE_RANGE = { min: 1, max: 8000 } as const;\nexport const KB_DEFAULT_CHUNK_SIZE = 512;\nexport const KB_DEFAULT_CHUNK_OVERLAP = 50;\n\nexport type KbFieldError =\n | 'nameRequired'\n | 'modelRequired'\n | 'chunkSizeRange'\n | 'chunkOverlapInvalid'\n | 'chunkOverlapTooLarge';\n\nexport interface KbFormValues {\n name: string;\n embeddingModel: string;\n chunkSize: string;\n chunkOverlap: string;\n}\n\nexport type KbFormErrors = Partial<Record<keyof KbFormValues, KbFieldError>>;\n\n/** English fallbacks, keyed so callers translate through `useTr`. */\nexport const KB_FIELD_MESSAGES: Record<KbFieldError, string> = {\n nameRequired: 'Enter a name for the knowledge base.',\n modelRequired: 'Choose an embedding model.',\n chunkSizeRange: `Chunk size must be a whole number from ${KB_CHUNK_SIZE_RANGE.min} to ${KB_CHUNK_SIZE_RANGE.max}.`,\n chunkOverlapInvalid: 'Chunk overlap must be a whole number, 0 or more.',\n chunkOverlapTooLarge: 'Chunk overlap must be smaller than the chunk size.',\n};\n\n/** `undefined` for a blank field; NaN for text that is not a number, so it can be refused. */\nexport function parseKbNumber(text: string): number | undefined {\n const trimmed = text.trim();\n return trimmed === '' ? undefined : Number(trimmed);\n}\n\n/**\n * Validates the form. On create a blank chunk field means \"use the default\" (the\n * field shows it); on edit a blank field is an error, because \"keep the previous\n * value\" is exactly the silent behaviour this replaces.\n */\nexport function validateKbForm(values: KbFormValues, mode: 'create' | 'edit'): KbFormErrors {\n const errors: KbFormErrors = {};\n if (values.name.trim() === '') errors.name = 'nameRequired';\n if (mode === 'create' && values.embeddingModel === '') errors.embeddingModel = 'modelRequired';\n\n const givenSize = parseKbNumber(values.chunkSize);\n const givenOverlap = parseKbNumber(values.chunkOverlap);\n const blankOk = mode === 'create';\n\n // A blank size on create is the default one.\n const size = givenSize ?? KB_DEFAULT_CHUNK_SIZE;\n if (\n (givenSize === undefined && !blankOk) ||\n !Number.isInteger(size) ||\n size < KB_CHUNK_SIZE_RANGE.min ||\n size > KB_CHUNK_SIZE_RANGE.max\n ) {\n errors.chunkSize = 'chunkSizeRange';\n }\n\n if (givenOverlap === undefined) {\n if (!blankOk) errors.chunkOverlap = 'chunkOverlapInvalid';\n } else if (!Number.isInteger(givenOverlap) || givenOverlap < 0) {\n errors.chunkOverlap = 'chunkOverlapInvalid';\n } else if (!errors.chunkSize && givenOverlap >= size) {\n errors.chunkOverlap = 'chunkOverlapTooLarge';\n }\n return errors;\n}\n\n/** What a knowledge base's index status means, so a badge is never the whole explanation. */\nexport function indexStatusHelp(status: string): { key: string; fallback: string } {\n switch (status.toUpperCase()) {\n case 'READY':\n return { key: 'ready', fallback: 'Ready to search. Agents can answer from it.' };\n case 'EMPTY':\n return {\n key: 'empty',\n fallback: 'No documents are indexed yet. Agents cannot answer from it until there are.',\n };\n case 'INDEXING':\n return {\n key: 'indexing',\n fallback: 'Documents are being indexed. Agents cannot answer from it until this finishes.',\n };\n case 'REBUILDING':\n return {\n key: 'rebuilding',\n fallback: 'The index is being rebuilt. Agents cannot answer from it until this finishes.',\n };\n case 'FAILED':\n return {\n key: 'failed',\n fallback: 'Indexing failed. Rebuild the index or remove the document that failed.',\n };\n default:\n return { key: 'unknown', fallback: 'Status unknown.' };\n }\n}\n\n/** Index statuses that mean work is still running, so the page keeps refreshing. */\nexport function isIndexBusy(status: string | null | undefined): boolean {\n const value = (status ?? '').toUpperCase();\n return value === 'INDEXING' || value === 'REBUILDING';\n}\n\n/** Document statuses that mean the document is still being processed. */\nexport function isDocumentBusy(status: string | null | undefined): boolean {\n const value = (status ?? '').toUpperCase();\n return value === 'PENDING' || value === 'PROCESSING' || value === 'INDEXING';\n}\n"],"mappings":";AASA,IAAaA,IAAsB;CAAE,KAAK;CAAG,KAAK;AAAK,GAqB1CC,IAAkD;CAC7D,cAAc;CACd,eAAe;CACf,gBAAgB,0CAA0CD,EAAoB,IAAI,MAAMA,EAAoB,IAAI;CAChH,qBAAqB;CACrB,sBAAsB;AACxB;AAGA,SAAgBE,EAAc,GAAkC;CAC9D,IAAMC,IAAUC,EAAK,KAAK;CAC1B,OAAOD,MAAY,KAAK,KAAA,IAAY,OAAOA,CAAO;AACpD;AAOA,SAAgBE,EAAe,GAAsB,GAAuC;CAC1F,IAAMC,IAAuB,CAAC;CAE9B,AADIC,EAAO,KAAK,KAAK,MAAM,OAAI,EAAO,OAAO,iBACzCC,MAAS,YAAYD,EAAO,mBAAmB,OAAI,EAAO,iBAAiB;CAE/E,IAAME,IAAYP,EAAcK,EAAO,SAAS,GAC1CG,IAAeR,EAAcK,EAAO,YAAY,GAChDI,IAAUH,MAAS,UAGnBI,IAAOH,KAAA;CAiBb,QAfGA,MAAc,KAAA,KAAa,CAACE,KAC7B,CAAC,OAAO,UAAUC,CAAI,KACtBA,IAAOZ,EAAoB,OAC3BY,IAAOZ,EAAoB,SAE3B,EAAO,YAAY,mBAGjBU,MAAiB,KAAA,IACdC,MAAS,EAAO,eAAe,yBAC3B,CAAC,OAAO,UAAUD,CAAY,KAAKA,IAAe,IAC3D,EAAO,eAAe,wBACb,CAACJ,EAAO,aAAaI,KAAgBE,MAC9C,EAAO,eAAe,yBAEjBN;AACT;AAGA,SAAgBO,EAAgB,GAAmD;CACjF,QAAQC,EAAO,YAAY,GAA3B;EACE,KAAK,SACH,OAAO;GAAE,KAAK;GAAS,UAAU;EAA8C;EACjF,KAAK,SACH,OAAO;GACL,KAAK;GACL,UAAU;EACZ;EACF,KAAK,YACH,OAAO;GACL,KAAK;GACL,UAAU;EACZ;EACF,KAAK,cACH,OAAO;GACL,KAAK;GACL,UAAU;EACZ;EACF,KAAK,UACH,OAAO;GACL,KAAK;GACL,UAAU;EACZ;EACF,SACE,OAAO;GAAE,KAAK;GAAW,UAAU;EAAkB;CACzD;AACF;AAGA,SAAgBC,EAAY,GAA4C;CACtE,IAAMC,KAASF,KAAU,GAAA,CAAI,YAAY;CACzC,OAAOE,MAAU,cAAcA,MAAU;AAC3C;AAGA,SAAgBC,EAAe,GAA4C;CACzE,IAAMD,KAASF,KAAU,GAAA,CAAI,YAAY;CACzC,OAAOE,MAAU,aAAaA,MAAU,gBAAgBA,MAAU;AACpE"}
@@ -206,6 +206,8 @@ export type CreateBotAppInput = {
206
206
  workspaceId: string | number;
207
207
  };
208
208
  export type CreateBotmanorAgentInput = {
209
+ /** Emoji shown for the agent (up to 32 characters). An empty string clears it. */
210
+ avatar?: string | null | undefined;
209
211
  bucketId?: string | number | null | undefined;
210
212
  capabilities?: Array<BotmanorAgentCapability> | null | undefined;
211
213
  context?: ContextInput | null | undefined;
@@ -594,6 +596,8 @@ export type UpdateBotAppInput = {
594
596
  workflowId?: string | number | null | undefined;
595
597
  };
596
598
  export type UpdateBotmanorAgentInput = {
599
+ /** Emoji shown for the agent (up to 32 characters). An empty string clears it. */
600
+ avatar?: string | null | undefined;
597
601
  bucketId?: string | number | null | undefined;
598
602
  capabilities?: Array<BotmanorAgentCapability> | null | undefined;
599
603
  context?: ContextInput | null | undefined;
@@ -1934,6 +1938,24 @@ export type RebuildKnowledgeBaseIndexMutationVariables = Exact<{
1934
1938
  export type RebuildKnowledgeBaseIndexMutation = {
1935
1939
  rebuildKnowledgeBaseIndex: boolean;
1936
1940
  };
1941
+ export type RemoveKnowledgeDocumentMutationVariables = Exact<{
1942
+ id: string | number;
1943
+ }>;
1944
+ export type RemoveKnowledgeDocumentMutation = {
1945
+ removeKnowledgeDocument: boolean;
1946
+ };
1947
+ export type GetKnowledgeBaseUsageQueryVariables = Exact<{
1948
+ id: string | number;
1949
+ }>;
1950
+ export type GetKnowledgeBaseUsageQuery = {
1951
+ getKnowledgeBaseUsage: {
1952
+ agents: Array<{
1953
+ id: string;
1954
+ name: string;
1955
+ status: string;
1956
+ }>;
1957
+ };
1958
+ };
1937
1959
  export type ListBotmanorLlmProvidersQueryVariables = Exact<{
1938
1960
  filters?: Types.BotmanorLlmProviderFilterInput | null | undefined;
1939
1961
  pagination?: Types.PaginationInput | null | undefined;
@@ -4616,6 +4638,59 @@ export declare function useRebuildKnowledgeBaseIndexMutation(baseOptions?: Apoll
4616
4638
  export type RebuildKnowledgeBaseIndexMutationHookResult = ReturnType<typeof useRebuildKnowledgeBaseIndexMutation>;
4617
4639
  export type RebuildKnowledgeBaseIndexMutationResult = Apollo.MutationResult<Types.RebuildKnowledgeBaseIndexMutation>;
4618
4640
  export type RebuildKnowledgeBaseIndexMutationOptions = Apollo.BaseMutationOptions<Types.RebuildKnowledgeBaseIndexMutation, Types.RebuildKnowledgeBaseIndexMutationVariables>;
4641
+ export declare const RemoveKnowledgeDocumentDocument: Apollo.DocumentNode;
4642
+ export type RemoveKnowledgeDocumentMutationFn = Apollo.MutationFunction<Types.RemoveKnowledgeDocumentMutation, Types.RemoveKnowledgeDocumentMutationVariables>;
4643
+ /**
4644
+ * __useRemoveKnowledgeDocumentMutation__
4645
+ *
4646
+ * To run a mutation, you first call `useRemoveKnowledgeDocumentMutation` within a React component and pass it any options that fit your needs.
4647
+ * When your component renders, `useRemoveKnowledgeDocumentMutation` returns a tuple that includes:
4648
+ * - A mutate function that you can call at any time to execute the mutation
4649
+ * - An object with fields that represent the current status of the mutation's execution
4650
+ *
4651
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
4652
+ *
4653
+ * @example
4654
+ * const [removeKnowledgeDocumentMutation, { data, loading, error }] = useRemoveKnowledgeDocumentMutation({
4655
+ * variables: {
4656
+ * id: // value for 'id'
4657
+ * },
4658
+ * });
4659
+ */
4660
+ export declare function useRemoveKnowledgeDocumentMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<Types.RemoveKnowledgeDocumentMutation, Types.RemoveKnowledgeDocumentMutationVariables>): ApolloReactHooks.useMutation.ResultTuple<Types.RemoveKnowledgeDocumentMutation, any, Apollo.ApolloCache, undefined>;
4661
+ export type RemoveKnowledgeDocumentMutationHookResult = ReturnType<typeof useRemoveKnowledgeDocumentMutation>;
4662
+ export type RemoveKnowledgeDocumentMutationResult = Apollo.MutationResult<Types.RemoveKnowledgeDocumentMutation>;
4663
+ export type RemoveKnowledgeDocumentMutationOptions = Apollo.BaseMutationOptions<Types.RemoveKnowledgeDocumentMutation, Types.RemoveKnowledgeDocumentMutationVariables>;
4664
+ export declare const GetKnowledgeBaseUsageDocument: Apollo.DocumentNode;
4665
+ /**
4666
+ * __useGetKnowledgeBaseUsageQuery__
4667
+ *
4668
+ * To run a query within a React component, call `useGetKnowledgeBaseUsageQuery` and pass it any options that fit your needs.
4669
+ * When your component renders, `useGetKnowledgeBaseUsageQuery` returns an object from Apollo Client that contains loading, error, and data properties
4670
+ * you can use to render your UI.
4671
+ *
4672
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
4673
+ *
4674
+ * @example
4675
+ * const { data, loading, error } = useGetKnowledgeBaseUsageQuery({
4676
+ * variables: {
4677
+ * id: // value for 'id'
4678
+ * },
4679
+ * });
4680
+ */
4681
+ export declare function useGetKnowledgeBaseUsageQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables> & ({
4682
+ variables: Types.GetKnowledgeBaseUsageQueryVariables;
4683
+ skip?: boolean;
4684
+ } | {
4685
+ skip: boolean;
4686
+ })): ApolloReactHooks.useQuery.Result<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables, "empty" | "complete" | "streaming", Types.GetKnowledgeBaseUsageQueryVariables, undefined>;
4687
+ export declare function useGetKnowledgeBaseUsageLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables>): ApolloReactHooks.useLazyQuery.ResultTuple<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables, "empty" | "complete" | "streaming", undefined>;
4688
+ export declare function useGetKnowledgeBaseUsageSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables>;
4689
+ export declare function useGetKnowledgeBaseUsageSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetKnowledgeBaseUsageQuery | undefined, Types.GetKnowledgeBaseUsageQueryVariables>;
4690
+ export type GetKnowledgeBaseUsageQueryHookResult = ReturnType<typeof useGetKnowledgeBaseUsageQuery>;
4691
+ export type GetKnowledgeBaseUsageLazyQueryHookResult = ReturnType<typeof useGetKnowledgeBaseUsageLazyQuery>;
4692
+ export type GetKnowledgeBaseUsageSuspenseQueryHookResult = ReturnType<typeof useGetKnowledgeBaseUsageSuspenseQuery>;
4693
+ export type GetKnowledgeBaseUsageQueryResult = Apollo.QueryResult<Types.GetKnowledgeBaseUsageQuery, Types.GetKnowledgeBaseUsageQueryVariables>;
4619
4694
  export declare const ListBotmanorLlmProvidersDocument: Apollo.DocumentNode;
4620
4695
  /**
4621
4696
  * __useListBotmanorLlmProvidersQuery__