@trii/types 2.10.579 → 2.10.581

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,24 @@ export interface IWorkflowMessage {
46
77
  workflowId: string;
47
78
  flowId: string;
48
79
  nodeId: string;
80
+ nodeName: string | '';
81
+ toolName: string;
82
+ tokens: number | 0;
83
+ tokensInput: number | 0;
84
+ tokensOutput: number | 0;
49
85
  /**
50
86
  * Execution time in milliseconds
51
87
  */
52
88
  executionTimeMs: number | 0;
53
89
  createdAt: Date;
54
90
  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;
91
+ excecutionId?: string | null;
63
92
  }
64
93
  export interface IFlowMessageContent {
65
94
  type: 'text' | 'image' | 'file' | 'audio';
66
- mime_type?: string;
95
+ valueJson?: string;
67
96
  text?: string;
97
+ mime_type?: string;
68
98
  image_url?: string;
69
99
  audio_url?: string;
70
100
  file_url?: string;
@@ -82,10 +112,13 @@ export interface IFlowToolCall {
82
112
  arguments: string;
83
113
  nodeId: string | '';
84
114
  success: boolean;
115
+ status: NodeStatus;
85
116
  errorMessage?: string;
86
117
  response?: string;
118
+ output?: string;
87
119
  transferToOtherAgent: boolean | false;
88
120
  flowMessages: IWorkflowMessage[];
121
+ toolCalls: IFlowToolCall[];
89
122
  }
90
123
  export declare enum WorkflowStatus {
91
124
  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.581",
4
4
  "description": "Types definitions for Trii projects - ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",