@botonic/core 0.45.0-alpha.0 → 0.45.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.
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export interface BaseMessage {
|
|
2
|
-
type: 'text' | 'textWithButtons' | 'carousel' | 'exit';
|
|
2
|
+
type: 'text' | 'textWithButtons' | 'botExecutor' | 'carousel' | 'exit';
|
|
3
3
|
}
|
|
4
4
|
export interface Button {
|
|
5
5
|
text: string;
|
|
6
6
|
payload?: string;
|
|
7
7
|
url?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface ButtonWithPayload {
|
|
10
|
+
text: string;
|
|
11
|
+
payload: string;
|
|
12
|
+
}
|
|
9
13
|
export interface TextMessage extends BaseMessage {
|
|
10
14
|
type: 'text';
|
|
11
15
|
content: {
|
|
@@ -19,6 +23,13 @@ export interface TextWithButtonsMessage extends BaseMessage {
|
|
|
19
23
|
buttons: Button[];
|
|
20
24
|
};
|
|
21
25
|
}
|
|
26
|
+
export interface BotExecutorMessage extends BaseMessage {
|
|
27
|
+
type: 'botExecutor';
|
|
28
|
+
content: {
|
|
29
|
+
text: string;
|
|
30
|
+
buttons: ButtonWithPayload[];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
22
33
|
interface CarouselElement {
|
|
23
34
|
title: string;
|
|
24
35
|
subtitle: string;
|
|
@@ -35,11 +46,12 @@ export interface CarouselMessage extends BaseMessage {
|
|
|
35
46
|
export interface ExitMessage extends BaseMessage {
|
|
36
47
|
type: 'exit';
|
|
37
48
|
}
|
|
38
|
-
export type OutputMessage = TextMessage | TextWithButtonsMessage | CarouselMessage | ExitMessage;
|
|
49
|
+
export type OutputMessage = TextMessage | TextWithButtonsMessage | BotExecutorMessage | CarouselMessage | ExitMessage;
|
|
39
50
|
export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>;
|
|
40
51
|
export interface ToolExecution {
|
|
41
52
|
toolName: string;
|
|
42
53
|
toolArguments: Record<string, any>;
|
|
54
|
+
toolResults?: string;
|
|
43
55
|
knowledgebaseSourcesIds?: string[];
|
|
44
56
|
knowledgebaseChunksIds?: string[];
|
|
45
57
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export interface BaseMessage {
|
|
2
|
-
type: 'text' | 'textWithButtons' | 'carousel' | 'exit';
|
|
2
|
+
type: 'text' | 'textWithButtons' | 'botExecutor' | 'carousel' | 'exit';
|
|
3
3
|
}
|
|
4
4
|
export interface Button {
|
|
5
5
|
text: string;
|
|
6
6
|
payload?: string;
|
|
7
7
|
url?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface ButtonWithPayload {
|
|
10
|
+
text: string;
|
|
11
|
+
payload: string;
|
|
12
|
+
}
|
|
9
13
|
export interface TextMessage extends BaseMessage {
|
|
10
14
|
type: 'text';
|
|
11
15
|
content: {
|
|
@@ -19,6 +23,13 @@ export interface TextWithButtonsMessage extends BaseMessage {
|
|
|
19
23
|
buttons: Button[];
|
|
20
24
|
};
|
|
21
25
|
}
|
|
26
|
+
export interface BotExecutorMessage extends BaseMessage {
|
|
27
|
+
type: 'botExecutor';
|
|
28
|
+
content: {
|
|
29
|
+
text: string;
|
|
30
|
+
buttons: ButtonWithPayload[];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
22
33
|
interface CarouselElement {
|
|
23
34
|
title: string;
|
|
24
35
|
subtitle: string;
|
|
@@ -35,11 +46,12 @@ export interface CarouselMessage extends BaseMessage {
|
|
|
35
46
|
export interface ExitMessage extends BaseMessage {
|
|
36
47
|
type: 'exit';
|
|
37
48
|
}
|
|
38
|
-
export type OutputMessage = TextMessage | TextWithButtonsMessage | CarouselMessage | ExitMessage;
|
|
49
|
+
export type OutputMessage = TextMessage | TextWithButtonsMessage | BotExecutorMessage | CarouselMessage | ExitMessage;
|
|
39
50
|
export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>;
|
|
40
51
|
export interface ToolExecution {
|
|
41
52
|
toolName: string;
|
|
42
53
|
toolArguments: Record<string, any>;
|
|
54
|
+
toolResults?: string;
|
|
43
55
|
knowledgebaseSourcesIds?: string[];
|
|
44
56
|
knowledgebaseChunksIds?: string[];
|
|
45
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/core",
|
|
3
|
-
"version": "0.45.0
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Build Chatbots using React",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
34
|
-
"axios": "^1.13.
|
|
34
|
+
"axios": "^1.13.6",
|
|
35
35
|
"pako": "^2.1.0",
|
|
36
36
|
"process": "^0.11.10",
|
|
37
37
|
"pusher-js": "^5.1.1"
|
package/src/models/ai-agents.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface BaseMessage {
|
|
2
|
-
type: 'text' | 'textWithButtons' | 'carousel' | 'exit'
|
|
2
|
+
type: 'text' | 'textWithButtons' | 'botExecutor' | 'carousel' | 'exit'
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
export interface Button {
|
|
@@ -7,6 +7,10 @@ export interface Button {
|
|
|
7
7
|
payload?: string
|
|
8
8
|
url?: string
|
|
9
9
|
}
|
|
10
|
+
export interface ButtonWithPayload {
|
|
11
|
+
text: string
|
|
12
|
+
payload: string
|
|
13
|
+
}
|
|
10
14
|
|
|
11
15
|
export interface TextMessage extends BaseMessage {
|
|
12
16
|
type: 'text'
|
|
@@ -23,6 +27,14 @@ export interface TextWithButtonsMessage extends BaseMessage {
|
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
29
|
|
|
30
|
+
export interface BotExecutorMessage extends BaseMessage {
|
|
31
|
+
type: 'botExecutor'
|
|
32
|
+
content: {
|
|
33
|
+
text: string
|
|
34
|
+
buttons: ButtonWithPayload[]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
interface CarouselElement {
|
|
27
39
|
title: string
|
|
28
40
|
subtitle: string
|
|
@@ -45,6 +57,7 @@ export interface ExitMessage extends BaseMessage {
|
|
|
45
57
|
export type OutputMessage =
|
|
46
58
|
| TextMessage
|
|
47
59
|
| TextWithButtonsMessage
|
|
60
|
+
| BotExecutorMessage
|
|
48
61
|
| CarouselMessage
|
|
49
62
|
| ExitMessage
|
|
50
63
|
|
|
@@ -53,6 +66,7 @@ export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>
|
|
|
53
66
|
export interface ToolExecution {
|
|
54
67
|
toolName: string
|
|
55
68
|
toolArguments: Record<string, any>
|
|
69
|
+
toolResults?: string
|
|
56
70
|
knowledgebaseSourcesIds?: string[]
|
|
57
71
|
knowledgebaseChunksIds?: string[]
|
|
58
72
|
}
|