@burdenoff/microfe-botmanor 2026.1109.1 → 2026.1109.2

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
@@ -4,10 +4,9 @@ import { useBotlitStore as r } from "./botlit/store/botlitStore.js";
4
4
  import { useBot as i, useBots as a, useCreateBot as o, useDeleteBot as s, useUpdateBot as c } from "./botlit/hooks/useBots.js";
5
5
  import { useAgent as l, useAgents as u, useCreateAgent as d, useDeleteAgent as f, useUpdateAgent as p } from "./botlit/hooks/useAgents.js";
6
6
  import { useCreateKnowledgeBase as m, useKnowledgeBase as h, useKnowledgeBases as g, useKnowledgeDocuments as _ } from "./botlit/hooks/useKnowledgeBases.js";
7
- import { useConversation as v, useConversations as y, useSendMessage as b } from "./botlit/hooks/useConversations.js";
8
- import { useConfigureLLMProvider as x, useLLMProviders as S } from "./botlit/hooks/useLLMProviders.js";
9
- import { useCreateMCPServer as C, useMCPServers as w } from "./botlit/hooks/useMCPServers.js";
10
- import { cn as T } from "./botlit/utils/cn.js";
11
- import { formatDate as E, formatRelativeTime as D } from "./botlit/utils/formatters.js";
7
+ import { useConfigureLLMProvider as v, useLLMProviders as y } from "./botlit/hooks/useLLMProviders.js";
8
+ import { useCreateMCPServer as b, useMCPServers as x } from "./botlit/hooks/useMCPServers.js";
9
+ import { cn as S } from "./botlit/utils/cn.js";
10
+ import { formatDate as C, formatRelativeTime as w } from "./botlit/utils/formatters.js";
12
11
  import "./botlit/index.js";
13
- export { t as BotlitProvider, e as BotmanorRoot, T as cn, E as formatDate, D as formatRelativeTime, l as useAgent, u as useAgents, i as useBot, n as useBotlit, r as useBotlitStore, a as useBots, x as useConfigureLLMProvider, v as useConversation, y as useConversations, d as useCreateAgent, o as useCreateBot, m as useCreateKnowledgeBase, C as useCreateMCPServer, f as useDeleteAgent, s as useDeleteBot, h as useKnowledgeBase, g as useKnowledgeBases, _ as useKnowledgeDocuments, S as useLLMProviders, w as useMCPServers, b as useSendMessage, p as useUpdateAgent, c as useUpdateBot };
12
+ export { t as BotlitProvider, e as BotmanorRoot, S as cn, C as formatDate, w as formatRelativeTime, l as useAgent, u as useAgents, i as useBot, n as useBotlit, r as useBotlitStore, a as useBots, v as useConfigureLLMProvider, d as useCreateAgent, o as useCreateBot, m as useCreateKnowledgeBase, b as useCreateMCPServer, f as useDeleteAgent, s as useDeleteBot, h as useKnowledgeBase, g as useKnowledgeBases, _ as useKnowledgeDocuments, y as useLLMProviders, x as useMCPServers, p as useUpdateAgent, c as useUpdateBot };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-botmanor",
3
- "version": "2026.1109.1",
3
+ "version": "2026.1109.2",
4
4
  "description": "Burdenoff BotManor Microfrontend - AI Agent platform interface for building, deploying and managing AI agents",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,42 +0,0 @@
