@lssm/example.agent-console 0.0.0-canary-20251217054315 → 0.0.0-canary-20251217060804
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.
- package/.turbo/turbo-build$colon$bundle.log +81 -0
- package/CHANGELOG.md +6 -36
- package/dist/agent/agent.contracts.d.ts +504 -0
- package/dist/agent/agent.entity.d.ts +54 -0
- package/dist/agent/agent.enum.d.ts +17 -0
- package/dist/agent/agent.event.d.ts +127 -0
- package/dist/agent/agent.handler.d.ts +99 -0
- package/dist/agent/agent.presentation.d.ts +18 -0
- package/dist/agent/agent.schema.d.ts +400 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent.feature.d.ts +11 -0
- package/dist/docs/agent-console.docblock.d.ts +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/example.d.ts +39 -0
- package/dist/handlers/index.d.ts +4 -0
- package/dist/index.d.ts +30 -0
- package/dist/presentations/index.d.ts +4 -0
- package/dist/run/index.d.ts +8 -0
- package/dist/run/run.contracts.d.ts +713 -0
- package/dist/run/run.entity.d.ts +81 -0
- package/dist/run/run.enum.d.ts +21 -0
- package/dist/run/run.event.d.ts +289 -0
- package/dist/run/run.handler.d.ts +202 -0
- package/dist/run/run.presentation.d.ts +14 -0
- package/dist/run/run.schema.d.ts +415 -0
- package/dist/shared/index.d.ts +4 -0
- package/dist/shared/mock-agents.d.ts +87 -0
- package/dist/shared/mock-runs.d.ts +119 -0
- package/dist/shared/mock-tools.d.ts +243 -0
- package/dist/tool/index.d.ts +8 -0
- package/dist/tool/tool.contracts.d.ts +404 -0
- package/dist/tool/tool.entity.d.ts +41 -0
- package/dist/tool/tool.enum.d.ts +17 -0
- package/dist/tool/tool.event.d.ts +102 -0
- package/dist/tool/tool.handler.d.ts +314 -0
- package/dist/tool/tool.presentation.d.ts +14 -0
- package/dist/tool/tool.schema.d.ts +217 -0
- package/package.json +43 -43
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as _lssm_lib_schema456 from "@lssm/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/run/run.entity.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Run status enum for entities.
|
|
6
|
+
*/
|
|
7
|
+
declare const RunStatusEntityEnum: _lssm_lib_schema456.EntityEnumDef;
|
|
8
|
+
/**
|
|
9
|
+
* Run step type enum for entities.
|
|
10
|
+
*/
|
|
11
|
+
declare const RunStepTypeEntityEnum: _lssm_lib_schema456.EntityEnumDef;
|
|
12
|
+
/**
|
|
13
|
+
* Log level enum for entities.
|
|
14
|
+
*/
|
|
15
|
+
declare const LogLevelEntityEnum: _lssm_lib_schema456.EntityEnumDef;
|
|
16
|
+
/**
|
|
17
|
+
* Run entity - Represents an agent execution.
|
|
18
|
+
*/
|
|
19
|
+
declare const RunEntity: _lssm_lib_schema456.EntitySpec<{
|
|
20
|
+
id: _lssm_lib_schema456.EntityScalarField;
|
|
21
|
+
organizationId: _lssm_lib_schema456.EntityScalarField;
|
|
22
|
+
agentId: _lssm_lib_schema456.EntityScalarField;
|
|
23
|
+
userId: _lssm_lib_schema456.EntityScalarField;
|
|
24
|
+
sessionId: _lssm_lib_schema456.EntityScalarField;
|
|
25
|
+
input: _lssm_lib_schema456.EntityScalarField;
|
|
26
|
+
output: _lssm_lib_schema456.EntityScalarField;
|
|
27
|
+
status: _lssm_lib_schema456.EntityEnumField;
|
|
28
|
+
errorMessage: _lssm_lib_schema456.EntityScalarField;
|
|
29
|
+
errorCode: _lssm_lib_schema456.EntityScalarField;
|
|
30
|
+
totalTokens: _lssm_lib_schema456.EntityScalarField;
|
|
31
|
+
promptTokens: _lssm_lib_schema456.EntityScalarField;
|
|
32
|
+
completionTokens: _lssm_lib_schema456.EntityScalarField;
|
|
33
|
+
totalIterations: _lssm_lib_schema456.EntityScalarField;
|
|
34
|
+
durationMs: _lssm_lib_schema456.EntityScalarField;
|
|
35
|
+
estimatedCostUsd: _lssm_lib_schema456.EntityScalarField;
|
|
36
|
+
queuedAt: _lssm_lib_schema456.EntityScalarField;
|
|
37
|
+
startedAt: _lssm_lib_schema456.EntityScalarField;
|
|
38
|
+
completedAt: _lssm_lib_schema456.EntityScalarField;
|
|
39
|
+
metadata: _lssm_lib_schema456.EntityScalarField;
|
|
40
|
+
agent: _lssm_lib_schema456.EntityRelationField;
|
|
41
|
+
steps: _lssm_lib_schema456.EntityRelationField;
|
|
42
|
+
logs: _lssm_lib_schema456.EntityRelationField;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* RunStep entity - Individual step in a run.
|
|
46
|
+
*/
|
|
47
|
+
declare const RunStepEntity: _lssm_lib_schema456.EntitySpec<{
|
|
48
|
+
id: _lssm_lib_schema456.EntityScalarField;
|
|
49
|
+
runId: _lssm_lib_schema456.EntityScalarField;
|
|
50
|
+
stepNumber: _lssm_lib_schema456.EntityScalarField;
|
|
51
|
+
type: _lssm_lib_schema456.EntityEnumField;
|
|
52
|
+
toolId: _lssm_lib_schema456.EntityScalarField;
|
|
53
|
+
toolName: _lssm_lib_schema456.EntityScalarField;
|
|
54
|
+
input: _lssm_lib_schema456.EntityScalarField;
|
|
55
|
+
output: _lssm_lib_schema456.EntityScalarField;
|
|
56
|
+
status: _lssm_lib_schema456.EntityEnumField;
|
|
57
|
+
errorMessage: _lssm_lib_schema456.EntityScalarField;
|
|
58
|
+
tokensUsed: _lssm_lib_schema456.EntityScalarField;
|
|
59
|
+
durationMs: _lssm_lib_schema456.EntityScalarField;
|
|
60
|
+
startedAt: _lssm_lib_schema456.EntityScalarField;
|
|
61
|
+
completedAt: _lssm_lib_schema456.EntityScalarField;
|
|
62
|
+
run: _lssm_lib_schema456.EntityRelationField;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* RunLog entity - Log entry for a run.
|
|
66
|
+
*/
|
|
67
|
+
declare const RunLogEntity: _lssm_lib_schema456.EntitySpec<{
|
|
68
|
+
id: _lssm_lib_schema456.EntityScalarField;
|
|
69
|
+
runId: _lssm_lib_schema456.EntityScalarField;
|
|
70
|
+
stepId: _lssm_lib_schema456.EntityScalarField;
|
|
71
|
+
level: _lssm_lib_schema456.EntityEnumField;
|
|
72
|
+
message: _lssm_lib_schema456.EntityScalarField;
|
|
73
|
+
data: _lssm_lib_schema456.EntityScalarField;
|
|
74
|
+
source: _lssm_lib_schema456.EntityScalarField;
|
|
75
|
+
traceId: _lssm_lib_schema456.EntityScalarField;
|
|
76
|
+
spanId: _lssm_lib_schema456.EntityScalarField;
|
|
77
|
+
timestamp: _lssm_lib_schema456.EntityScalarField;
|
|
78
|
+
run: _lssm_lib_schema456.EntityRelationField;
|
|
79
|
+
}>;
|
|
80
|
+
//#endregion
|
|
81
|
+
export { LogLevelEntityEnum, RunEntity, RunLogEntity, RunStatusEntityEnum, RunStepEntity, RunStepTypeEntityEnum };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as _lssm_lib_schema0 from "@lssm/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/run/run.enum.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Run status enum.
|
|
6
|
+
*/
|
|
7
|
+
declare const RunStatusEnum: _lssm_lib_schema0.EnumType<[string, string, string, string, string, string]>;
|
|
8
|
+
/**
|
|
9
|
+
* Run step type enum.
|
|
10
|
+
*/
|
|
11
|
+
declare const RunStepTypeEnum: _lssm_lib_schema0.EnumType<[string, string, string, string]>;
|
|
12
|
+
/**
|
|
13
|
+
* Log level enum.
|
|
14
|
+
*/
|
|
15
|
+
declare const LogLevelEnum: _lssm_lib_schema0.EnumType<[string, string, string, string]>;
|
|
16
|
+
/**
|
|
17
|
+
* Granularity enum for metrics.
|
|
18
|
+
*/
|
|
19
|
+
declare const GranularityEnum: _lssm_lib_schema0.EnumType<[string, string, string, string]>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { GranularityEnum, LogLevelEnum, RunStatusEnum, RunStepTypeEnum };
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import * as _lssm_lib_schema293 from "@lssm/lib.schema";
|
|
2
|
+
import * as _lssm_lib_contracts15 from "@lssm/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/run/run.event.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* RunStartedEvent - An agent run was started.
|
|
7
|
+
*/
|
|
8
|
+
declare const RunStartedEvent: _lssm_lib_contracts15.EventSpec<_lssm_lib_schema293.SchemaModel<{
|
|
9
|
+
runId: {
|
|
10
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
organizationId: {
|
|
14
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
agentId: {
|
|
18
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
agentName: {
|
|
22
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
userId: {
|
|
26
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
27
|
+
isOptional: true;
|
|
28
|
+
};
|
|
29
|
+
sessionId: {
|
|
30
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
31
|
+
isOptional: true;
|
|
32
|
+
};
|
|
33
|
+
input: {
|
|
34
|
+
type: _lssm_lib_schema293.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
35
|
+
isOptional: false;
|
|
36
|
+
};
|
|
37
|
+
startedAt: {
|
|
38
|
+
type: _lssm_lib_schema293.FieldType<Date, string>;
|
|
39
|
+
isOptional: false;
|
|
40
|
+
};
|
|
41
|
+
}>>;
|
|
42
|
+
/**
|
|
43
|
+
* RunCompletedEvent - An agent run completed successfully.
|
|
44
|
+
*/
|
|
45
|
+
declare const RunCompletedEvent: _lssm_lib_contracts15.EventSpec<_lssm_lib_schema293.SchemaModel<{
|
|
46
|
+
runId: {
|
|
47
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
organizationId: {
|
|
51
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
54
|
+
agentId: {
|
|
55
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
agentName: {
|
|
59
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
userId: {
|
|
63
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
64
|
+
isOptional: true;
|
|
65
|
+
};
|
|
66
|
+
output: {
|
|
67
|
+
type: _lssm_lib_schema293.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
68
|
+
isOptional: false;
|
|
69
|
+
};
|
|
70
|
+
totalTokens: {
|
|
71
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
72
|
+
isOptional: false;
|
|
73
|
+
};
|
|
74
|
+
promptTokens: {
|
|
75
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
76
|
+
isOptional: false;
|
|
77
|
+
};
|
|
78
|
+
completionTokens: {
|
|
79
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
80
|
+
isOptional: false;
|
|
81
|
+
};
|
|
82
|
+
totalIterations: {
|
|
83
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
84
|
+
isOptional: false;
|
|
85
|
+
};
|
|
86
|
+
durationMs: {
|
|
87
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
88
|
+
isOptional: false;
|
|
89
|
+
};
|
|
90
|
+
estimatedCostUsd: {
|
|
91
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
92
|
+
isOptional: true;
|
|
93
|
+
};
|
|
94
|
+
completedAt: {
|
|
95
|
+
type: _lssm_lib_schema293.FieldType<Date, string>;
|
|
96
|
+
isOptional: false;
|
|
97
|
+
};
|
|
98
|
+
}>>;
|
|
99
|
+
/**
|
|
100
|
+
* RunFailedEvent - An agent run failed.
|
|
101
|
+
*/
|
|
102
|
+
declare const RunFailedEvent: _lssm_lib_contracts15.EventSpec<_lssm_lib_schema293.SchemaModel<{
|
|
103
|
+
runId: {
|
|
104
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
105
|
+
isOptional: false;
|
|
106
|
+
};
|
|
107
|
+
organizationId: {
|
|
108
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
109
|
+
isOptional: false;
|
|
110
|
+
};
|
|
111
|
+
agentId: {
|
|
112
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
113
|
+
isOptional: false;
|
|
114
|
+
};
|
|
115
|
+
agentName: {
|
|
116
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
117
|
+
isOptional: false;
|
|
118
|
+
};
|
|
119
|
+
userId: {
|
|
120
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
121
|
+
isOptional: true;
|
|
122
|
+
};
|
|
123
|
+
errorMessage: {
|
|
124
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
125
|
+
isOptional: false;
|
|
126
|
+
};
|
|
127
|
+
errorCode: {
|
|
128
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
129
|
+
isOptional: true;
|
|
130
|
+
};
|
|
131
|
+
totalTokens: {
|
|
132
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
133
|
+
isOptional: false;
|
|
134
|
+
};
|
|
135
|
+
totalIterations: {
|
|
136
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
137
|
+
isOptional: false;
|
|
138
|
+
};
|
|
139
|
+
durationMs: {
|
|
140
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
141
|
+
isOptional: true;
|
|
142
|
+
};
|
|
143
|
+
failedAt: {
|
|
144
|
+
type: _lssm_lib_schema293.FieldType<Date, string>;
|
|
145
|
+
isOptional: false;
|
|
146
|
+
};
|
|
147
|
+
}>>;
|
|
148
|
+
/**
|
|
149
|
+
* RunCancelledEvent - An agent run was cancelled.
|
|
150
|
+
*/
|
|
151
|
+
declare const RunCancelledEvent: _lssm_lib_contracts15.EventSpec<_lssm_lib_schema293.SchemaModel<{
|
|
152
|
+
runId: {
|
|
153
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
154
|
+
isOptional: false;
|
|
155
|
+
};
|
|
156
|
+
organizationId: {
|
|
157
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
158
|
+
isOptional: false;
|
|
159
|
+
};
|
|
160
|
+
agentId: {
|
|
161
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
162
|
+
isOptional: false;
|
|
163
|
+
};
|
|
164
|
+
userId: {
|
|
165
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
166
|
+
isOptional: true;
|
|
167
|
+
};
|
|
168
|
+
cancelledBy: {
|
|
169
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
170
|
+
isOptional: true;
|
|
171
|
+
};
|
|
172
|
+
reason: {
|
|
173
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
174
|
+
isOptional: true;
|
|
175
|
+
};
|
|
176
|
+
totalTokens: {
|
|
177
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
178
|
+
isOptional: false;
|
|
179
|
+
};
|
|
180
|
+
totalIterations: {
|
|
181
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
182
|
+
isOptional: false;
|
|
183
|
+
};
|
|
184
|
+
cancelledAt: {
|
|
185
|
+
type: _lssm_lib_schema293.FieldType<Date, string>;
|
|
186
|
+
isOptional: false;
|
|
187
|
+
};
|
|
188
|
+
}>>;
|
|
189
|
+
/**
|
|
190
|
+
* ToolInvokedEvent - A tool was invoked during a run.
|
|
191
|
+
*/
|
|
192
|
+
declare const ToolInvokedEvent: _lssm_lib_contracts15.EventSpec<_lssm_lib_schema293.SchemaModel<{
|
|
193
|
+
runId: {
|
|
194
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
195
|
+
isOptional: false;
|
|
196
|
+
};
|
|
197
|
+
stepId: {
|
|
198
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
199
|
+
isOptional: false;
|
|
200
|
+
};
|
|
201
|
+
toolId: {
|
|
202
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
203
|
+
isOptional: false;
|
|
204
|
+
};
|
|
205
|
+
toolName: {
|
|
206
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
207
|
+
isOptional: false;
|
|
208
|
+
};
|
|
209
|
+
input: {
|
|
210
|
+
type: _lssm_lib_schema293.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
211
|
+
isOptional: false;
|
|
212
|
+
};
|
|
213
|
+
invokedAt: {
|
|
214
|
+
type: _lssm_lib_schema293.FieldType<Date, string>;
|
|
215
|
+
isOptional: false;
|
|
216
|
+
};
|
|
217
|
+
}>>;
|
|
218
|
+
/**
|
|
219
|
+
* ToolCompletedEvent - A tool invocation completed.
|
|
220
|
+
*/
|
|
221
|
+
declare const ToolCompletedEvent: _lssm_lib_contracts15.EventSpec<_lssm_lib_schema293.SchemaModel<{
|
|
222
|
+
runId: {
|
|
223
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
224
|
+
isOptional: false;
|
|
225
|
+
};
|
|
226
|
+
stepId: {
|
|
227
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
228
|
+
isOptional: false;
|
|
229
|
+
};
|
|
230
|
+
toolId: {
|
|
231
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
232
|
+
isOptional: false;
|
|
233
|
+
};
|
|
234
|
+
toolName: {
|
|
235
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
236
|
+
isOptional: false;
|
|
237
|
+
};
|
|
238
|
+
success: {
|
|
239
|
+
type: _lssm_lib_schema293.FieldType<boolean, boolean>;
|
|
240
|
+
isOptional: false;
|
|
241
|
+
};
|
|
242
|
+
output: {
|
|
243
|
+
type: _lssm_lib_schema293.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
244
|
+
isOptional: true;
|
|
245
|
+
};
|
|
246
|
+
errorMessage: {
|
|
247
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
248
|
+
isOptional: true;
|
|
249
|
+
};
|
|
250
|
+
durationMs: {
|
|
251
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
252
|
+
isOptional: false;
|
|
253
|
+
};
|
|
254
|
+
completedAt: {
|
|
255
|
+
type: _lssm_lib_schema293.FieldType<Date, string>;
|
|
256
|
+
isOptional: false;
|
|
257
|
+
};
|
|
258
|
+
}>>;
|
|
259
|
+
/**
|
|
260
|
+
* MessageGeneratedEvent - Agent generated a message.
|
|
261
|
+
*/
|
|
262
|
+
declare const MessageGeneratedEvent: _lssm_lib_contracts15.EventSpec<_lssm_lib_schema293.SchemaModel<{
|
|
263
|
+
runId: {
|
|
264
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
265
|
+
isOptional: false;
|
|
266
|
+
};
|
|
267
|
+
stepId: {
|
|
268
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
269
|
+
isOptional: false;
|
|
270
|
+
};
|
|
271
|
+
messageType: {
|
|
272
|
+
type: _lssm_lib_schema293.EnumType<[string, string]>;
|
|
273
|
+
isOptional: false;
|
|
274
|
+
};
|
|
275
|
+
content: {
|
|
276
|
+
type: _lssm_lib_schema293.FieldType<string, string>;
|
|
277
|
+
isOptional: false;
|
|
278
|
+
};
|
|
279
|
+
tokensUsed: {
|
|
280
|
+
type: _lssm_lib_schema293.FieldType<number, number>;
|
|
281
|
+
isOptional: false;
|
|
282
|
+
};
|
|
283
|
+
generatedAt: {
|
|
284
|
+
type: _lssm_lib_schema293.FieldType<Date, string>;
|
|
285
|
+
isOptional: false;
|
|
286
|
+
};
|
|
287
|
+
}>>;
|
|
288
|
+
//#endregion
|
|
289
|
+
export { MessageGeneratedEvent, RunCancelledEvent, RunCompletedEvent, RunFailedEvent, RunStartedEvent, ToolCompletedEvent, ToolInvokedEvent };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
//#region src/run/run.handler.d.ts
|
|
2
|
+
interface ListRunsInput {
|
|
3
|
+
organizationId?: string;
|
|
4
|
+
agentId?: string;
|
|
5
|
+
userId?: string;
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
status?: 'QUEUED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'EXPIRED';
|
|
8
|
+
startDate?: Date;
|
|
9
|
+
endDate?: Date;
|
|
10
|
+
limit?: number;
|
|
11
|
+
offset?: number;
|
|
12
|
+
}
|
|
13
|
+
interface RunSummary {
|
|
14
|
+
id: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
agentName: string;
|
|
17
|
+
status: 'QUEUED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'EXPIRED';
|
|
18
|
+
totalTokens: number;
|
|
19
|
+
durationMs?: number;
|
|
20
|
+
estimatedCostUsd?: number;
|
|
21
|
+
queuedAt: Date;
|
|
22
|
+
completedAt?: Date;
|
|
23
|
+
}
|
|
24
|
+
interface ListRunsOutput {
|
|
25
|
+
items: RunSummary[];
|
|
26
|
+
total: number;
|
|
27
|
+
hasMore: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Mock handler for ListRunsQuery.
|
|
31
|
+
*/
|
|
32
|
+
declare function mockListRunsHandler(input: ListRunsInput): Promise<ListRunsOutput>;
|
|
33
|
+
/**
|
|
34
|
+
* Mock handler for GetRunQuery.
|
|
35
|
+
*/
|
|
36
|
+
declare function mockGetRunHandler(input: {
|
|
37
|
+
runId: string;
|
|
38
|
+
includeSteps?: boolean;
|
|
39
|
+
includeLogs?: boolean;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
agent: {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
modelProvider: "OPENAI" | "ANTHROPIC" | "GOOGLE";
|
|
45
|
+
modelName: string;
|
|
46
|
+
} | undefined;
|
|
47
|
+
steps: never[] | undefined;
|
|
48
|
+
logs: never[] | undefined;
|
|
49
|
+
id: string;
|
|
50
|
+
organizationId: string;
|
|
51
|
+
agentId: string;
|
|
52
|
+
agentName: string;
|
|
53
|
+
userId: string;
|
|
54
|
+
sessionId: string;
|
|
55
|
+
input: {
|
|
56
|
+
message: string;
|
|
57
|
+
context: {
|
|
58
|
+
prNumber?: undefined;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
output: {
|
|
62
|
+
response: string;
|
|
63
|
+
};
|
|
64
|
+
status: "COMPLETED";
|
|
65
|
+
totalTokens: number;
|
|
66
|
+
promptTokens: number;
|
|
67
|
+
completionTokens: number;
|
|
68
|
+
totalIterations: number;
|
|
69
|
+
durationMs: number;
|
|
70
|
+
estimatedCostUsd: number;
|
|
71
|
+
queuedAt: Date;
|
|
72
|
+
startedAt: Date;
|
|
73
|
+
completedAt: Date;
|
|
74
|
+
errorMessage?: undefined;
|
|
75
|
+
errorCode?: undefined;
|
|
76
|
+
} | {
|
|
77
|
+
agent: {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
modelProvider: "OPENAI" | "ANTHROPIC" | "GOOGLE";
|
|
81
|
+
modelName: string;
|
|
82
|
+
} | undefined;
|
|
83
|
+
steps: never[] | undefined;
|
|
84
|
+
logs: never[] | undefined;
|
|
85
|
+
id: string;
|
|
86
|
+
organizationId: string;
|
|
87
|
+
agentId: string;
|
|
88
|
+
agentName: string;
|
|
89
|
+
userId: string;
|
|
90
|
+
input: {
|
|
91
|
+
message: string;
|
|
92
|
+
context: {
|
|
93
|
+
prNumber: number;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
status: "IN_PROGRESS";
|
|
97
|
+
totalTokens: number;
|
|
98
|
+
promptTokens: number;
|
|
99
|
+
completionTokens: number;
|
|
100
|
+
totalIterations: number;
|
|
101
|
+
queuedAt: Date;
|
|
102
|
+
startedAt: Date;
|
|
103
|
+
sessionId?: undefined;
|
|
104
|
+
output?: undefined;
|
|
105
|
+
durationMs?: undefined;
|
|
106
|
+
estimatedCostUsd?: undefined;
|
|
107
|
+
completedAt?: undefined;
|
|
108
|
+
errorMessage?: undefined;
|
|
109
|
+
errorCode?: undefined;
|
|
110
|
+
} | {
|
|
111
|
+
agent: {
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
modelProvider: "OPENAI" | "ANTHROPIC" | "GOOGLE";
|
|
115
|
+
modelName: string;
|
|
116
|
+
} | undefined;
|
|
117
|
+
steps: never[] | undefined;
|
|
118
|
+
logs: never[] | undefined;
|
|
119
|
+
id: string;
|
|
120
|
+
organizationId: string;
|
|
121
|
+
agentId: string;
|
|
122
|
+
agentName: string;
|
|
123
|
+
userId: string;
|
|
124
|
+
input: {
|
|
125
|
+
message: string;
|
|
126
|
+
context?: undefined;
|
|
127
|
+
};
|
|
128
|
+
output: {
|
|
129
|
+
response: string;
|
|
130
|
+
};
|
|
131
|
+
status: "COMPLETED";
|
|
132
|
+
totalTokens: number;
|
|
133
|
+
promptTokens: number;
|
|
134
|
+
completionTokens: number;
|
|
135
|
+
totalIterations: number;
|
|
136
|
+
durationMs: number;
|
|
137
|
+
estimatedCostUsd: number;
|
|
138
|
+
queuedAt: Date;
|
|
139
|
+
startedAt: Date;
|
|
140
|
+
completedAt: Date;
|
|
141
|
+
sessionId?: undefined;
|
|
142
|
+
errorMessage?: undefined;
|
|
143
|
+
errorCode?: undefined;
|
|
144
|
+
} | {
|
|
145
|
+
agent: {
|
|
146
|
+
id: string;
|
|
147
|
+
name: string;
|
|
148
|
+
modelProvider: "OPENAI" | "ANTHROPIC" | "GOOGLE";
|
|
149
|
+
modelName: string;
|
|
150
|
+
} | undefined;
|
|
151
|
+
steps: never[] | undefined;
|
|
152
|
+
logs: never[] | undefined;
|
|
153
|
+
id: string;
|
|
154
|
+
organizationId: string;
|
|
155
|
+
agentId: string;
|
|
156
|
+
agentName: string;
|
|
157
|
+
userId: string;
|
|
158
|
+
input: {
|
|
159
|
+
message: string;
|
|
160
|
+
context?: undefined;
|
|
161
|
+
};
|
|
162
|
+
status: "FAILED";
|
|
163
|
+
errorMessage: string;
|
|
164
|
+
errorCode: string;
|
|
165
|
+
totalTokens: number;
|
|
166
|
+
promptTokens: number;
|
|
167
|
+
completionTokens: number;
|
|
168
|
+
totalIterations: number;
|
|
169
|
+
durationMs: number;
|
|
170
|
+
queuedAt: Date;
|
|
171
|
+
startedAt: Date;
|
|
172
|
+
completedAt: Date;
|
|
173
|
+
sessionId?: undefined;
|
|
174
|
+
output?: undefined;
|
|
175
|
+
estimatedCostUsd?: undefined;
|
|
176
|
+
}>;
|
|
177
|
+
/**
|
|
178
|
+
* Mock handler for ExecuteAgentCommand.
|
|
179
|
+
*/
|
|
180
|
+
declare function mockExecuteAgentHandler(input: {
|
|
181
|
+
agentId: string;
|
|
182
|
+
input: {
|
|
183
|
+
message: string;
|
|
184
|
+
context?: Record<string, unknown>;
|
|
185
|
+
};
|
|
186
|
+
}): Promise<{
|
|
187
|
+
runId: string;
|
|
188
|
+
status: "QUEUED";
|
|
189
|
+
estimatedWaitMs: number;
|
|
190
|
+
}>;
|
|
191
|
+
/**
|
|
192
|
+
* Mock handler for CancelRunCommand.
|
|
193
|
+
*/
|
|
194
|
+
declare function mockCancelRunHandler(input: {
|
|
195
|
+
runId: string;
|
|
196
|
+
reason?: string;
|
|
197
|
+
}): Promise<{
|
|
198
|
+
success: boolean;
|
|
199
|
+
status: "CANCELLED";
|
|
200
|
+
}>;
|
|
201
|
+
//#endregion
|
|
202
|
+
export { ListRunsInput, ListRunsOutput, RunSummary, mockCancelRunHandler, mockExecuteAgentHandler, mockGetRunHandler, mockListRunsHandler };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PresentationDescriptorV2 } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/run/run.presentation.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Presentation for displaying a list of agent runs.
|
|
7
|
+
*/
|
|
8
|
+
declare const RunListPresentation: PresentationDescriptorV2;
|
|
9
|
+
/**
|
|
10
|
+
* Presentation for run detail view.
|
|
11
|
+
*/
|
|
12
|
+
declare const RunDetailPresentation: PresentationDescriptorV2;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { RunDetailPresentation, RunListPresentation };
|