@botonic/core 0.39.0 → 0.40.0-alpha.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.
@@ -37,9 +37,11 @@ export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>;
37
37
  export interface RunResult {
38
38
  messages: AgenticOutputMessage[];
39
39
  toolsExecuted: string[];
40
+ memoryLength: number;
40
41
  exit: boolean;
41
- inputGuardrailTriggered: string[];
42
- outputGuardrailTriggered: string[];
42
+ error: boolean;
43
+ inputGuardrailsTriggered: string[];
44
+ outputGuardrailsTriggered: string[];
43
45
  }
44
- export type InferenceResponse = RunResult | undefined;
46
+ export type InferenceResponse = RunResult;
45
47
  export {};
@@ -1,4 +1,5 @@
1
1
  export declare enum EventAction {
2
+ AiAgent = "ai_agent",
2
3
  FeedbackCase = "feedback_case",
3
4
  FeedbackMessage = "feedback_message",
4
5
  FeedbackConversation = "feedback_conversation",
@@ -98,6 +99,22 @@ export interface EventKnowledgeBase extends HtBaseEventProps {
98
99
  knowledgebaseMessageId: string;
99
100
  userInput: string;
100
101
  }
102
+ export interface EventAiAgent extends HtBaseEventProps {
103
+ action: EventAction.AiAgent;
104
+ flowThreadId: string;
105
+ flowId: string;
106
+ flowName: string;
107
+ flowNodeId: string;
108
+ flowNodeContentId: string;
109
+ flowNodeIsMeaningful: boolean;
110
+ toolsExecuted: string[];
111
+ inputMessageId: string;
112
+ memoryLength: number;
113
+ inputGuardrailsTriggered: string[];
114
+ outputGuardrailsTriggered: string[];
115
+ exit: boolean;
116
+ error: boolean;
117
+ }
101
118
  export declare enum KnowledgebaseFailReason {
102
119
  NoKnowledge = "no_knowledge",
103
120
  Hallucination = "hallucination"
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebviewEndFailType = exports.KnowledgebaseFailReason = exports.EventAction = void 0;
4
4
  var EventAction;
5
5
  (function (EventAction) {
6
+ EventAction["AiAgent"] = "ai_agent";
6
7
  EventAction["FeedbackCase"] = "feedback_case";
7
8
  EventAction["FeedbackMessage"] = "feedback_message";
8
9
  EventAction["FeedbackConversation"] = "feedback_conversation";
@@ -1 +1 @@
1
- {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACrB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;AACnB,CAAC,EAjBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAiBtB;AAiGD,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC;AA6BD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
1
+ {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,mCAAoB,CAAA;IACpB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;AACnB,CAAC,EAlBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkBtB;AAkHD,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC;AA6BD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
@@ -37,9 +37,11 @@ export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>;
37
37
  export interface RunResult {
38
38
  messages: AgenticOutputMessage[];
39
39
  toolsExecuted: string[];
40
+ memoryLength: number;
40
41
  exit: boolean;
41
- inputGuardrailTriggered: string[];
42
- outputGuardrailTriggered: string[];
42
+ error: boolean;
43
+ inputGuardrailsTriggered: string[];
44
+ outputGuardrailsTriggered: string[];
43
45
  }
44
- export type InferenceResponse = RunResult | undefined;
46
+ export type InferenceResponse = RunResult;
45
47
  export {};
@@ -1,4 +1,5 @@
1
1
  export declare enum EventAction {
2
+ AiAgent = "ai_agent",
2
3
  FeedbackCase = "feedback_case",
3
4
  FeedbackMessage = "feedback_message",
4
5
  FeedbackConversation = "feedback_conversation",
@@ -98,6 +99,22 @@ export interface EventKnowledgeBase extends HtBaseEventProps {
98
99
  knowledgebaseMessageId: string;
99
100
  userInput: string;
100
101
  }
102
+ export interface EventAiAgent extends HtBaseEventProps {
103
+ action: EventAction.AiAgent;
104
+ flowThreadId: string;
105
+ flowId: string;
106
+ flowName: string;
107
+ flowNodeId: string;
108
+ flowNodeContentId: string;
109
+ flowNodeIsMeaningful: boolean;
110
+ toolsExecuted: string[];
111
+ inputMessageId: string;
112
+ memoryLength: number;
113
+ inputGuardrailsTriggered: string[];
114
+ outputGuardrailsTriggered: string[];
115
+ exit: boolean;
116
+ error: boolean;
117
+ }
101
118
  export declare enum KnowledgebaseFailReason {
102
119
  NoKnowledge = "no_knowledge",
103
120
  Hallucination = "hallucination"
@@ -1,5 +1,6 @@
1
1
  export var EventAction;
2
2
  (function (EventAction) {
3
+ EventAction["AiAgent"] = "ai_agent";
3
4
  EventAction["FeedbackCase"] = "feedback_case";
4
5
  EventAction["FeedbackMessage"] = "feedback_message";
5
6
  EventAction["FeedbackConversation"] = "feedback_conversation";
@@ -1 +1 @@
1
- {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACrB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;AACnB,CAAC,EAjBW,WAAW,KAAX,WAAW,QAiBtB;AAiGD,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AA6BD,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
1
+ {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,mCAAoB,CAAA;IACpB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;AACnB,CAAC,EAlBW,WAAW,KAAX,WAAW,QAkBtB;AAkHD,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AA6BD,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/core",
3
- "version": "0.39.0",
3
+ "version": "0.40.0-alpha.0",
4
4
  "license": "MIT",
5
5
  "description": "Build Chatbots using React",
6
6
  "main": "./lib/cjs/index.js",
@@ -46,9 +46,11 @@ export type AgenticOutputMessage = Exclude<OutputMessage, ExitMessage>
46
46
  export interface RunResult {
47
47
  messages: AgenticOutputMessage[]
48
48
  toolsExecuted: string[]
49
+ memoryLength: number
49
50
  exit: boolean
50
- inputGuardrailTriggered: string[]
51
- outputGuardrailTriggered: string[]
51
+ error: boolean
52
+ inputGuardrailsTriggered: string[]
53
+ outputGuardrailsTriggered: string[]
52
54
  }
53
55
 
54
- export type InferenceResponse = RunResult | undefined
56
+ export type InferenceResponse = RunResult
@@ -1,4 +1,5 @@
1
1
  export enum EventAction {
2
+ AiAgent = 'ai_agent',
2
3
  FeedbackCase = 'feedback_case',
3
4
  FeedbackMessage = 'feedback_message',
4
5
  FeedbackConversation = 'feedback_conversation',
@@ -112,6 +113,23 @@ export interface EventKnowledgeBase extends HtBaseEventProps {
112
113
  userInput: string
113
114
  }
114
115
 
116
+ export interface EventAiAgent extends HtBaseEventProps {
117
+ action: EventAction.AiAgent
118
+ flowThreadId: string
119
+ flowId: string
120
+ flowName: string
121
+ flowNodeId: string
122
+ flowNodeContentId: string
123
+ flowNodeIsMeaningful: boolean
124
+ toolsExecuted: string[]
125
+ inputMessageId: string
126
+ memoryLength: number
127
+ inputGuardrailsTriggered: string[]
128
+ outputGuardrailsTriggered: string[]
129
+ exit: boolean
130
+ error: boolean
131
+ }
132
+
115
133
  export enum KnowledgebaseFailReason {
116
134
  NoKnowledge = 'no_knowledge',
117
135
  Hallucination = 'hallucination',