@anyway-sh/node-server-sdk 0.22.8

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.
Files changed (56) hide show
  1. package/README +35 -0
  2. package/dist/index.d.ts +1957 -0
  3. package/dist/index.js +4458 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +4382 -0
  6. package/dist/src/index.d.ts +10 -0
  7. package/dist/src/lib/associations/associations.d.ts +32 -0
  8. package/dist/src/lib/client/annotation/base-annotation.d.ts +20 -0
  9. package/dist/src/lib/client/annotation/user-feedback.d.ts +32 -0
  10. package/dist/src/lib/client/dataset/attachment-uploader.d.ts +50 -0
  11. package/dist/src/lib/client/dataset/attachment.d.ts +84 -0
  12. package/dist/src/lib/client/dataset/base-dataset.d.ts +10 -0
  13. package/dist/src/lib/client/dataset/column.d.ts +23 -0
  14. package/dist/src/lib/client/dataset/dataset.d.ts +43 -0
  15. package/dist/src/lib/client/dataset/datasets.d.ts +14 -0
  16. package/dist/src/lib/client/dataset/index.d.ts +8 -0
  17. package/dist/src/lib/client/dataset/row.d.ts +73 -0
  18. package/dist/src/lib/client/evaluator/evaluator.d.ts +28 -0
  19. package/dist/src/lib/client/evaluator/index.d.ts +2 -0
  20. package/dist/src/lib/client/experiment/experiment.d.ts +76 -0
  21. package/dist/src/lib/client/experiment/index.d.ts +2 -0
  22. package/dist/src/lib/client/traceloop-client.d.ts +40 -0
  23. package/dist/src/lib/configuration/index.d.ts +35 -0
  24. package/dist/src/lib/configuration/validation.d.ts +3 -0
  25. package/dist/src/lib/errors/index.d.ts +36 -0
  26. package/dist/src/lib/generated/evaluators/index.d.ts +5 -0
  27. package/dist/src/lib/generated/evaluators/mbt-evaluators.d.ts +386 -0
  28. package/dist/src/lib/generated/evaluators/registry.d.ts +12 -0
  29. package/dist/src/lib/generated/evaluators/types.d.ts +401 -0
  30. package/dist/src/lib/images/image-uploader.d.ts +15 -0
  31. package/dist/src/lib/images/index.d.ts +2 -0
  32. package/dist/src/lib/interfaces/annotations.interface.d.ts +35 -0
  33. package/dist/src/lib/interfaces/dataset.interface.d.ts +105 -0
  34. package/dist/src/lib/interfaces/evaluator.interface.d.ts +83 -0
  35. package/dist/src/lib/interfaces/experiment.interface.d.ts +117 -0
  36. package/dist/src/lib/interfaces/index.d.ts +8 -0
  37. package/dist/src/lib/interfaces/initialize-options.interface.d.ts +133 -0
  38. package/dist/src/lib/interfaces/prompts.interface.d.ts +53 -0
  39. package/dist/src/lib/interfaces/traceloop-client.interface.d.ts +7 -0
  40. package/dist/src/lib/node-server-sdk.d.ts +19 -0
  41. package/dist/src/lib/prompts/fetch.d.ts +3 -0
  42. package/dist/src/lib/prompts/index.d.ts +3 -0
  43. package/dist/src/lib/prompts/registry.d.ts +9 -0
  44. package/dist/src/lib/prompts/template.d.ts +3 -0
  45. package/dist/src/lib/tracing/ai-sdk-transformations.d.ts +5 -0
  46. package/dist/src/lib/tracing/association.d.ts +4 -0
  47. package/dist/src/lib/tracing/baggage-utils.d.ts +2 -0
  48. package/dist/src/lib/tracing/custom-metric.d.ts +14 -0
  49. package/dist/src/lib/tracing/decorators.d.ts +22 -0
  50. package/dist/src/lib/tracing/index.d.ts +14 -0
  51. package/dist/src/lib/tracing/manual.d.ts +60 -0
  52. package/dist/src/lib/tracing/sampler.d.ts +7 -0
  53. package/dist/src/lib/tracing/span-processor.d.ts +48 -0
  54. package/dist/src/lib/tracing/tracing.d.ts +10 -0
  55. package/dist/src/lib/utils/response-transformer.d.ts +19 -0
  56. package/package.json +127 -0