1
- interface ChatResponse {
2
- executionId: string;
3
- message: string;
4
- tokensUsed?: number | null;
5
- model?: string | null;
6
- conversationId?: string | null;
7
- }
8
- export declare const conversationKeys: {
9
- all: readonly ["conversations"];
10
- lists: () => readonly ["conversations", "list"];
11
- list: (filter?: Record<string, unknown>) => readonly ["conversations", "list", Record<string, unknown> | undefined];
12
- details: () => readonly ["conversations", "detail"];
13
- detail: (id: string) => readonly ["conversations", "detail", string];
14
- };
15
- export interface ConversationSummary {
16
- id: string;
17
- title: string;
18
- status: string;
19
- agentId?: string | null;
20
- messages: unknown[];
21
- updatedAt: string;
22
- }
23
- export declare function useConversations(_filter?: Record<string, unknown>): {
24
- data: ConversationSummary[];
25
- loading: boolean;
26
- error: undefined;
27
- };
28
- export declare function useConversation(_conversationId: string | undefined): {
29
- data: null;
30
- loading: boolean;
31
- error: undefined;
32
- };
33
- export declare function useSendMessage(): {
34
- sendMessage: (input: {
35
- conversationId?: string;
36
- agentId: string;
37
- content: string;
38
- }) => Promise<ChatResponse>;
39
- isSending: boolean;
40
- error: Error | null;
41
- };
42
- export {};
@@ -1,63 +0,0 @@
1
- import { useCallback as e, useState as t } from "react";
2
- import { gql as n } from "@apollo/client";
3
- import { useGatewayClient as r } from "@burdenoff/fe-libs/shared/graphql";
4
- // src/botlit/hooks/useConversations.ts
5
- var i = n`
6
- mutation ChatWithAgent($input: ChatWithAgentInput!) {
7
- chatWithAgent(input: $input) {
8
- executionId
9
- message
10
- tokensUsed
11
- model
12
- conversationId
13
- }
14
- }
15
- `;
16
- function a(e) {
17
- return e;
18
- }
19
- var o = [];
20
- function s(e) {
21
- return {
22
- data: o,
23
- loading: !1,
24
- error: void 0
25
- };
26
- }
27
- function c(e) {
28
- return {
29
- data: null,
30
- loading: !1,
31
- error: void 0
32
- };
33
- }
34
- function l() {
35
- let n = a(r("workspace")), [o, s] = t(!1), [c, l] = t(null);
36
- return {
37
- sendMessage: e(async (e) => {
38
- s(!0), l(null);
39
- try {
40
- let t = (await n.mutate({
41
- mutation: i,
42
- variables: { input: {
43
- conversationId: e.conversationId ?? null,
44
- agentId: e.agentId,
45
- message: e.content
46
- } }
47
- })).data?.chatWithAgent;
48
- if (!t) throw Error("Failed to send message");
49
- return t;
50
- } catch (e) {
51
- let t = e instanceof Error ? e : /* @__PURE__ */ Error("Failed to send message");
52
- throw l(t), t;
53
- } finally {
54
- s(!1);
55
- }
56
- }, [n]),
57
- isSending: o,
58
- error: c
59
- };
60
- }
61
- export { c as useConversation, s as useConversations, l as useSendMessage };
62
-
63
- //# sourceMappingURL=useConversations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useConversations.js","names":["CHAT_WITH_AGENT_DOCUMENT","getWorkspaceClient","client","NO_CONVERSATIONS","useConversations","useConversation","useSendMessage","useGatewayClient","isSending","setIsSending","useState","error","setError","useCallback","response","input","mutationError","nextError"],"sources":["../../../src/botlit/hooks/useConversations.ts"],"sourcesContent":["import { gql, type ApolloClient } from '@apollo/client';\nimport { useCallback, useState } from 'react';\nimport { useGatewayClient } from '@burdenoff/fe-libs/shared/graphql';\n\nconst CHAT_WITH_AGENT_DOCUMENT = gql`\n mutation ChatWithAgent($input: ChatWithAgentInput!) {\n chatWithAgent(input: $input) {\n executionId\n message\n tokensUsed\n model\n conversationId\n }\n }\n`;\n\ntype WorkspaceClient = ApolloClient;\n\ninterface ChatResponse {\n executionId: string;\n message: string;\n tokensUsed?: number | null;\n model?: string | null;\n conversationId?: string | null;\n}\n\ninterface ChatWithAgentData {\n chatWithAgent: ChatResponse;\n}\n\nfunction getWorkspaceClient(client: unknown): WorkspaceClient {\n return client as WorkspaceClient;\n}\n\nexport const conversationKeys = {\n all: ['conversations'] as const,\n lists: () => [...conversationKeys.all, 'list'] as const,\n list: (filter?: Record<string, unknown>) => [...conversationKeys.lists(), filter] as const,\n details: () => [...conversationKeys.all, 'detail'] as const,\n detail: (id: string) => [...conversationKeys.details(), id] as const,\n};\n\n/**\n * Conversations moved to `microfe-conversations`; the BotManor routes redirect\n * there. These stubs keep the (unrouted) legacy pages compiling without\n * pretending to fetch anything.\n */\nconst NO_CONVERSATIONS: ConversationSummary[] = [];\n\nexport interface ConversationSummary {\n id: string;\n title: string;\n status: string;\n agentId?: string | null;\n messages: unknown[];\n updatedAt: string;\n}\n\nexport function useConversations(_filter?: Record<string, unknown>) {\n return { data: NO_CONVERSATIONS, loading: false, error: undefined };\n}\n\nexport function useConversation(_conversationId: string | undefined) {\n return { data: null, loading: false, error: undefined };\n}\n\nexport function useSendMessage() {\n const client = getWorkspaceClient(useGatewayClient('workspace'));\n const [isSending, setIsSending] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const sendMessage = useCallback(\n async (input: { conversationId?: string; agentId: string; content: string }) => {\n setIsSending(true);\n setError(null);\n try {\n const result = await client.mutate<ChatWithAgentData>({\n mutation: CHAT_WITH_AGENT_DOCUMENT,\n variables: {\n input: {\n conversationId: input.conversationId ?? null,\n agentId: input.agentId,\n message: input.content,\n },\n },\n });\n\n const response = result.data?.chatWithAgent;\n if (!response) {\n throw new Error('Failed to send message');\n }\n\n return response;\n } catch (mutationError) {\n const nextError =\n mutationError instanceof Error ? mutationError : new Error('Failed to send message');\n setError(nextError);\n throw nextError;\n } finally {\n setIsSending(false);\n }\n },\n [client]\n );\n\n return {\n sendMessage,\n isSending,\n error,\n };\n}\n"],"mappings":";;;;AAIA,IAAMA,IAA2B,CAAG;;;;;;;;;;;AA0BpC,SAASC,EAAmB,GAAkC;CAC5D,OAAOC;AACT;AAeA,IAAMC,IAA0C,CAAC;AAWjD,SAAgBC,EAAiB,GAAmC;CAClE,OAAO;EAAE,MAAMD;EAAkB,SAAS;EAAO,OAAO,KAAA;CAAU;AACpE;AAEA,SAAgBE,EAAgB,GAAqC;CACnE,OAAO;EAAE,MAAM;EAAM,SAAS;EAAO,OAAO,KAAA;CAAU;AACxD;AAEA,SAAgBC,IAAiB;CAC/B,IAAMJ,IAASD,EAAmBM,EAAiB,WAAW,CAAC,GACzD,CAACC,GAAWC,KAAgBC,EAAS,EAAK,GAC1C,CAACC,GAAOC,KAAYF,EAAuB,IAAI;CAoCrD,OAAO;EACL,aAnCkBG,EAClB,OAAO,MAAyE;GAE9E,AADAJ,EAAa,EAAI,GACjBG,EAAS,IAAI;GACb,IAAI;IAYF,IAAME,KAAW,MAXIZ,EAAO,OAA0B;KACpD,UAAUF;KACV,WAAW,EACT,OAAO;MACL,gBAAgBe,EAAM,kBAAkB;MACxC,SAASA,EAAM;MACf,SAASA,EAAM;KACjB,EACF;IACF,CAAC,EAAA,CAEuB,MAAM;IAC9B,IAAI,CAACD,GACH,MAAU,MAAM,wBAAwB;IAG1C,OAAOA;GACT,SAASE,GAAe;IACtB,IAAMC,IACJD,aAAyB,QAAQA,IAAgB,gBAAI,MAAM,wBAAwB;IAErF,MADAJ,EAASK,CAAS,GACZA;GACR,UAAU;IACR,EAAa,EAAK;GACpB;EACF,GACA,CAACf,CAAM,CAIP;EACA;EACA;CACF;AACF"}
@@ -1,2 +0,0 @@
1
- import { FC } from 'react';
2
- export declare const ConversationDetailPage: FC;
@@ -1,2 +0,0 @@
1
- import { FC } from 'react';
2
- export declare const ConversationsPage: FC;