@agent-os-sdk/client 0.9.25 → 0.9.27
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/dist/generated/openapi.d.ts +82 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/modules/runs.d.ts.map +1 -1
- package/dist/modules/templates.d.ts +23 -0
- package/dist/modules/templates.d.ts.map +1 -1
- package/dist/modules/templates.js +7 -0
- package/package.json +2 -2
- package/src/client/AgentOsClient.ts +0 -294
- package/src/client/HttpRequestBuilder.ts +0 -115
- package/src/client/OperationContext.ts +0 -22
- package/src/client/OperationContextProvider.ts +0 -89
- package/src/client/auth.ts +0 -136
- package/src/client/config.ts +0 -100
- package/src/client/helpers.ts +0 -98
- package/src/client/pagination.ts +0 -218
- package/src/client/raw.ts +0 -609
- package/src/client/retry.ts +0 -150
- package/src/client/sanitize.ts +0 -31
- package/src/client/timeout.ts +0 -59
- package/src/errors/factory.ts +0 -140
- package/src/errors/index.ts +0 -365
- package/src/generated/client.ts +0 -32
- package/src/generated/index.ts +0 -2
- package/src/generated/openapi.ts +0 -12302
- package/src/generated/swagger.json +0 -16851
- package/src/index.ts +0 -131
- package/src/modules/a2a.ts +0 -64
- package/src/modules/agents.ts +0 -604
- package/src/modules/apiTokens.ts +0 -101
- package/src/modules/approvals.ts +0 -151
- package/src/modules/audit.ts +0 -145
- package/src/modules/auth.ts +0 -33
- package/src/modules/catalog.ts +0 -241
- package/src/modules/chatwoot.ts +0 -242
- package/src/modules/checkpoints.ts +0 -87
- package/src/modules/contracts.ts +0 -80
- package/src/modules/credentials.ts +0 -216
- package/src/modules/crons.ts +0 -115
- package/src/modules/datasets.ts +0 -142
- package/src/modules/evaluation.ts +0 -269
- package/src/modules/files.ts +0 -208
- package/src/modules/improvements.ts +0 -71
- package/src/modules/info.ts +0 -143
- package/src/modules/me.ts +0 -74
- package/src/modules/members.ts +0 -199
- package/src/modules/memberships.ts +0 -42
- package/src/modules/metaAgent.ts +0 -131
- package/src/modules/metrics.ts +0 -34
- package/src/modules/observability.ts +0 -28
- package/src/modules/playground.ts +0 -68
- package/src/modules/presets.ts +0 -246
- package/src/modules/prompts.ts +0 -147
- package/src/modules/roles.ts +0 -112
- package/src/modules/runs.ts +0 -878
- package/src/modules/store.ts +0 -65
- package/src/modules/templates.ts +0 -40
- package/src/modules/tenants.ts +0 -79
- package/src/modules/threads.ts +0 -343
- package/src/modules/tools.ts +0 -91
- package/src/modules/traces.ts +0 -133
- package/src/modules/triggers.ts +0 -357
- package/src/modules/usage.ts +0 -117
- package/src/modules/vectorStores.ts +0 -257
- package/src/modules/workspaces.ts +0 -216
- package/src/sse/client.ts +0 -179
package/src/modules/crons.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Crons Module - Fully Typed
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { RawClient, APIResponse, components } from "../client/raw.js";
|
|
6
|
-
|
|
7
|
-
type CreateCronJobRequest = components["schemas"]["CreateCronJobRequest"];
|
|
8
|
-
type UpdateCronJobRequest = components["schemas"]["UpdateCronJobRequest"];
|
|
9
|
-
|
|
10
|
-
export interface CronJob {
|
|
11
|
-
id: string;
|
|
12
|
-
workspace_id: string;
|
|
13
|
-
agent_id: string;
|
|
14
|
-
agent_version_id?: string;
|
|
15
|
-
schedule: string;
|
|
16
|
-
input?: unknown;
|
|
17
|
-
enabled: boolean;
|
|
18
|
-
last_run_at?: string;
|
|
19
|
-
next_run_at?: string;
|
|
20
|
-
created_at: string;
|
|
21
|
-
updated_at: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface CronJobListResponse {
|
|
25
|
-
items: CronJob[];
|
|
26
|
-
total: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface CronTriggerResponse {
|
|
30
|
-
run_id: string;
|
|
31
|
-
triggered_at: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export class CronsModule {
|
|
35
|
-
constructor(private client: RawClient, private headers: () => Record<string, string>) { }
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* List all cron jobs.
|
|
39
|
-
*/
|
|
40
|
-
async list(params?: {
|
|
41
|
-
workspace_id?: string;
|
|
42
|
-
agent_id?: string;
|
|
43
|
-
enabled?: boolean;
|
|
44
|
-
limit?: number;
|
|
45
|
-
offset?: number;
|
|
46
|
-
}): Promise<APIResponse<CronJobListResponse>> {
|
|
47
|
-
return this.client.GET<CronJobListResponse>("/v1/api/crons", {
|
|
48
|
-
params: { query: params },
|
|
49
|
-
headers: this.headers(),
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Get a cron job by ID.
|
|
55
|
-
*/
|
|
56
|
-
async get(cronId: string): Promise<APIResponse<CronJob>> {
|
|
57
|
-
return this.client.GET<CronJob>("/v1/api/crons/{id}", {
|
|
58
|
-
params: { path: { id: cronId } },
|
|
59
|
-
headers: this.headers(),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Create a new cron job.
|
|
65
|
-
*/
|
|
66
|
-
async create(body: {
|
|
67
|
-
workspace_id?: string;
|
|
68
|
-
agent_id: string;
|
|
69
|
-
agent_version_id?: string;
|
|
70
|
-
schedule: string;
|
|
71
|
-
input?: unknown;
|
|
72
|
-
enabled?: boolean;
|
|
73
|
-
}): Promise<APIResponse<CronJob>> {
|
|
74
|
-
return this.client.POST<CronJob>("/v1/api/crons", {
|
|
75
|
-
body,
|
|
76
|
-
headers: this.headers(),
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Update a cron job.
|
|
82
|
-
* Uses PATCH per backend CronsController.
|
|
83
|
-
*/
|
|
84
|
-
async update(cronId: string, body: {
|
|
85
|
-
schedule?: string;
|
|
86
|
-
enabled?: boolean;
|
|
87
|
-
input?: unknown;
|
|
88
|
-
}): Promise<APIResponse<CronJob>> {
|
|
89
|
-
return this.client.PATCH<CronJob>("/v1/api/crons/{id}", {
|
|
90
|
-
params: { path: { id: cronId } },
|
|
91
|
-
body,
|
|
92
|
-
headers: this.headers(),
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Delete a cron job.
|
|
98
|
-
*/
|
|
99
|
-
async delete(cronId: string): Promise<APIResponse<void>> {
|
|
100
|
-
return this.client.DELETE<void>("/v1/api/crons/{id}", {
|
|
101
|
-
params: { path: { id: cronId } },
|
|
102
|
-
headers: this.headers(),
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Manually trigger a cron job.
|
|
108
|
-
*/
|
|
109
|
-
async trigger(cronId: string): Promise<APIResponse<CronTriggerResponse>> {
|
|
110
|
-
return this.client.POST<CronTriggerResponse>("/v1/api/crons/{id}/trigger", {
|
|
111
|
-
params: { path: { id: cronId } },
|
|
112
|
-
headers: this.headers(),
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
package/src/modules/datasets.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Datasets Module — Evaluation datasets and examples.
|
|
3
|
-
*
|
|
4
|
-
* Endpoints: /v1/api/datasets
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
8
|
-
|
|
9
|
-
// =============================================================================
|
|
10
|
-
// Types
|
|
11
|
-
// =============================================================================
|
|
12
|
-
|
|
13
|
-
export interface Dataset {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
agent_id?: string;
|
|
18
|
-
example_count: number;
|
|
19
|
-
created_at: string;
|
|
20
|
-
updated_at: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface DatasetExample {
|
|
24
|
-
id: string;
|
|
25
|
-
dataset_id: string;
|
|
26
|
-
input: unknown;
|
|
27
|
-
expected_output?: unknown;
|
|
28
|
-
metadata?: unknown;
|
|
29
|
-
created_at: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface ExampleInput {
|
|
33
|
-
input: unknown;
|
|
34
|
-
expected_output?: unknown;
|
|
35
|
-
metadata?: unknown;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// =============================================================================
|
|
39
|
-
// Module
|
|
40
|
-
// =============================================================================
|
|
41
|
-
|
|
42
|
-
export class DatasetsModule {
|
|
43
|
-
constructor(private client: RawClient, private headers: () => Record<string, string>) { }
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* List datasets in the workspace.
|
|
47
|
-
*/
|
|
48
|
-
async list(params?: {
|
|
49
|
-
skip?: number;
|
|
50
|
-
take?: number;
|
|
51
|
-
}): Promise<APIResponse<Dataset[]>> {
|
|
52
|
-
return this.client.GET<Dataset[]>("/v1/api/datasets", {
|
|
53
|
-
params: { query: params },
|
|
54
|
-
headers: this.headers(),
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Get a specific dataset by ID.
|
|
60
|
-
*/
|
|
61
|
-
async get(datasetId: string): Promise<APIResponse<Dataset>> {
|
|
62
|
-
return this.client.GET<Dataset>("/v1/api/datasets/{id}", {
|
|
63
|
-
params: { path: { id: datasetId } },
|
|
64
|
-
headers: this.headers(),
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Create a new evaluation dataset.
|
|
70
|
-
*/
|
|
71
|
-
async create(body: {
|
|
72
|
-
name: string;
|
|
73
|
-
description?: string;
|
|
74
|
-
agent_id?: string;
|
|
75
|
-
}): Promise<APIResponse<Dataset>> {
|
|
76
|
-
return this.client.POST<Dataset>("/v1/api/datasets", {
|
|
77
|
-
body,
|
|
78
|
-
headers: this.headers(),
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Update a dataset (partial update).
|
|
84
|
-
*/
|
|
85
|
-
async update(datasetId: string, body: {
|
|
86
|
-
name?: string;
|
|
87
|
-
description?: string;
|
|
88
|
-
agent_id?: string;
|
|
89
|
-
}): Promise<APIResponse<Dataset>> {
|
|
90
|
-
return this.client.PATCH<Dataset>("/v1/api/datasets/{id}", {
|
|
91
|
-
params: { path: { id: datasetId } },
|
|
92
|
-
body,
|
|
93
|
-
headers: this.headers(),
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Soft delete a dataset.
|
|
99
|
-
*/
|
|
100
|
-
async delete(datasetId: string): Promise<APIResponse<void>> {
|
|
101
|
-
return this.client.DELETE<void>("/v1/api/datasets/{id}", {
|
|
102
|
-
params: { path: { id: datasetId } },
|
|
103
|
-
headers: this.headers(),
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// ======================== Examples ========================
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* List examples for a dataset.
|
|
111
|
-
*/
|
|
112
|
-
async listExamples(datasetId: string, params?: {
|
|
113
|
-
skip?: number;
|
|
114
|
-
take?: number;
|
|
115
|
-
}): Promise<APIResponse<DatasetExample[]>> {
|
|
116
|
-
return this.client.GET<DatasetExample[]>("/v1/api/datasets/{id}/examples", {
|
|
117
|
-
params: { path: { id: datasetId }, query: params },
|
|
118
|
-
headers: this.headers(),
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Add examples to a dataset (batch).
|
|
124
|
-
*/
|
|
125
|
-
async addExamples(datasetId: string, examples: ExampleInput[]): Promise<APIResponse<DatasetExample[]>> {
|
|
126
|
-
return this.client.POST<DatasetExample[]>("/v1/api/datasets/{id}/examples", {
|
|
127
|
-
params: { path: { id: datasetId } },
|
|
128
|
-
body: { examples },
|
|
129
|
-
headers: this.headers(),
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Delete a specific example.
|
|
135
|
-
*/
|
|
136
|
-
async deleteExample(datasetId: string, exampleId: string): Promise<APIResponse<void>> {
|
|
137
|
-
return this.client.DELETE<void>("/v1/api/datasets/{id}/examples/{exampleId}", {
|
|
138
|
-
params: { path: { id: datasetId, exampleId } },
|
|
139
|
-
headers: this.headers(),
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
}
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Evaluation Module - Fully Typed
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { RawClient, APIResponse, components } from "../client/raw.js";
|
|
6
|
-
|
|
7
|
-
type CreateDatasetRequest = components["schemas"]["CreateDatasetRequest"];
|
|
8
|
-
type CreateExperimentRequest = components["schemas"]["CreateExperimentRequest"];
|
|
9
|
-
export type ExampleData = components["schemas"]["ExampleData"];
|
|
10
|
-
|
|
11
|
-
export interface EvalDataset {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
workspace_id: string;
|
|
16
|
-
agent_id?: string;
|
|
17
|
-
example_count: number;
|
|
18
|
-
created_at: string;
|
|
19
|
-
updated_at: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface DatasetListResponse {
|
|
23
|
-
items: EvalDataset[];
|
|
24
|
-
total: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface Experiment {
|
|
28
|
-
id: string;
|
|
29
|
-
dataset_id: string;
|
|
30
|
-
agent_id: string;
|
|
31
|
-
agent_version_id?: string;
|
|
32
|
-
name?: string;
|
|
33
|
-
status: "pending" | "running" | "completed" | "failed";
|
|
34
|
-
config?: Record<string, unknown>;
|
|
35
|
-
results?: ExperimentResults;
|
|
36
|
-
created_at: string;
|
|
37
|
-
completed_at?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ExperimentResults {
|
|
41
|
-
total_examples: number;
|
|
42
|
-
passed: number;
|
|
43
|
-
failed: number;
|
|
44
|
-
metrics?: Record<string, number>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface ExperimentListResponse {
|
|
48
|
-
items: Experiment[];
|
|
49
|
-
total: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface DatasetExample {
|
|
53
|
-
id: string;
|
|
54
|
-
dataset_id: string;
|
|
55
|
-
input: unknown;
|
|
56
|
-
expected_output?: unknown;
|
|
57
|
-
metadata?: Record<string, unknown>;
|
|
58
|
-
created_at: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface ExamplesListResponse {
|
|
62
|
-
items: DatasetExample[];
|
|
63
|
-
total: number;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface KpiAggregate {
|
|
67
|
-
kpi_key: string;
|
|
68
|
-
kpi_binding_version: string;
|
|
69
|
-
source_scope: string;
|
|
70
|
-
unit?: string | null;
|
|
71
|
-
events_n: number;
|
|
72
|
-
runs_n: number;
|
|
73
|
-
threads_n: number;
|
|
74
|
-
outcome_linked_n: number;
|
|
75
|
-
numeric_values_n: number;
|
|
76
|
-
value_number_sum?: number | null;
|
|
77
|
-
value_number_avg?: number | null;
|
|
78
|
-
value_number_min?: number | null;
|
|
79
|
-
value_number_max?: number | null;
|
|
80
|
-
first_recorded_at: string;
|
|
81
|
-
last_recorded_at: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface KpiAggregateListResponse {
|
|
85
|
-
items: KpiAggregate[];
|
|
86
|
-
total: number;
|
|
87
|
-
skip: number;
|
|
88
|
-
take: number;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface KpiAlert {
|
|
92
|
-
alert_code: string;
|
|
93
|
-
severity: "critical" | "warning" | "info";
|
|
94
|
-
kpi_key: string;
|
|
95
|
-
kpi_binding_version?: string | null;
|
|
96
|
-
source_scope?: string | null;
|
|
97
|
-
message: string;
|
|
98
|
-
events_n: number;
|
|
99
|
-
numeric_values_n: number;
|
|
100
|
-
outcome_linked_n: number;
|
|
101
|
-
first_recorded_at?: string | null;
|
|
102
|
-
last_recorded_at?: string | null;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface KpiAlertListResponse {
|
|
106
|
-
items: KpiAlert[];
|
|
107
|
-
total: number;
|
|
108
|
-
skip: number;
|
|
109
|
-
take: number;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export class EvaluationModule {
|
|
113
|
-
constructor(private client: RawClient, private headers: () => Record<string, string>) { }
|
|
114
|
-
|
|
115
|
-
// ======================== Datasets ========================
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* List all evaluation datasets.
|
|
119
|
-
*/
|
|
120
|
-
async listDatasets(params?: {
|
|
121
|
-
workspace_id?: string;
|
|
122
|
-
agent_id?: string;
|
|
123
|
-
limit?: number;
|
|
124
|
-
offset?: number;
|
|
125
|
-
}): Promise<APIResponse<DatasetListResponse>> {
|
|
126
|
-
return this.client.GET<DatasetListResponse>("/v1/api/evaluations/datasets", {
|
|
127
|
-
params: { query: params },
|
|
128
|
-
headers: this.headers(),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Get a dataset by ID.
|
|
134
|
-
*/
|
|
135
|
-
async getDataset(datasetId: string): Promise<APIResponse<EvalDataset>> {
|
|
136
|
-
return this.client.GET<EvalDataset>("/v1/api/evaluations/datasets/{id}", {
|
|
137
|
-
params: { path: { id: datasetId } },
|
|
138
|
-
headers: this.headers(),
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Create a new dataset.
|
|
144
|
-
*/
|
|
145
|
-
async createDataset(body: {
|
|
146
|
-
name: string;
|
|
147
|
-
description?: string;
|
|
148
|
-
agent_id?: string;
|
|
149
|
-
}): Promise<APIResponse<EvalDataset>> {
|
|
150
|
-
return this.client.POST<EvalDataset>("/v1/api/evaluations/datasets", {
|
|
151
|
-
body,
|
|
152
|
-
headers: this.headers(),
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Delete a dataset.
|
|
158
|
-
*/
|
|
159
|
-
async deleteDataset(datasetId: string): Promise<APIResponse<void>> {
|
|
160
|
-
return this.client.DELETE<void>("/v1/api/evaluations/datasets/{id}", {
|
|
161
|
-
params: { path: { id: datasetId } },
|
|
162
|
-
headers: this.headers(),
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// ======================== Examples ========================
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* List examples in a dataset.
|
|
170
|
-
*/
|
|
171
|
-
async listExamples(datasetId: string, params?: {
|
|
172
|
-
limit?: number;
|
|
173
|
-
offset?: number;
|
|
174
|
-
}): Promise<APIResponse<ExamplesListResponse>> {
|
|
175
|
-
return this.client.GET<ExamplesListResponse>("/v1/api/evaluations/datasets/{id}/examples", {
|
|
176
|
-
params: { path: { id: datasetId }, query: params },
|
|
177
|
-
headers: this.headers(),
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Add examples to a dataset.
|
|
183
|
-
*/
|
|
184
|
-
async addExamples(datasetId: string, examples: ExampleData[]): Promise<APIResponse<void>> {
|
|
185
|
-
return this.client.POST<void>("/v1/api/evaluations/datasets/{id}/examples", {
|
|
186
|
-
params: { path: { id: datasetId } },
|
|
187
|
-
body: { examples },
|
|
188
|
-
headers: this.headers(),
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// ======================== Experiments ========================
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* List all experiments.
|
|
196
|
-
*/
|
|
197
|
-
async listExperiments(params?: {
|
|
198
|
-
dataset_id?: string;
|
|
199
|
-
agent_id?: string;
|
|
200
|
-
status?: string;
|
|
201
|
-
limit?: number;
|
|
202
|
-
offset?: number;
|
|
203
|
-
}): Promise<APIResponse<ExperimentListResponse>> {
|
|
204
|
-
return this.client.GET<ExperimentListResponse>("/v1/api/evaluations/experiments", {
|
|
205
|
-
params: { query: params },
|
|
206
|
-
headers: this.headers(),
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Get an experiment by ID.
|
|
212
|
-
*/
|
|
213
|
-
async getExperiment(experimentId: string): Promise<APIResponse<Experiment>> {
|
|
214
|
-
return this.client.GET<Experiment>("/v1/api/evaluations/experiments/{id}", {
|
|
215
|
-
params: { path: { id: experimentId } },
|
|
216
|
-
headers: this.headers(),
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Create a new experiment.
|
|
222
|
-
*/
|
|
223
|
-
async createExperiment(body: {
|
|
224
|
-
dataset_id: string;
|
|
225
|
-
agent_id: string;
|
|
226
|
-
agent_version_id?: string;
|
|
227
|
-
name?: string;
|
|
228
|
-
config?: Record<string, unknown>;
|
|
229
|
-
}): Promise<APIResponse<Experiment>> {
|
|
230
|
-
return this.client.POST<Experiment>("/v1/api/evaluations/experiments", {
|
|
231
|
-
body,
|
|
232
|
-
headers: this.headers(),
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
async listKpiAggregates(params?: {
|
|
237
|
-
runId?: string;
|
|
238
|
-
threadId?: string;
|
|
239
|
-
kpiKey?: string;
|
|
240
|
-
kpiBindingVersion?: string;
|
|
241
|
-
sourceScope?: string;
|
|
242
|
-
recordedAfter?: string;
|
|
243
|
-
recordedBefore?: string;
|
|
244
|
-
skip?: number;
|
|
245
|
-
take?: number;
|
|
246
|
-
}): Promise<APIResponse<KpiAggregateListResponse>> {
|
|
247
|
-
return this.client.GET<KpiAggregateListResponse>("/v1/api/evaluations/kpi-results/aggregates", {
|
|
248
|
-
params: { query: params },
|
|
249
|
-
headers: this.headers(),
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
async listKpiAlerts(params?: {
|
|
254
|
-
runId?: string;
|
|
255
|
-
threadId?: string;
|
|
256
|
-
kpiKey?: string;
|
|
257
|
-
sourceScope?: string;
|
|
258
|
-
recordedAfter?: string;
|
|
259
|
-
recordedBefore?: string;
|
|
260
|
-
staleAfterHours?: number;
|
|
261
|
-
skip?: number;
|
|
262
|
-
take?: number;
|
|
263
|
-
}): Promise<APIResponse<KpiAlertListResponse>> {
|
|
264
|
-
return this.client.GET<KpiAlertListResponse>("/v1/api/evaluations/kpi-results/alerts", {
|
|
265
|
-
params: { query: params },
|
|
266
|
-
headers: this.headers(),
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
}
|