@trii/types 2.10.579 → 2.10.580

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.
@@ -36,9 +36,40 @@ export interface IWorkflow {
36
36
  finalizedAt?: Date | null;
37
37
  finalizedBy?: string | null;
38
38
  }
39
+ export declare enum NodeStatus {
40
+ QUEUED = 0,
41
+ ERROR = 1,
42
+ RUNNING = 10,
43
+ COMPLETED = 20
44
+ }
45
+ export interface IFlowExecution {
46
+ id: string;
47
+ spaceId: string;
48
+ workflowId: string;
49
+ success: boolean;
50
+ errorMessage?: string;
51
+ executionStartAt: Date;
52
+ executionEndAt: Date;
53
+ executionDuration: number;
54
+ tokensConsumedTokens: IConsumedTokens[];
55
+ tokensTotalCount: number;
56
+ tokensTotalCost: number;
57
+ }
58
+ export interface IConsumedTokens {
59
+ llmProvider: string;
60
+ llmModel: string;
61
+ nodeType: string;
62
+ inputTokens: number;
63
+ outputTokens: number;
64
+ inputPrice: number;
65
+ outputPrice: number;
66
+ totalTokens: number;
67
+ totalCost: number;
68
+ }
39
69
  export interface IWorkflowMessage {
40
70
  id: string;
41
- role: 'system' | 'user' | 'assistant' | 'tool' | 'log';
71
+ role: 'system' | 'user' | 'assistant' | 'tool' | 'log' | 'action';
72
+ status: NodeStatus;
42
73
  contentlist?: IFlowMessageContent[];
43
74
  toolCalls?: IFlowToolCall[];
44
75
  transferToOtherAgent: boolean | false;
@@ -46,25 +77,23 @@ export interface IWorkflowMessage {
46
77
  workflowId: string;
47
78
  flowId: string;
48
79
  nodeId: string;
80
+ toolName: string;
81
+ tokens: number | 0;
82
+ tokensInput: number | 0;
83
+ tokensOutput: number | 0;
49
84
  /**
50
85
  * Execution time in milliseconds
51
86
  */
52
87
  executionTimeMs: number | 0;
53
88
  createdAt: Date;
54
89
  completedAt?: Date | null;
55
- aiProviderId?: string | null;
56
- aiModelId?: string | null;
57
- aiTotalTokens?: number | null;
58
- aiInputTokens?: number | null;
59
- aiOutputTokens?: number | null;
60
- aiCost?: number | null;
61
- aiError?: string | null;
62
- aiLatencyMs?: number | null;
90
+ excecutionId?: string | null;
63
91
  }
64
92
  export interface IFlowMessageContent {
65
93
  type: 'text' | 'image' | 'file' | 'audio';
66
- mime_type?: string;
94
+ valueJson?: string;
67
95
  text?: string;
96
+ mime_type?: string;
68
97
  image_url?: string;
69
98
  audio_url?: string;
70
99
  file_url?: string;
@@ -82,10 +111,13 @@ export interface IFlowToolCall {
82
111
  arguments: string;
83
112
  nodeId: string | '';
84
113
  success: boolean;
114
+ status: NodeStatus;
85
115
  errorMessage?: string;
86
116
  response?: string;
117
+ output?: string;
87
118
  transferToOtherAgent: boolean | false;
88
119
  flowMessages: IWorkflowMessage[];
120
+ toolCalls: IFlowToolCall[];
89
121
  }
90
122
  export declare enum WorkflowStatus {
91
123
  NONE = 0,
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkflowStatus = void 0;
3
+ exports.WorkflowStatus = exports.NodeStatus = void 0;
4
+ var NodeStatus;
5
+ (function (NodeStatus) {
6
+ NodeStatus[NodeStatus["QUEUED"] = 0] = "QUEUED";
7
+ NodeStatus[NodeStatus["ERROR"] = 1] = "ERROR";
8
+ NodeStatus[NodeStatus["RUNNING"] = 10] = "RUNNING";
9
+ //WAITING = 15,
10
+ NodeStatus[NodeStatus["COMPLETED"] = 20] = "COMPLETED";
11
+ })(NodeStatus || (exports.NodeStatus = NodeStatus = {}));
4
12
  var WorkflowStatus;
5
13
  (function (WorkflowStatus) {
6
14
  WorkflowStatus[WorkflowStatus["NONE"] = 0] = "NONE";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trii/types",
3
- "version": "2.10.579",
3
+ "version": "2.10.580",
4
4
  "description": "Types definitions for Trii projects - ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",