@@ -0,0 +1,401 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export type paths = Record<string, never>;
6
+ export type webhooks = Record<string, never>;
7
+ export interface components {
8
+ schemas: {
9
+ "request.AgentEfficiencyRequest": {
10
+ input: components["schemas"]["request.AgentEfficiencyInput"];
11
+ };
12
+ "request.AgentEfficiencyInput": {
13
+ /** @example ["User found", "Email updated", "Changes saved"] */
14
+ trajectory_completions: string;
15
+ /** @example ["Find user info", "Update email", "Save changes"] */
16
+ trajectory_prompts: string;
17
+ };
18
+ "request.AgentFlowQualityRequest": {
19
+ config: components["schemas"]["request.AgentFlowQualityConfigRequest"];
20
+ input: components["schemas"]["request.AgentFlowQualityInput"];
21
+ };
22
+ "request.AgentFlowQualityConfigRequest": {
23
+ /**
24
+ * @example [
25
+ * "no tools called",
26
+ * "agent completed task"
27
+ * ]
28
+ */
29
+ conditions: string[];
30
+ /** @example 0.5 */
31
+ threshold: number;
32
+ };
33
+ "request.AgentFlowQualityInput": {
34
+ /** @example ["Found 5 flights", "Selected $299 flight", "Booking confirmed"] */
35
+ trajectory_completions: string;
36
+ /** @example ["Search for flights", "Select the cheapest option", "Confirm booking"] */
37
+ trajectory_prompts: string;
38
+ };
39
+ "request.AgentGoalAccuracyRequest": {
40
+ input: components["schemas"]["request.AgentGoalAccuracyInput"];
41
+ };
42
+ "request.AgentGoalAccuracyInput": {
43
+ /** @example I have booked your flight from New York to Los Angeles departing Monday at 9am. */
44
+ completion: string;
45
+ /** @example Book a flight from NYC to LA for next Monday */
46
+ question: string;
47
+ /** @example Flight booked: NYC to LA, Monday departure */
48
+ reference: string;
49
+ };
50
+ "request.AgentGoalCompletenessRequest": {
51
+ config?: components["schemas"]["request.AgentGoalCompletenessConfigRequest"];
52
+ input: components["schemas"]["request.AgentGoalCompletenessInput"];
53
+ };
54
+ "request.AgentGoalCompletenessConfigRequest": {
55
+ /** @example 0.5 */
56
+ threshold: number;
57
+ };
58
+ "request.AgentGoalCompletenessInput": {
59
+ /** @example ["Account created", "Preferences saved", "Notifications enabled"] */
60
+ trajectory_completions: string;
61
+ /** @example ["Create new account", "Set preferences", "Enable notifications"] */
62
+ trajectory_prompts: string;
63
+ };
64
+ "request.AgentToolErrorDetectorRequest": {
65
+ input: components["schemas"]["request.AgentToolErrorDetectorInput"];
66
+ };
67
+ "request.AgentToolErrorDetectorInput": {
68
+ /** @example {"action": "search", "query": "flights to Paris"} */
69
+ tool_input: string;
70
+ /** @example {"status": "success", "results": [{"flight": "AF123", "price": 450}]} */
71
+ tool_output: string;
72
+ };
73
+ "request.AgentToolTrajectoryRequest": {
74
+ config?: components["schemas"]["request.AgentToolTrajectoryConfigRequest"];
75
+ input: components["schemas"]["request.AgentToolTrajectoryInput"];
76
+ };
77
+ "request.AgentToolTrajectoryConfigRequest": {
78
+ /** @example true */
79
+ input_params_sensitive?: boolean;
80
+ /** @example false */
81
+ mismatch_sensitive?: boolean;
82
+ /** @example false */
83
+ order_sensitive?: boolean;
84
+ /** @example 0.5 */
85
+ threshold?: number;
86
+ };
87
+ "request.AgentToolTrajectoryInput": {
88
+ /** @example [{"name": "search", "input": {"query": "weather"}}] */
89
+ executed_tool_calls: string;
90
+ /** @example [{"name": "search", "input": {"query": "weather"}}] */
91
+ expected_tool_calls: string;
92
+ };
93
+ "request.AnswerCompletenessRequest": {
94
+ input: components["schemas"]["request.AnswerCompletenessInput"];
95
+ };
96
+ "request.AnswerCompletenessInput": {
97
+ /** @example Paris. */
98
+ completion: string;
99
+ /** @example The capital of France is Paris. */
100
+ context: string;
101
+ /** @example What is the capital of France? */
102
+ question: string;
103
+ };
104
+ "request.AnswerCorrectnessRequest": {
105
+ input: components["schemas"]["request.AnswerCorrectnessInput"];
106
+ };
107
+ "request.AnswerCorrectnessInput": {
108
+ /** @example World War II ended in 1945. */
109
+ completion: string;
110
+ /** @example 1945 */
111
+ ground_truth: string;
112
+ /** @example What year did World War II end? */
113
+ question: string;
114
+ };
115
+ "request.AnswerRelevancyRequest": {
116
+ input: components["schemas"]["request.AnswerRelevancyInput"];
117
+ };
118
+ "request.AnswerRelevancyInput": {
119
+ /** @example The capital of France is Paris. */
120
+ answer: string;
121
+ /** @example What is the capital of France? */
122
+ question: string;
123
+ };
124
+ "request.CharCountRequest": {
125
+ input: components["schemas"]["request.CharCountInput"];
126
+ };
127
+ "request.CharCountInput": {
128
+ /** @example Hello, world! This is a sample text. */
129
+ text: string;
130
+ };
131
+ "request.CharCountRatioRequest": {
132
+ input: components["schemas"]["request.CharCountRatioInput"];
133
+ };
134
+ "request.CharCountRatioInput": {
135
+ /** @example This is a longer text for comparison */
136
+ denominator_text: string;
137
+ /** @example Short text */
138
+ numerator_text: string;
139
+ };
140
+ "request.ContextRelevanceRequest": {
141
+ config?: components["schemas"]["request.ContextRelevanceConfigRequest"];
142
+ input: components["schemas"]["request.ContextRelevanceInput"];
143
+ };
144
+ "request.ContextRelevanceConfigRequest": {
145
+ /** @example gpt-4o */
146
+ model?: string;
147
+ };
148
+ "request.ContextRelevanceInput": {
149
+ /** @example Our store is open Monday to Friday from 9am to 6pm, and Saturday from 10am to 4pm. We are closed on Sundays. */
150
+ context: string;
151
+ /** @example What are the business hours? */
152
+ query: string;
153
+ };
154
+ "request.ConversationQualityRequest": {
155
+ input: components["schemas"]["request.ConversationQualityInput"];
156
+ };
157
+ "request.ConversationQualityInput": {
158
+ /** @example ["Hi! I'd be happy to assist you today.", "We offer consulting, development, and support services."] */
159
+ completions: string;
160
+ /** @example ["Hello, how can I help?", "What services do you offer?"] */
161
+ prompts: string;
162
+ };
163
+ "request.FaithfulnessRequest": {
164
+ input: components["schemas"]["request.FaithfulnessInput"];
165
+ };
166
+ "request.FaithfulnessInput": {
167
+ /** @example The Eiffel Tower is located in Paris and was built in 1889. */
168
+ completion: string;
169
+ /** @example The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris, France. It was constructed from 1887 to 1889. */
170
+ context: string;
171
+ /** @example When was the Eiffel Tower built? */
172
+ question: string;
173
+ };
174
+ "request.HtmlComparisonRequest": {
175
+ input: components["schemas"]["request.HtmlComparisonInput"];
176
+ };
177
+ "request.HtmlComparisonInput": {
178
+ /** @example <html><body><h1>Hello, world!</h1></body></html> */
179
+ html1: string;
180
+ /** @example <html><body><h1>Hello, world!</h1></body></html> */
181
+ html2: string;
182
+ };
183
+ "request.InstructionAdherenceRequest": {
184
+ input: components["schemas"]["request.InstructionAdherenceInput"];
185
+ };
186
+ "request.InstructionAdherenceInput": {
187
+ /** @example Respond in exactly 3 bullet points and use formal language. */
188
+ instructions: string;
189
+ /**
190
+ * @example - First point about the topic
191
+ * - Second relevant consideration
192
+ * - Final concluding thought
193
+ */
194
+ response: string;
195
+ };
196
+ "request.IntentChangeRequest": {
197
+ input: components["schemas"]["request.IntentChangeInput"];
198
+ };
199
+ "request.IntentChangeInput": {
200
+ /** @example ["Sure, I can help with hotel booking", "No problem, let me search for flights"] */
201
+ completions: string;
202
+ /** @example ["I want to book a hotel", "Actually, I need a flight instead"] */
203
+ prompts: string;
204
+ };
205
+ "request.JSONValidatorRequest": {
206
+ config?: components["schemas"]["request.JSONValidatorConfigRequest"];
207
+ input: components["schemas"]["request.JSONValidatorInput"];
208
+ };
209
+ "request.JSONValidatorConfigRequest": {
210
+ /** @example true */
211
+ enable_schema_validation?: boolean;
212
+ /** @example {} */
213
+ schema_string?: string;
214
+ };
215
+ "request.JSONValidatorInput": {
216
+ /** @example {"name": "John", "age": 30} */
217
+ text: string;
218
+ };
219
+ "request.PerplexityRequest": {
220
+ input: components["schemas"]["request.PerplexityInput"];
221
+ };
222
+ "request.PerplexityInput": {
223
+ /** @example [-2.3, -1.5, -0.8, -1.2, -0.5] */
224
+ logprobs: string;
225
+ };
226
+ "request.PIIDetectorRequest": {
227
+ config?: components["schemas"]["request.PIIDetectorConfigRequest"];
228
+ input: components["schemas"]["request.PIIDetectorInput"];
229
+ };
230
+ "request.PIIDetectorConfigRequest": {
231
+ /** @example 0.8 */
232
+ probability_threshold?: number;
233
+ };
234
+ "request.PIIDetectorInput": {
235
+ /** @example Please contact John Smith at john.smith@email.com or call 555-123-4567. */
236
+ text: string;
237
+ };
238
+ "request.PlaceholderRegexRequest": {
239
+ config?: components["schemas"]["request.PlaceholderRegexConfigRequest"];
240
+ input: components["schemas"]["request.PlaceholderRegexInput"];
241
+ };
242
+ "request.PlaceholderRegexConfigRequest": {
243
+ /** @example true */
244
+ case_sensitive?: boolean;
245
+ /** @example true */
246
+ dot_include_nl?: boolean;
247
+ /** @example true */
248
+ multi_line?: boolean;
249
+ /** @example true */
250
+ should_match?: boolean;
251
+ };
252
+ "request.PlaceholderRegexInput": {
253
+ /** @example [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,} */
254
+ placeholder_value: string;
255
+ /** @example user@example.com */
256
+ text: string;
257
+ };
258
+ "request.ProfanityDetectorRequest": {
259
+ input: components["schemas"]["request.ProfanityDetectorInput"];
260
+ };
261
+ "request.ProfanityDetectorInput": {
262
+ /** @example This is a clean and professional message. */
263
+ text: string;
264
+ };
265
+ "request.PromptInjectionRequest": {
266
+ config?: components["schemas"]["request.PromptInjectionConfigRequest"];
267
+ input: components["schemas"]["request.PromptInjectionInput"];
268
+ };
269
+ "request.PromptInjectionConfigRequest": {
270
+ /** @example 0.5 */
271
+ threshold?: number;
272
+ };
273
+ "request.PromptInjectionInput": {
274
+ /** @example What is the weather like today? */
275
+ prompt: string;
276
+ };
277
+ "request.PromptPerplexityRequest": {
278
+ input: components["schemas"]["request.PromptPerplexityInput"];
279
+ };
280
+ "request.PromptPerplexityInput": {
281
+ /** @example What is the capital of France? */
282
+ prompt: string;
283
+ };
284
+ "request.RegexValidatorRequest": {
285
+ config?: components["schemas"]["request.RegexValidatorConfigRequest"];
286
+ input: components["schemas"]["request.RegexValidatorInput"];
287
+ };
288
+ "request.RegexValidatorConfigRequest": {
289
+ /** @example true */
290
+ case_sensitive?: boolean;
291
+ /** @example true */
292
+ dot_include_nl?: boolean;
293
+ /** @example true */
294
+ multi_line?: boolean;
295
+ /** @example .* */
296
+ regex?: string;
297
+ /** @example true */
298
+ should_match?: boolean;
299
+ };
300
+ "request.RegexValidatorInput": {
301
+ /** @example user@example.com */
302
+ text: string;
303
+ };
304
+ "request.SecretsDetectorRequest": {
305
+ input: components["schemas"]["request.SecretsDetectorInput"];
306
+ };
307
+ "request.SecretsDetectorInput": {
308
+ /** @example Here is some text without any API keys or passwords. */
309
+ text: string;
310
+ };
311
+ "request.SemanticSimilarityRequest": {
312
+ input: components["schemas"]["request.SemanticSimilarityInput"];
313
+ };
314
+ "request.SemanticSimilarityInput": {
315
+ /** @example The cat sat on the mat. */
316
+ completion: string;
317
+ /** @example A feline was resting on the rug. */
318
+ reference: string;
319
+ };
320
+ "request.SexismDetectorRequest": {
321
+ config?: components["schemas"]["request.SexismDetectorConfigRequest"];
322
+ input: components["schemas"]["request.SexismDetectorInput"];
323
+ };
324
+ "request.SexismDetectorConfigRequest": {
325
+ /** @example 0.5 */
326
+ threshold?: number;
327
+ };
328
+ "request.SexismDetectorInput": {
329
+ /** @example All team members should be treated equally regardless of gender. */
330
+ text: string;
331
+ };
332
+ "request.SQLValidatorRequest": {
333
+ input: components["schemas"]["request.SQLValidatorInput"];
334
+ };
335
+ "request.SQLValidatorInput": {
336
+ /** @example SELECT * FROM users WHERE id = 1; */
337
+ text: string;
338
+ };
339
+ "request.ToneDetectionRequest": {
340
+ input: components["schemas"]["request.ToneDetectionInput"];
341
+ };
342
+ "request.ToneDetectionInput": {
343
+ /** @example The capital of France is Paris. */
344
+ text: string;
345
+ };
346
+ "request.TopicAdherenceRequest": {
347
+ input: components["schemas"]["request.TopicAdherenceInput"];
348
+ };
349
+ "request.TopicAdherenceInput": {
350
+ /** @example Machine learning is a subset of AI that enables systems to learn from data. */
351
+ completion: string;
352
+ /** @example Tell me about machine learning */
353
+ question: string;
354
+ /** @example artificial intelligence, data science, algorithms */
355
+ reference_topics: string;
356
+ };
357
+ "request.ToxicityDetectorRequest": {
358
+ config?: components["schemas"]["request.ToxicityDetectorConfigRequest"];
359
+ input: components["schemas"]["request.ToxicityDetectorInput"];
360
+ };
361
+ "request.ToxicityDetectorConfigRequest": {
362
+ /** @example 0.5 */
363
+ threshold?: number;
364
+ };
365
+ "request.ToxicityDetectorInput": {
366
+ /** @example Thank you for your help with this project. */
367
+ text: string;
368
+ };
369
+ "request.UncertaintyDetectorRequest": {
370
+ input: components["schemas"]["request.UncertaintyDetectorInput"];
371
+ };
372
+ "request.UncertaintyDetectorInput": {
373
+ /** @example I am not sure, I think the capital of France is Paris. */
374
+ prompt: string;
375
+ };
376
+ "request.WordCountRequest": {
377
+ input: components["schemas"]["request.WordCountInput"];
378
+ };
379
+ "request.WordCountInput": {
380
+ /** @example This is a sample text with several words. */
381
+ text: string;
382
+ };
383
+ "request.WordCountRatioRequest": {
384
+ input: components["schemas"]["request.WordCountRatioInput"];
385
+ };
386
+ "request.WordCountRatioInput": {
387
+ /** @example This is a longer input text for comparison */
388
+ denominator_text: string;
389
+ /** @example Short response */
390
+ numerator_text: string;
391
+ };
392
+ };
393
+ responses: never;
394
+ parameters: never;
395
+ requestBodies: never;
396
+ headers: never;
397
+ pathItems: never;
398
+ }
399
+ export type $defs = Record<string, never>;
400
+ export type operations = Record<string, never>;
401
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,15 @@
1
+ export interface ImageUploadResponse {
2
+ url: string;
3
+ }
4
+ export interface ImageUploadPayload {
5
+ image_data: string;
6
+ }
7
+ export declare class ImageUploader {
8
+ private baseUrl;
9
+ private apiKey;
10
+ constructor(baseUrl: string, apiKey: string);
11
+ uploadBase64Image(traceId: string, spanId: string, imageName: string, base64ImageData: string): Promise<string>;
12
+ private getImageUrl;
13
+ private uploadImageData;
14
+ }
15
+ //# sourceMappingURL=image-uploader.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { ImageUploader } from "./image-uploader";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Represents an entity in the system that can be annotated.
3
+ * An entity is typically a unit of content or interaction that needs to be tracked or evaluated.
4
+ * It is reported as an association property before the annotation is created.
5
+ */
6
+ export interface Entity {
7
+ /**
8
+ * Unique identifier for the entity.
9
+ * This could be a user ID, conversation ID, or any other unique identifier in your system.
10
+ */
11
+ id: string;
12
+ }
13
+ /**
14
+ * Configuration options for creating a new annotation.
15
+ * Annotations are used to attach metadata, feedback, or evaluation results to specific entities.
16
+ */
17
+ export interface AnnotationCreateOptions {
18
+ /**
19
+ * The identifier of the annotation task.
20
+ * The ID or slug of the annotation task, Can be found at app.traceloop.com/annotation_tasks/:annotationTaskId */
21
+ annotationTask: string;
22
+ /**
23
+ * The entity to be annotated.
24
+ * Contains the entity's identifier and optional type information.
25
+ * Be sure to report the entity instance ID as the association property before
26
+ * in order to correctly correlate the annotation to the relevant context.
27
+ */
28
+ entity: Entity;
29
+ /**
30
+ * Key-value pairs of annotation data, should match the tags defined in the annotation task
31
+ */
32
+ tags: Record<string, TagValue>;
33
+ }
34
+ export type TagValue = string | number | string[];
35
+ //# sourceMappingURL=annotations.interface.d.ts.map
@@ -0,0 +1,105 @@
1
+ export interface DatasetCreateOptions {
2
+ name: string;
3
+ slug?: string;
4
+ description?: string;
5
+ }
6
+ export interface DatasetUpdateOptions {
7
+ name?: string;
8
+ description?: string;
9
+ }
10
+ export interface DatasetResponse {
11
+ id: string;
12
+ slug: string;
13
+ name: string;
14
+ description?: string;
15
+ version?: string;
16
+ published?: boolean;
17
+ createdAt?: string;
18
+ updatedAt?: string;
19
+ columns?: Record<string, any>;
20
+ rows?: RowResponse[];
21
+ }
22
+ export interface ColumnDefinition {
23
+ name: string;
24
+ type: "string" | "number" | "boolean" | "date" | "file";
25
+ slug?: string;
26
+ required?: boolean;
27
+ description?: string;
28
+ }
29
+ export interface ColumnResponse extends ColumnDefinition {
30
+ slug: string;
31
+ datasetId: string;
32
+ datasetSlug: string;
33
+ createdAt: string;
34
+ updatedAt: string;
35
+ }
36
+ export interface ColumnUpdateOptions {
37
+ name?: string;
38
+ type?: "string" | "number" | "boolean" | "date" | "file";
39
+ required?: boolean;
40
+ description?: string;
41
+ }
42
+ export interface RowData {
43
+ [key: string]: string | number | boolean | null | object;
44
+ }
45
+ export interface RowResponse {
46
+ id: string;
47
+ datasetId: string;
48
+ datasetSlug: string;
49
+ data: RowData;
50
+ createdAt: string;
51
+ updatedAt: string;
52
+ }
53
+ export interface RowUpdateOptions {
54
+ data: Partial<RowData>;
55
+ }
56
+ export interface DatasetListResponse {
57
+ datasets: DatasetResponse[];
58
+ total: number;
59
+ }
60
+ export interface DatasetPublishOptions {
61
+ version?: string;
62
+ description?: string;
63
+ }
64
+ export interface CSVImportOptions {
65
+ hasHeader?: boolean;
66
+ delimiter?: string;
67
+ encoding?: string;
68
+ }
69
+ export interface DatasetVersion {
70
+ version: string;
71
+ publishedBy: string;
72
+ publishedAt: string;
73
+ }
74
+ export interface DatasetVersionsResponse {
75
+ datasetId: string;
76
+ datasetSlug: string;
77
+ versions: DatasetVersion[];
78
+ total: number;
79
+ }
80
+ export type DatasetColumnValue = string | number | boolean | null | undefined;
81
+ /**
82
+ * Response from the upload URL endpoint
83
+ */
84
+ export interface UploadUrlResponse {
85
+ uploadUrl: string;
86
+ storageKey: string;
87
+ expiresAt?: string;
88
+ method?: string;
89
+ }
90
+ /**
91
+ * Request to confirm upload status
92
+ */
93
+ export interface UploadStatusRequest {
94
+ status: "success" | "failed";
95
+ metadata?: Record<string, unknown>;
96
+ }
97
+ /**
98
+ * Request to register an external URL
99
+ */
100
+ export interface ExternalUrlRequest {
101
+ type: string;
102
+ url: string;
103
+ metadata?: Record<string, unknown>;
104
+ }
105
+ //# sourceMappingURL=dataset.interface.d.ts.map
@@ -0,0 +1,83 @@
1
+ import type { EvaluatorDetails } from "./experiment.interface";
2
+ export interface StreamEvent {
3
+ type: "progress" | "result" | "error" | "complete";
4
+ data: any;
5
+ timestamp: string;
6
+ id?: string;
7
+ event?: string;
8
+ }
9
+ export interface EvaluatorRunOptions {
10
+ experimentId: string;
11
+ experimentRunId?: string;
12
+ taskId: string;
13
+ taskResult: Record<string, any>;
14
+ evaluator: EvaluatorDetails;
15
+ waitForResults?: boolean;
16
+ timeout?: number;
17
+ }
18
+ export interface EvaluatorResult {
19
+ evaluatorName: string;
20
+ taskId?: string;
21
+ score?: number;
22
+ result?: any;
23
+ metadata?: Record<string, any>;
24
+ error?: string;
25
+ }
26
+ export interface TriggerEvaluatorRequest {
27
+ experimentId: string;
28
+ experimentRunId?: string;
29
+ taskId?: string;
30
+ evaluator: EvaluatorDetails;
31
+ taskResult: Record<string, any>;
32
+ metadata?: Record<string, any>;
33
+ }
34
+ export interface TriggerEvaluatorResponse {
35
+ executionId: string;
36
+ streamUrl: string;
37
+ }
38
+ export interface SSEClientOptions {
39
+ timeout?: number;
40
+ headers?: Record<string, string>;
41
+ }
42
+ export interface StreamProgressEvent {
43
+ type: "progress";
44
+ data: {
45
+ completed: number;
46
+ total: number;
47
+ percentage: number;
48
+ currentTask?: string;
49
+ };
50
+ }
51
+ export interface StreamResultEvent {
52
+ type: "result";
53
+ data: {
54
+ taskId: string;
55
+ evaluatorName: string;
56
+ result: EvaluatorResult;
57
+ };
58
+ }
59
+ export interface StreamErrorEvent {
60
+ type: "error";
61
+ data: {
62
+ error: string;
63
+ taskId?: string;
64
+ evaluatorName?: string;
65
+ };
66
+ }
67
+ export interface StreamCompleteEvent {
68
+ type: "complete";
69
+ data: {
70
+ executionId: string;
71
+ totalResults: number;
72
+ totalErrors: number;
73
+ duration: number;
74
+ };
75
+ }
76
+ export type SSEStreamEvent = StreamProgressEvent | StreamResultEvent | StreamErrorEvent | StreamCompleteEvent;
77
+ export interface InputExtractor {
78
+ source: string;
79
+ }
80
+ export interface InputSchemaMapping {
81
+ [key: string]: InputExtractor;
82
+ }
83
+ //# sourceMappingURL=evaluator.interface.d.ts.map