@trii/types 2.10.633 → 2.10.634
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.
|
@@ -40,22 +40,46 @@ export declare enum NodeStatus {
|
|
|
40
40
|
QUEUED = 0,
|
|
41
41
|
ERROR = 1,
|
|
42
42
|
RUNNING = 10,
|
|
43
|
+
WAITING = 15,
|
|
44
|
+
SKIPPED = 16,
|
|
43
45
|
COMPLETED = 20
|
|
44
46
|
}
|
|
47
|
+
export declare enum DisplayPanel {
|
|
48
|
+
Right = 0,
|
|
49
|
+
Center = 1,
|
|
50
|
+
Left = 2
|
|
51
|
+
}
|
|
52
|
+
export declare enum FlowTrigger {
|
|
53
|
+
Message = 0,
|
|
54
|
+
ConversationOpened = 10,
|
|
55
|
+
ConversationClosed = 11,
|
|
56
|
+
ContactTagUpdated = 20,
|
|
57
|
+
ContactFieldUpdated = 21,
|
|
58
|
+
ContactFieldDates = 22,
|
|
59
|
+
ContactEventDate = 23,
|
|
60
|
+
Manual = 90,
|
|
61
|
+
Retry = 91,
|
|
62
|
+
Api = 92
|
|
63
|
+
}
|
|
45
64
|
export interface IFlowExecution {
|
|
46
65
|
id: string;
|
|
47
66
|
spaceId: string;
|
|
48
67
|
workflowId: string;
|
|
49
68
|
success: boolean;
|
|
50
69
|
errorMessage?: string;
|
|
70
|
+
triggeredBy: FlowTrigger;
|
|
71
|
+
nodeCount: number;
|
|
72
|
+
nodesCompleted: number;
|
|
73
|
+
nodesError: number;
|
|
74
|
+
nodesSkipped: number;
|
|
51
75
|
executionStartAt: Date;
|
|
52
76
|
executionEndAt: Date;
|
|
53
77
|
executionDuration: number;
|
|
54
|
-
tokensConsumedTokens:
|
|
78
|
+
tokensConsumedTokens: ITokenUsage[];
|
|
55
79
|
tokensTotalCount: number;
|
|
56
80
|
tokensTotalCost: number;
|
|
57
81
|
}
|
|
58
|
-
export interface
|
|
82
|
+
export interface ITokenUsage {
|
|
59
83
|
llmProvider: string;
|
|
60
84
|
llmModel: string;
|
|
61
85
|
nodeType: string;
|
|
@@ -67,41 +91,68 @@ export interface IConsumedTokens {
|
|
|
67
91
|
totalTokens: number;
|
|
68
92
|
totalCost: number;
|
|
69
93
|
}
|
|
70
|
-
export interface
|
|
94
|
+
export interface INodeLog {
|
|
95
|
+
title: string;
|
|
96
|
+
level: 'info' | 'warning' | 'error';
|
|
97
|
+
data?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface INodeExecution {
|
|
71
100
|
id: string;
|
|
72
|
-
role: 'log' | 'user' | 'assistant';
|
|
73
|
-
isWorkerAgent: boolean | false;
|
|
74
|
-
status: NodeStatus;
|
|
75
|
-
input_arguments?: string | null;
|
|
76
|
-
content?: IFlowMessageContent[];
|
|
77
|
-
transferToOtherAgent: boolean | false;
|
|
78
|
-
nextAgentId?: string | null;
|
|
79
101
|
spaceId: string;
|
|
80
102
|
workflowId: string;
|
|
81
103
|
flowId: string;
|
|
82
104
|
nodeId: string;
|
|
83
105
|
nodeName: string | '';
|
|
106
|
+
nodeType: string;
|
|
84
107
|
parentNodeId: string | '';
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
108
|
+
nextAgentId?: string | null;
|
|
109
|
+
executionId?: string | null;
|
|
110
|
+
executionOrder: number;
|
|
88
111
|
/**
|
|
89
112
|
* Execution time in milliseconds
|
|
90
113
|
*/
|
|
91
114
|
executionTimeMs: number | 0;
|
|
92
115
|
createdAt: Date;
|
|
93
116
|
completedAt?: Date | null;
|
|
94
|
-
|
|
117
|
+
tokens: number | 0;
|
|
118
|
+
tokensInput: number | 0;
|
|
119
|
+
tokensOutput: number | 0;
|
|
120
|
+
status: NodeStatus;
|
|
121
|
+
retryAttempt: number | 0;
|
|
122
|
+
retryMaxAttempts: number | 0;
|
|
123
|
+
error?: INodeError;
|
|
124
|
+
displayPanel: DisplayPanel;
|
|
125
|
+
content?: IMessageLLM[];
|
|
126
|
+
outputData?: string | null;
|
|
127
|
+
inputData?: string | null;
|
|
128
|
+
logs?: INodeLog[];
|
|
129
|
+
parentNodeExecutionId?: string | null;
|
|
130
|
+
parentToolCallId?: string | null;
|
|
131
|
+
depth: number | 0;
|
|
132
|
+
}
|
|
133
|
+
export interface INodeError {
|
|
134
|
+
code: string;
|
|
135
|
+
message: string;
|
|
136
|
+
stackTrace?: string;
|
|
137
|
+
isRetryable: boolean | false;
|
|
138
|
+
}
|
|
139
|
+
export declare enum MessageType {
|
|
140
|
+
Text = 0,
|
|
141
|
+
Image = 1,
|
|
142
|
+
File = 2,
|
|
143
|
+
Audio = 3,
|
|
144
|
+
Tool = 4,
|
|
145
|
+
Handoff = 5
|
|
95
146
|
}
|
|
96
|
-
export interface
|
|
97
|
-
|
|
147
|
+
export interface IMessageLLM {
|
|
148
|
+
role: 'tool' | 'user' | 'assistant';
|
|
149
|
+
type: MessageType;
|
|
98
150
|
text?: string;
|
|
99
151
|
/**For audio transcription or OCR processing */
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
audio_url?: string;
|
|
103
|
-
file_url?: string;
|
|
152
|
+
mimeType?: string;
|
|
153
|
+
url?: string;
|
|
104
154
|
transcription?: string;
|
|
155
|
+
isReference: boolean | false;
|
|
105
156
|
handoffTargetAgentId?: string;
|
|
106
157
|
handoffReason?: string;
|
|
107
158
|
handoffContext?: string;
|
|
@@ -114,14 +165,10 @@ export interface IFlowMessageContent {
|
|
|
114
165
|
toolArguments?: string;
|
|
115
166
|
toolOutput?: string;
|
|
116
167
|
toolStatus?: NodeStatus;
|
|
117
|
-
arguments?: string;
|
|
118
|
-
planSchema?: string;
|
|
119
|
-
isPlanExecution?: boolean | false;
|
|
120
|
-
isPlanOutput?: boolean | false;
|
|
121
|
-
workersOutput?: string;
|
|
122
168
|
/**related to messages module */
|
|
123
169
|
messageId?: string;
|
|
124
170
|
messageShardKey?: string;
|
|
171
|
+
messageTimeStamp?: Date;
|
|
125
172
|
}
|
|
126
173
|
export declare enum WorkflowStatus {
|
|
127
174
|
NONE = 0,
|
|
@@ -1,32 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowStatus = exports.NodeStatus = void 0;
|
|
3
|
+
exports.WorkflowStatus = exports.MessageType = exports.FlowTrigger = exports.DisplayPanel = exports.NodeStatus = void 0;
|
|
4
4
|
var NodeStatus;
|
|
5
5
|
(function (NodeStatus) {
|
|
6
6
|
NodeStatus[NodeStatus["QUEUED"] = 0] = "QUEUED";
|
|
7
7
|
NodeStatus[NodeStatus["ERROR"] = 1] = "ERROR";
|
|
8
8
|
NodeStatus[NodeStatus["RUNNING"] = 10] = "RUNNING";
|
|
9
|
-
|
|
9
|
+
NodeStatus[NodeStatus["WAITING"] = 15] = "WAITING";
|
|
10
|
+
NodeStatus[NodeStatus["SKIPPED"] = 16] = "SKIPPED";
|
|
10
11
|
NodeStatus[NodeStatus["COMPLETED"] = 20] = "COMPLETED";
|
|
11
12
|
})(NodeStatus || (exports.NodeStatus = NodeStatus = {}));
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
var DisplayPanel;
|
|
14
|
+
(function (DisplayPanel) {
|
|
15
|
+
DisplayPanel[DisplayPanel["Right"] = 0] = "Right";
|
|
16
|
+
DisplayPanel[DisplayPanel["Center"] = 1] = "Center";
|
|
17
|
+
DisplayPanel[DisplayPanel["Left"] = 2] = "Left";
|
|
18
|
+
})(DisplayPanel || (exports.DisplayPanel = DisplayPanel = {}));
|
|
19
|
+
var FlowTrigger;
|
|
20
|
+
(function (FlowTrigger) {
|
|
21
|
+
FlowTrigger[FlowTrigger["Message"] = 0] = "Message";
|
|
22
|
+
FlowTrigger[FlowTrigger["ConversationOpened"] = 10] = "ConversationOpened";
|
|
23
|
+
FlowTrigger[FlowTrigger["ConversationClosed"] = 11] = "ConversationClosed";
|
|
24
|
+
FlowTrigger[FlowTrigger["ContactTagUpdated"] = 20] = "ContactTagUpdated";
|
|
25
|
+
FlowTrigger[FlowTrigger["ContactFieldUpdated"] = 21] = "ContactFieldUpdated";
|
|
26
|
+
FlowTrigger[FlowTrigger["ContactFieldDates"] = 22] = "ContactFieldDates";
|
|
27
|
+
FlowTrigger[FlowTrigger["ContactEventDate"] = 23] = "ContactEventDate";
|
|
28
|
+
FlowTrigger[FlowTrigger["Manual"] = 90] = "Manual";
|
|
29
|
+
FlowTrigger[FlowTrigger["Retry"] = 91] = "Retry";
|
|
30
|
+
FlowTrigger[FlowTrigger["Api"] = 92] = "Api";
|
|
31
|
+
})(FlowTrigger || (exports.FlowTrigger = FlowTrigger = {}));
|
|
32
|
+
var MessageType;
|
|
33
|
+
(function (MessageType) {
|
|
34
|
+
MessageType[MessageType["Text"] = 0] = "Text";
|
|
35
|
+
MessageType[MessageType["Image"] = 1] = "Image";
|
|
36
|
+
MessageType[MessageType["File"] = 2] = "File";
|
|
37
|
+
MessageType[MessageType["Audio"] = 3] = "Audio";
|
|
38
|
+
MessageType[MessageType["Tool"] = 4] = "Tool";
|
|
39
|
+
MessageType[MessageType["Handoff"] = 5] = "Handoff";
|
|
40
|
+
})(MessageType || (exports.MessageType = MessageType = {}));
|
|
30
41
|
var WorkflowStatus;
|
|
31
42
|
(function (WorkflowStatus) {
|
|
32
43
|
WorkflowStatus[WorkflowStatus["NONE"] = 0] = "NONE";
|