@inkeep/agents-core 0.41.2 → 0.42.0
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/api-client/base-client.d.ts +87 -8
- package/dist/api-client/base-client.js +174 -1
- package/dist/api-client/eval-api-client.d.ts +47 -0
- package/dist/api-client/eval-api-client.js +65 -0
- package/dist/api-client/index.d.ts +4 -0
- package/dist/api-client/index.js +5 -0
- package/dist/api-client/manage-api-client.d.ts +34 -0
- package/dist/api-client/manage-api-client.js +104 -0
- package/dist/auth/auth.d.ts +86 -20
- package/dist/auth/auth.js +55 -1
- package/dist/auth/authz/client.d.ts +81 -0
- package/dist/auth/authz/client.js +189 -0
- package/dist/auth/authz/config.d.ts +76 -0
- package/dist/auth/authz/config.js +76 -0
- package/dist/auth/authz/index.d.ts +5 -0
- package/dist/auth/authz/index.js +6 -0
- package/dist/auth/authz/permissions.d.ts +57 -0
- package/dist/auth/authz/permissions.js +83 -0
- package/dist/auth/authz/sync.d.ts +85 -0
- package/dist/auth/authz/sync.js +237 -0
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/auth/permissions.js +2 -181
- package/dist/client-exports.d.ts +8 -3
- package/dist/client-exports.js +3 -2
- package/dist/constants/context-breakdown.d.ts +61 -0
- package/dist/constants/context-breakdown.js +124 -0
- package/dist/constants/otel-attributes.d.ts +4 -0
- package/dist/constants/otel-attributes.js +4 -0
- package/dist/context/ContextConfig.d.ts +2 -2
- package/dist/context/ContextConfig.js +3 -3
- package/dist/context/TemplateEngine.js +0 -1
- package/dist/context/index.d.ts +1 -5
- package/dist/context/index.js +1 -5
- package/dist/credential-stuffer/CredentialStuffer.d.ts +1 -1
- package/dist/data-access/index.d.ts +34 -26
- package/dist/data-access/index.js +34 -26
- package/dist/data-access/manage/agentFull.d.ts +36 -0
- package/dist/data-access/{agentFull.js → manage/agentFull.js} +205 -7
- package/dist/data-access/{agents.d.ts → manage/agents.d.ts} +23 -22
- package/dist/data-access/{agents.js → manage/agents.js} +52 -7
- package/dist/data-access/{artifactComponents.d.ts → manage/artifactComponents.d.ts} +21 -21
- package/dist/data-access/{artifactComponents.js → manage/artifactComponents.js} +5 -5
- package/dist/data-access/{contextConfigs.d.ts → manage/contextConfigs.d.ts} +14 -14
- package/dist/data-access/{contextConfigs.js → manage/contextConfigs.js} +3 -3
- package/dist/data-access/{credentialReferences.d.ts → manage/credentialReferences.d.ts} +17 -17
- package/dist/data-access/{credentialReferences.js → manage/credentialReferences.js} +2 -2
- package/dist/data-access/{dataComponents.d.ts → manage/dataComponents.d.ts} +20 -20
- package/dist/data-access/{dataComponents.js → manage/dataComponents.js} +7 -7
- package/dist/data-access/manage/evalConfig.d.ts +221 -0
- package/dist/data-access/manage/evalConfig.js +275 -0
- package/dist/data-access/{externalAgents.d.ts → manage/externalAgents.d.ts} +16 -16
- package/dist/data-access/{externalAgents.js → manage/externalAgents.js} +2 -2
- package/dist/data-access/{functionTools.d.ts → manage/functionTools.d.ts} +65 -15
- package/dist/data-access/{functionTools.js → manage/functionTools.js} +90 -8
- package/dist/data-access/{functions.d.ts → manage/functions.d.ts} +9 -9
- package/dist/data-access/{functions.js → manage/functions.js} +3 -3
- package/dist/data-access/manage/projectFull.d.ts +38 -0
- package/dist/data-access/{projectFull.js → manage/projectFull.js} +64 -65
- package/dist/data-access/manage/projectLifecycle.d.ts +119 -0
- package/dist/data-access/manage/projectLifecycle.js +234 -0
- package/dist/data-access/manage/projects.d.ts +75 -0
- package/dist/data-access/{projects.js → manage/projects.js} +15 -16
- package/dist/data-access/{subAgentExternalAgentRelations.d.ts → manage/subAgentExternalAgentRelations.d.ts} +19 -19
- package/dist/data-access/{subAgentExternalAgentRelations.js → manage/subAgentExternalAgentRelations.js} +2 -2
- package/dist/data-access/{subAgentRelations.d.ts → manage/subAgentRelations.d.ts} +29 -29
- package/dist/data-access/{subAgentRelations.js → manage/subAgentRelations.js} +3 -3
- package/dist/data-access/{subAgentTeamAgentRelations.d.ts → manage/subAgentTeamAgentRelations.d.ts} +19 -19
- package/dist/data-access/{subAgentTeamAgentRelations.js → manage/subAgentTeamAgentRelations.js} +2 -2
- package/dist/data-access/{subAgents.d.ts → manage/subAgents.d.ts} +13 -13
- package/dist/data-access/{subAgents.js → manage/subAgents.js} +4 -4
- package/dist/data-access/{tools.d.ts → manage/tools.d.ts} +26 -19
- package/dist/data-access/{tools.js → manage/tools.js} +57 -35
- package/dist/data-access/manage/triggers.d.ts +80 -0
- package/dist/data-access/manage/triggers.js +81 -0
- package/dist/data-access/{apiKeys.d.ts → runtime/apiKeys.d.ts} +17 -17
- package/dist/data-access/{apiKeys.js → runtime/apiKeys.js} +3 -3
- package/dist/data-access/runtime/cascade-delete.d.ts +77 -0
- package/dist/data-access/runtime/cascade-delete.js +111 -0
- package/dist/data-access/{contextCache.d.ts → runtime/contextCache.d.ts} +13 -13
- package/dist/data-access/{contextCache.js → runtime/contextCache.js} +5 -5
- package/dist/data-access/{conversations.d.ts → runtime/conversations.d.ts} +68 -19
- package/dist/data-access/{conversations.js → runtime/conversations.js} +13 -7
- package/dist/data-access/runtime/evalRuns.d.ts +120 -0
- package/dist/data-access/runtime/evalRuns.js +168 -0
- package/dist/data-access/{ledgerArtifacts.d.ts → runtime/ledgerArtifacts.d.ts} +13 -13
- package/dist/data-access/{ledgerArtifacts.js → runtime/ledgerArtifacts.js} +3 -3
- package/dist/data-access/{messages.d.ts → runtime/messages.d.ts} +15 -15
- package/dist/data-access/{messages.js → runtime/messages.js} +2 -2
- package/dist/data-access/{organizations.d.ts → runtime/organizations.d.ts} +16 -7
- package/dist/data-access/{organizations.js → runtime/organizations.js} +15 -3
- package/dist/data-access/runtime/projects.d.ts +62 -0
- package/dist/data-access/runtime/projects.js +90 -0
- package/dist/data-access/runtime/tasks.d.ts +55 -0
- package/dist/data-access/{tasks.js → runtime/tasks.js} +2 -2
- package/dist/data-access/runtime/triggerInvocations.d.ts +62 -0
- package/dist/data-access/runtime/triggerInvocations.js +54 -0
- package/dist/data-access/runtime/users.d.ts +19 -0
- package/dist/data-access/{users.js → runtime/users.js} +2 -2
- package/dist/data-access/validation.d.ts +4 -4
- package/dist/data-access/validation.js +1 -1
- package/dist/db/clean.d.ts +8 -4
- package/dist/db/clean.js +14 -105
- package/dist/db/delete.d.ts +1 -1
- package/dist/db/delete.js +7 -10
- package/dist/db/manage/dolt-cleanup.d.ts +51 -0
- package/dist/db/manage/dolt-cleanup.js +132 -0
- package/dist/db/manage/manage-client.d.ts +26 -0
- package/dist/db/manage/manage-client.js +68 -0
- package/dist/db/{schema.d.ts → manage/manage-schema.d.ts} +1459 -1285
- package/dist/db/{schema.js → manage/manage-schema.js} +433 -341
- package/dist/db/manage/test-manage-client.d.ts +27 -0
- package/dist/db/manage/test-manage-client.js +68 -0
- package/dist/db/runtime/runtime-client.d.ts +20 -0
- package/dist/db/runtime/runtime-client.js +30 -0
- package/dist/db/runtime/runtime-schema.d.ts +2834 -0
- package/dist/db/runtime/runtime-schema.js +483 -0
- package/dist/db/runtime/test-runtime-client.d.ts +27 -0
- package/dist/db/{test-client.js → runtime/test-runtime-client.js} +11 -25
- package/dist/dolt/branch.d.ts +62 -0
- package/dist/dolt/branch.js +82 -0
- package/dist/dolt/branches-api.d.ts +108 -0
- package/dist/dolt/branches-api.js +162 -0
- package/dist/dolt/commit.d.ts +94 -0
- package/dist/dolt/commit.js +103 -0
- package/dist/dolt/diff.d.ts +27 -0
- package/dist/dolt/diff.js +21 -0
- package/dist/dolt/index.d.ts +10 -0
- package/dist/dolt/index.js +11 -0
- package/dist/dolt/merge.d.ts +63 -0
- package/dist/dolt/merge.js +81 -0
- package/dist/dolt/migrate-all-branches.d.ts +4 -0
- package/dist/dolt/migrate-all-branches.js +78 -0
- package/dist/dolt/migrate-dolt.d.ts +1 -0
- package/dist/dolt/migrate-dolt.js +22 -0
- package/dist/dolt/ref-helpers.d.ts +19 -0
- package/dist/dolt/ref-helpers.js +65 -0
- package/dist/dolt/ref-middleware.d.ts +82 -0
- package/dist/dolt/ref-middleware.js +217 -0
- package/dist/dolt/ref-scope.d.ts +101 -0
- package/dist/dolt/ref-scope.js +231 -0
- package/dist/dolt/schema-sync.d.ts +134 -0
- package/dist/dolt/schema-sync.js +246 -0
- package/dist/env.d.ts +6 -4
- package/dist/env.js +3 -2
- package/dist/index.d.ts +71 -44
- package/dist/index.js +74 -47
- package/dist/types/entities.d.ts +81 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +45 -4
- package/dist/utils/JsonTransformer.d.ts +44 -0
- package/dist/utils/JsonTransformer.js +112 -0
- package/dist/utils/apiKeys.d.ts +5 -1
- package/dist/utils/apiKeys.js +11 -1
- package/dist/utils/colors.d.ts +34 -0
- package/dist/utils/colors.js +49 -0
- package/dist/utils/credential-store-utils.d.ts +1 -1
- package/dist/utils/format-messages.d.ts +1 -1
- package/dist/utils/index.d.ts +7 -3
- package/dist/utils/index.js +7 -3
- package/dist/utils/internal-service-auth.d.ts +79 -0
- package/dist/utils/internal-service-auth.js +140 -0
- package/dist/utils/jwt-helpers.d.ts +56 -0
- package/dist/utils/jwt-helpers.js +90 -0
- package/dist/utils/service-token-auth.d.ts +9 -27
- package/dist/utils/service-token-auth.js +48 -96
- package/dist/utils/template-interpolation.d.ts +22 -0
- package/dist/utils/template-interpolation.js +62 -0
- package/dist/utils/third-party-mcp-servers/composio-client.js +23 -23
- package/dist/utils/trigger-auth.d.ts +62 -0
- package/dist/utils/trigger-auth.js +125 -0
- package/dist/validation/agentFull.js +2 -4
- package/dist/validation/dolt-schemas.d.ts +49 -0
- package/dist/validation/dolt-schemas.js +44 -0
- package/dist/validation/drizzle-schema-helpers.d.ts +4 -26
- package/dist/validation/drizzle-schema-helpers.js +5 -151
- package/dist/validation/index.d.ts +4 -3
- package/dist/validation/index.js +3 -2
- package/dist/validation/schemas.d.ts +17647 -4789
- package/dist/validation/schemas.js +328 -11
- package/drizzle/manage/0000_tearful_rhodey.sql +414 -0
- package/drizzle/manage/0001_broken_wendell_vaughn.sql +19 -0
- package/drizzle/manage/0002_bent_sunfire.sql +1 -0
- package/drizzle/manage/meta/0000_snapshot.json +2987 -0
- package/drizzle/manage/meta/0001_snapshot.json +3115 -0
- package/drizzle/manage/meta/0002_snapshot.json +3115 -0
- package/drizzle/manage/meta/_journal.json +27 -0
- package/drizzle/runtime/0008_silly_preak.sql +127 -0
- package/drizzle/runtime/0009_freezing_leo.sql +17 -0
- package/drizzle/runtime/meta/0008_snapshot.json +2263 -0
- package/drizzle/runtime/meta/0009_snapshot.json +2397 -0
- package/drizzle/{meta → runtime/meta}/_journal.json +14 -0
- package/package.json +48 -15
- package/dist/context/ContextFetcher.d.ts +0 -73
- package/dist/context/ContextFetcher.js +0 -291
- package/dist/context/ContextResolver.d.ts +0 -60
- package/dist/context/ContextResolver.js +0 -278
- package/dist/context/context.d.ts +0 -27
- package/dist/context/context.js +0 -128
- package/dist/context/contextCache.d.ts +0 -58
- package/dist/context/contextCache.js +0 -177
- package/dist/data-access/agentFull.d.ts +0 -33
- package/dist/data-access/projectFull.d.ts +0 -32
- package/dist/data-access/projects.d.ts +0 -71
- package/dist/data-access/tasks.d.ts +0 -45
- package/dist/data-access/users.d.ts +0 -19
- package/dist/db/client.d.ts +0 -20
- package/dist/db/client.js +0 -28
- package/dist/db/test-client.d.ts +0 -31
- package/dist/middleware/contextValidation.d.ts +0 -46
- package/dist/middleware/contextValidation.js +0 -280
- package/dist/middleware/index.d.ts +0 -2
- package/dist/middleware/index.js +0 -3
- package/dist/utils/execution.d.ts +0 -22
- package/dist/utils/execution.js +0 -25
- /package/drizzle/{0000_exotic_mysterio.sql → runtime/0000_exotic_mysterio.sql} +0 -0
- /package/drizzle/{0001_calm_sheva_callister.sql → runtime/0001_calm_sheva_callister.sql} +0 -0
- /package/drizzle/{0002_puzzling_goblin_queen.sql → runtime/0002_puzzling_goblin_queen.sql} +0 -0
- /package/drizzle/{0003_sweet_human_robot.sql → runtime/0003_sweet_human_robot.sql} +0 -0
- /package/drizzle/{0004_cuddly_shooting_star.sql → runtime/0004_cuddly_shooting_star.sql} +0 -0
- /package/drizzle/{0005_reflective_starfox.sql → runtime/0005_reflective_starfox.sql} +0 -0
- /package/drizzle/{0006_stale_thaddeus_ross.sql → runtime/0006_stale_thaddeus_ross.sql} +0 -0
- /package/drizzle/{0007_slim_karma.sql → runtime/0007_slim_karma.sql} +0 -0
- /package/drizzle/{meta → runtime/meta}/0000_snapshot.json +0 -0
- /package/drizzle/{meta → runtime/meta}/0001_snapshot.json +0 -0
- /package/drizzle/{meta → runtime/meta}/0003_snapshot.json +0 -0
- /package/drizzle/{meta → runtime/meta}/0005_snapshot.json +0 -0
- /package/drizzle/{meta → runtime/meta}/0006_snapshot.json +0 -0
- /package/drizzle/{meta → runtime/meta}/0007_snapshot.json +0 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { PaginationConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../types/utility.js";
|
|
2
|
+
import "../../types/index.js";
|
|
3
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
4
|
+
import { DataComponentInsert, DataComponentSelect, DataComponentUpdate } from "../../types/entities.js";
|
|
5
5
|
|
|
6
|
-
//#region src/data-access/dataComponents.d.ts
|
|
6
|
+
//#region src/data-access/manage/dataComponents.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Get a data component by ID
|
|
9
9
|
*/
|
|
10
|
-
declare const getDataComponent: (db:
|
|
10
|
+
declare const getDataComponent: (db: AgentsManageDatabaseClient) => (params: {
|
|
11
11
|
scopes: ProjectScopeConfig;
|
|
12
12
|
dataComponentId: string;
|
|
13
13
|
}) => Promise<DataComponentSelect | null>;
|
|
14
14
|
/**
|
|
15
15
|
* List all data components for a tenant/project
|
|
16
16
|
*/
|
|
17
|
-
declare const listDataComponents: (db:
|
|
17
|
+
declare const listDataComponents: (db: AgentsManageDatabaseClient) => (params: {
|
|
18
18
|
scopes: ProjectScopeConfig;
|
|
19
19
|
}) => Promise<DataComponentSelect[]>;
|
|
20
20
|
/**
|
|
21
21
|
* List data components with pagination
|
|
22
22
|
*/
|
|
23
|
-
declare const listDataComponentsPaginated: (db:
|
|
23
|
+
declare const listDataComponentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
24
24
|
scopes: ProjectScopeConfig;
|
|
25
25
|
pagination?: PaginationConfig;
|
|
26
26
|
}) => Promise<{
|
|
@@ -35,11 +35,11 @@ declare const listDataComponentsPaginated: (db: DatabaseClient) => (params: {
|
|
|
35
35
|
/**
|
|
36
36
|
* Create a new data component
|
|
37
37
|
*/
|
|
38
|
-
declare const createDataComponent: (db:
|
|
38
|
+
declare const createDataComponent: (db: AgentsManageDatabaseClient) => (params: DataComponentInsert) => Promise<DataComponentSelect>;
|
|
39
39
|
/**
|
|
40
40
|
* Update a data component
|
|
41
41
|
*/
|
|
42
|
-
declare const updateDataComponent: (db:
|
|
42
|
+
declare const updateDataComponent: (db: AgentsManageDatabaseClient) => (params: {
|
|
43
43
|
scopes: ProjectScopeConfig;
|
|
44
44
|
dataComponentId: string;
|
|
45
45
|
data: DataComponentUpdate;
|
|
@@ -47,20 +47,20 @@ declare const updateDataComponent: (db: DatabaseClient) => (params: {
|
|
|
47
47
|
/**
|
|
48
48
|
* Delete a data component
|
|
49
49
|
*/
|
|
50
|
-
declare const deleteDataComponent: (db:
|
|
50
|
+
declare const deleteDataComponent: (db: AgentsManageDatabaseClient) => (params: {
|
|
51
51
|
scopes: ProjectScopeConfig;
|
|
52
52
|
dataComponentId: string;
|
|
53
53
|
}) => Promise<boolean>;
|
|
54
54
|
/**
|
|
55
55
|
* Get data components for a specific agent
|
|
56
56
|
*/
|
|
57
|
-
declare const getDataComponentsForAgent: (db:
|
|
57
|
+
declare const getDataComponentsForAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: SubAgentScopeConfig;
|
|
59
59
|
}) => Promise<DataComponentSelect[]>;
|
|
60
60
|
/**
|
|
61
61
|
* Associate a data component with an agent
|
|
62
62
|
*/
|
|
63
|
-
declare const associateDataComponentWithAgent: (db:
|
|
63
|
+
declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
64
64
|
scopes: SubAgentScopeConfig;
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
@@ -75,17 +75,17 @@ declare const associateDataComponentWithAgent: (db: DatabaseClient) => (params:
|
|
|
75
75
|
/**
|
|
76
76
|
* Remove association between data component and agent
|
|
77
77
|
*/
|
|
78
|
-
declare const removeDataComponentFromAgent: (db:
|
|
78
|
+
declare const removeDataComponentFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
79
79
|
scopes: SubAgentScopeConfig;
|
|
80
80
|
dataComponentId: string;
|
|
81
81
|
}) => Promise<boolean>;
|
|
82
|
-
declare const deleteAgentDataComponentRelationByAgent: (db:
|
|
82
|
+
declare const deleteAgentDataComponentRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
83
83
|
scopes: SubAgentScopeConfig;
|
|
84
84
|
}) => Promise<boolean>;
|
|
85
85
|
/**
|
|
86
86
|
* Get all agents that use a specific data component
|
|
87
87
|
*/
|
|
88
|
-
declare const getAgentsUsingDataComponent: (db:
|
|
88
|
+
declare const getAgentsUsingDataComponent: (db: AgentsManageDatabaseClient) => (params: {
|
|
89
89
|
scopes: ProjectScopeConfig;
|
|
90
90
|
dataComponentId: string;
|
|
91
91
|
}) => Promise<{
|
|
@@ -95,14 +95,14 @@ declare const getAgentsUsingDataComponent: (db: DatabaseClient) => (params: {
|
|
|
95
95
|
/**
|
|
96
96
|
* Check if a data component is associated with an agent
|
|
97
97
|
*/
|
|
98
|
-
declare const isDataComponentAssociatedWithAgent: (db:
|
|
98
|
+
declare const isDataComponentAssociatedWithAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
99
99
|
scopes: SubAgentScopeConfig;
|
|
100
100
|
dataComponentId: string;
|
|
101
101
|
}) => Promise<boolean>;
|
|
102
102
|
/**
|
|
103
103
|
* Upsert agent-data component relation (create if it doesn't exist, no-op if it does)
|
|
104
104
|
*/
|
|
105
|
-
declare const upsertAgentDataComponentRelation: (db:
|
|
105
|
+
declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
106
106
|
scopes: SubAgentScopeConfig;
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
@@ -117,13 +117,13 @@ declare const upsertAgentDataComponentRelation: (db: DatabaseClient) => (params:
|
|
|
117
117
|
/**
|
|
118
118
|
* Count data components for a tenant/project
|
|
119
119
|
*/
|
|
120
|
-
declare const countDataComponents: (db:
|
|
120
|
+
declare const countDataComponents: (db: AgentsManageDatabaseClient) => (params: {
|
|
121
121
|
scopes: ProjectScopeConfig;
|
|
122
122
|
}) => Promise<number>;
|
|
123
123
|
/**
|
|
124
124
|
* Upsert a data component (create if it doesn't exist, update if it does)
|
|
125
125
|
*/
|
|
126
|
-
declare const upsertDataComponent: (db:
|
|
126
|
+
declare const upsertDataComponent: (db: AgentsManageDatabaseClient) => (params: {
|
|
127
127
|
data: DataComponentInsert;
|
|
128
128
|
}) => Promise<DataComponentSelect | null>;
|
|
129
129
|
//#endregion
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { dataComponents, subAgentDataComponents } from "
|
|
2
|
-
import { validatePropsAsJsonSchema } from "
|
|
3
|
-
import { generateId } from "
|
|
4
|
-
import { createApiError } from "
|
|
5
|
-
import "
|
|
6
|
-
import { validateRender } from "
|
|
1
|
+
import { dataComponents, subAgentDataComponents } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { validatePropsAsJsonSchema } from "../../validation/props-validation.js";
|
|
3
|
+
import { generateId } from "../../utils/conversations.js";
|
|
4
|
+
import { createApiError } from "../../utils/error.js";
|
|
5
|
+
import "../../utils/index.js";
|
|
6
|
+
import { validateRender } from "../../validation/render-validation.js";
|
|
7
7
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
8
8
|
|
|
9
|
-
//#region src/data-access/dataComponents.ts
|
|
9
|
+
//#region src/data-access/manage/dataComponents.ts
|
|
10
10
|
/**
|
|
11
11
|
* Get a data component by ID
|
|
12
12
|
*/
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { ProjectScopeConfig } from "../../types/utility.js";
|
|
2
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
|
+
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
4
|
+
import { DatasetInsert, DatasetItemInsert, DatasetItemSelect, DatasetItemUpdate, DatasetRunConfigAgentRelationInsert, DatasetRunConfigAgentRelationSelect, DatasetRunConfigInsert, DatasetRunConfigSelect, DatasetRunConfigUpdate, DatasetSelect, DatasetUpdate, EvaluationJobConfigEvaluatorRelationInsert, EvaluationJobConfigEvaluatorRelationSelect, EvaluationJobConfigInsert, EvaluationJobConfigSelect, EvaluationRunConfigEvaluationSuiteConfigRelationInsert, EvaluationRunConfigEvaluationSuiteConfigRelationSelect, EvaluationRunConfigInsert, EvaluationRunConfigSelect, EvaluationRunConfigUpdate, EvaluationRunConfigWithSuiteConfigs, EvaluationSuiteConfigEvaluatorRelationInsert, EvaluationSuiteConfigEvaluatorRelationSelect, EvaluationSuiteConfigInsert, EvaluationSuiteConfigSelect, EvaluationSuiteConfigUpdate, EvaluatorInsert, EvaluatorSelect, EvaluatorUpdate } from "../../types/entities.js";
|
|
5
|
+
|
|
6
|
+
//#region src/data-access/manage/evalConfig.d.ts
|
|
7
|
+
declare const getDatasetById: (db: AgentsManageDatabaseClient) => (params: {
|
|
8
|
+
scopes: ProjectScopeConfig & {
|
|
9
|
+
datasetId: string;
|
|
10
|
+
};
|
|
11
|
+
}) => Promise<DatasetSelect | null>;
|
|
12
|
+
declare const listDatasets: (db: AgentsManageDatabaseClient) => (params: {
|
|
13
|
+
scopes: ProjectScopeConfig;
|
|
14
|
+
}) => Promise<DatasetSelect[]>;
|
|
15
|
+
declare const createDataset: (db: AgentsManageDatabaseClient) => (data: DatasetInsert) => Promise<DatasetSelect>;
|
|
16
|
+
declare const updateDataset: (db: AgentsManageDatabaseClient) => (params: {
|
|
17
|
+
scopes: ProjectScopeConfig & {
|
|
18
|
+
datasetId: string;
|
|
19
|
+
};
|
|
20
|
+
data: DatasetUpdate;
|
|
21
|
+
}) => Promise<DatasetSelect | null>;
|
|
22
|
+
declare const deleteDataset: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
|
+
scopes: ProjectScopeConfig & {
|
|
24
|
+
datasetId: string;
|
|
25
|
+
};
|
|
26
|
+
}) => Promise<boolean>;
|
|
27
|
+
declare const getDatasetItemById: (db: AgentsManageDatabaseClient) => (params: {
|
|
28
|
+
scopes: ProjectScopeConfig & {
|
|
29
|
+
datasetItemId: string;
|
|
30
|
+
};
|
|
31
|
+
}) => Promise<DatasetItemSelect | null>;
|
|
32
|
+
declare const listDatasetItems: (db: AgentsManageDatabaseClient) => (params: {
|
|
33
|
+
scopes: ProjectScopeConfig & {
|
|
34
|
+
datasetId: string;
|
|
35
|
+
};
|
|
36
|
+
}) => Promise<DatasetItemSelect[]>;
|
|
37
|
+
declare const createDatasetItem: (db: AgentsManageDatabaseClient) => (data: DatasetItemInsert) => Promise<DatasetItemSelect>;
|
|
38
|
+
declare const createDatasetItems: (db: AgentsManageDatabaseClient) => (data: DatasetItemInsert[]) => Promise<DatasetItemSelect[]>;
|
|
39
|
+
declare const updateDatasetItem: (db: AgentsManageDatabaseClient) => (params: {
|
|
40
|
+
scopes: ProjectScopeConfig & {
|
|
41
|
+
datasetItemId: string;
|
|
42
|
+
};
|
|
43
|
+
data: DatasetItemUpdate;
|
|
44
|
+
}) => Promise<DatasetItemSelect | null>;
|
|
45
|
+
declare const deleteDatasetItem: (db: AgentsManageDatabaseClient) => (params: {
|
|
46
|
+
scopes: ProjectScopeConfig & {
|
|
47
|
+
datasetItemId: string;
|
|
48
|
+
};
|
|
49
|
+
}) => Promise<boolean>;
|
|
50
|
+
declare const deleteDatasetItemsByDataset: (db: AgentsManageDatabaseClient) => (params: {
|
|
51
|
+
scopes: ProjectScopeConfig & {
|
|
52
|
+
datasetId: string;
|
|
53
|
+
};
|
|
54
|
+
}) => Promise<number>;
|
|
55
|
+
declare const getDatasetRunConfigById: (db: AgentsManageDatabaseClient) => (params: {
|
|
56
|
+
scopes: ProjectScopeConfig & {
|
|
57
|
+
datasetRunConfigId: string;
|
|
58
|
+
};
|
|
59
|
+
}) => Promise<DatasetRunConfigSelect | null>;
|
|
60
|
+
declare const listDatasetRunConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
61
|
+
scopes: ProjectScopeConfig;
|
|
62
|
+
}) => Promise<DatasetRunConfigSelect[]>;
|
|
63
|
+
declare const createDatasetRunConfig: (db: AgentsManageDatabaseClient) => (data: DatasetRunConfigInsert) => Promise<DatasetRunConfigSelect>;
|
|
64
|
+
declare const updateDatasetRunConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
65
|
+
scopes: ProjectScopeConfig & {
|
|
66
|
+
datasetRunConfigId: string;
|
|
67
|
+
};
|
|
68
|
+
data: DatasetRunConfigUpdate;
|
|
69
|
+
}) => Promise<DatasetRunConfigSelect | null>;
|
|
70
|
+
declare const deleteDatasetRunConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
|
+
scopes: ProjectScopeConfig & {
|
|
72
|
+
datasetRunConfigId: string;
|
|
73
|
+
};
|
|
74
|
+
}) => Promise<boolean>;
|
|
75
|
+
declare const getDatasetRunConfigAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
76
|
+
scopes: ProjectScopeConfig & {
|
|
77
|
+
datasetRunConfigId: string;
|
|
78
|
+
};
|
|
79
|
+
}) => Promise<DatasetRunConfigAgentRelationSelect[]>;
|
|
80
|
+
declare const createDatasetRunConfigAgentRelation: (db: AgentsManageDatabaseClient) => (data: DatasetRunConfigAgentRelationInsert) => Promise<DatasetRunConfigAgentRelationSelect>;
|
|
81
|
+
declare const deleteDatasetRunConfigAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
82
|
+
scopes: ProjectScopeConfig & {
|
|
83
|
+
datasetRunConfigId: string;
|
|
84
|
+
agentId: string;
|
|
85
|
+
};
|
|
86
|
+
}) => Promise<boolean>;
|
|
87
|
+
declare const getEvaluatorById: (db: AgentsManageDatabaseClient) => (params: {
|
|
88
|
+
scopes: ProjectScopeConfig & {
|
|
89
|
+
evaluatorId: string;
|
|
90
|
+
};
|
|
91
|
+
}) => Promise<EvaluatorSelect | null>;
|
|
92
|
+
declare const listEvaluators: (db: AgentsManageDatabaseClient) => (params: {
|
|
93
|
+
scopes: ProjectScopeConfig;
|
|
94
|
+
}) => Promise<EvaluatorSelect[]>;
|
|
95
|
+
declare const getEvaluatorsByIds: (db: AgentsManageDatabaseClient) => (params: {
|
|
96
|
+
scopes: ProjectScopeConfig;
|
|
97
|
+
evaluatorIds: string[];
|
|
98
|
+
}) => Promise<EvaluatorSelect[]>;
|
|
99
|
+
declare const createEvaluator: (db: AgentsManageDatabaseClient) => (data: EvaluatorInsert) => Promise<EvaluatorSelect>;
|
|
100
|
+
declare const updateEvaluator: (db: AgentsManageDatabaseClient) => (params: {
|
|
101
|
+
scopes: ProjectScopeConfig & {
|
|
102
|
+
evaluatorId: string;
|
|
103
|
+
};
|
|
104
|
+
data: EvaluatorUpdate;
|
|
105
|
+
}) => Promise<EvaluatorSelect | null>;
|
|
106
|
+
declare const deleteEvaluator: (db: AgentsManageDatabaseClient) => (params: {
|
|
107
|
+
scopes: ProjectScopeConfig & {
|
|
108
|
+
evaluatorId: string;
|
|
109
|
+
};
|
|
110
|
+
}) => Promise<boolean>;
|
|
111
|
+
declare const getEvaluationSuiteConfigById: (db: AgentsManageDatabaseClient) => (params: {
|
|
112
|
+
scopes: ProjectScopeConfig & {
|
|
113
|
+
evaluationSuiteConfigId: string;
|
|
114
|
+
};
|
|
115
|
+
}) => Promise<EvaluationSuiteConfigSelect | null>;
|
|
116
|
+
declare const listEvaluationSuiteConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
117
|
+
scopes: ProjectScopeConfig;
|
|
118
|
+
}) => Promise<EvaluationSuiteConfigSelect[]>;
|
|
119
|
+
declare const createEvaluationSuiteConfig: (db: AgentsManageDatabaseClient) => (data: EvaluationSuiteConfigInsert) => Promise<EvaluationSuiteConfigSelect>;
|
|
120
|
+
declare const updateEvaluationSuiteConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
121
|
+
scopes: ProjectScopeConfig & {
|
|
122
|
+
evaluationSuiteConfigId: string;
|
|
123
|
+
};
|
|
124
|
+
data: EvaluationSuiteConfigUpdate;
|
|
125
|
+
}) => Promise<EvaluationSuiteConfigSelect | null>;
|
|
126
|
+
declare const deleteEvaluationSuiteConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
127
|
+
scopes: ProjectScopeConfig & {
|
|
128
|
+
evaluationSuiteConfigId: string;
|
|
129
|
+
};
|
|
130
|
+
}) => Promise<boolean>;
|
|
131
|
+
declare const getEvaluationSuiteConfigEvaluatorRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
132
|
+
scopes: ProjectScopeConfig & {
|
|
133
|
+
evaluationSuiteConfigId: string;
|
|
134
|
+
};
|
|
135
|
+
}) => Promise<EvaluationSuiteConfigEvaluatorRelationSelect[]>;
|
|
136
|
+
declare const createEvaluationSuiteConfigEvaluatorRelation: (db: AgentsManageDatabaseClient) => (data: EvaluationSuiteConfigEvaluatorRelationInsert) => Promise<EvaluationSuiteConfigEvaluatorRelationSelect>;
|
|
137
|
+
declare const deleteEvaluationSuiteConfigEvaluatorRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
138
|
+
scopes: ProjectScopeConfig & {
|
|
139
|
+
evaluationSuiteConfigId: string;
|
|
140
|
+
evaluatorId: string;
|
|
141
|
+
};
|
|
142
|
+
}) => Promise<boolean>;
|
|
143
|
+
declare const deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator: (db: AgentsManageDatabaseClient) => (params: {
|
|
144
|
+
scopes: ProjectScopeConfig & {
|
|
145
|
+
evaluatorId: string;
|
|
146
|
+
};
|
|
147
|
+
}) => Promise<number>;
|
|
148
|
+
declare const getEvaluationRunConfigById: (db: AgentsManageDatabaseClient) => (params: {
|
|
149
|
+
scopes: ProjectScopeConfig & {
|
|
150
|
+
evaluationRunConfigId: string;
|
|
151
|
+
};
|
|
152
|
+
}) => Promise<EvaluationRunConfigSelect | null>;
|
|
153
|
+
declare const listEvaluationRunConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
154
|
+
scopes: ProjectScopeConfig;
|
|
155
|
+
}) => Promise<EvaluationRunConfigSelect[]>;
|
|
156
|
+
declare const listEvaluationRunConfigsWithSuiteConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
157
|
+
scopes: ProjectScopeConfig;
|
|
158
|
+
}) => Promise<EvaluationRunConfigWithSuiteConfigs[]>;
|
|
159
|
+
declare const createEvaluationRunConfig: (db: AgentsManageDatabaseClient) => (data: EvaluationRunConfigInsert) => Promise<EvaluationRunConfigSelect>;
|
|
160
|
+
declare const updateEvaluationRunConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
161
|
+
scopes: ProjectScopeConfig & {
|
|
162
|
+
evaluationRunConfigId: string;
|
|
163
|
+
};
|
|
164
|
+
data: EvaluationRunConfigUpdate;
|
|
165
|
+
}) => Promise<EvaluationRunConfigSelect | null>;
|
|
166
|
+
declare const deleteEvaluationRunConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
167
|
+
scopes: ProjectScopeConfig & {
|
|
168
|
+
evaluationRunConfigId: string;
|
|
169
|
+
};
|
|
170
|
+
}) => Promise<boolean>;
|
|
171
|
+
declare const getEvaluationRunConfigEvaluationSuiteConfigRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
172
|
+
scopes: ProjectScopeConfig & {
|
|
173
|
+
evaluationRunConfigId: string;
|
|
174
|
+
};
|
|
175
|
+
}) => Promise<EvaluationRunConfigEvaluationSuiteConfigRelationSelect[]>;
|
|
176
|
+
declare const createEvaluationRunConfigEvaluationSuiteConfigRelation: (db: AgentsManageDatabaseClient) => (data: EvaluationRunConfigEvaluationSuiteConfigRelationInsert) => Promise<EvaluationRunConfigEvaluationSuiteConfigRelationSelect>;
|
|
177
|
+
declare const deleteEvaluationRunConfigEvaluationSuiteConfigRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
178
|
+
scopes: ProjectScopeConfig & {
|
|
179
|
+
evaluationRunConfigId: string;
|
|
180
|
+
evaluationSuiteConfigId: string;
|
|
181
|
+
};
|
|
182
|
+
}) => Promise<boolean>;
|
|
183
|
+
declare const getEvaluationJobConfigById: (db: AgentsManageDatabaseClient) => (params: {
|
|
184
|
+
scopes: ProjectScopeConfig & {
|
|
185
|
+
evaluationJobConfigId: string;
|
|
186
|
+
};
|
|
187
|
+
}) => Promise<EvaluationJobConfigSelect | null>;
|
|
188
|
+
declare const listEvaluationJobConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
189
|
+
scopes: ProjectScopeConfig;
|
|
190
|
+
}) => Promise<EvaluationJobConfigSelect[]>;
|
|
191
|
+
declare const createEvaluationJobConfig: (db: AgentsManageDatabaseClient) => (data: EvaluationJobConfigInsert) => Promise<EvaluationJobConfigSelect>;
|
|
192
|
+
declare const deleteEvaluationJobConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
193
|
+
scopes: ProjectScopeConfig & {
|
|
194
|
+
evaluationJobConfigId: string;
|
|
195
|
+
};
|
|
196
|
+
}) => Promise<boolean>;
|
|
197
|
+
declare const getEvaluationJobConfigEvaluatorRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
198
|
+
scopes: ProjectScopeConfig & {
|
|
199
|
+
evaluationJobConfigId: string;
|
|
200
|
+
};
|
|
201
|
+
}) => Promise<EvaluationJobConfigEvaluatorRelationSelect[]>;
|
|
202
|
+
declare const createEvaluationJobConfigEvaluatorRelation: (db: AgentsManageDatabaseClient) => (data: EvaluationJobConfigEvaluatorRelationInsert) => Promise<EvaluationJobConfigEvaluatorRelationSelect>;
|
|
203
|
+
declare const deleteEvaluationJobConfigEvaluatorRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
204
|
+
scopes: ProjectScopeConfig & {
|
|
205
|
+
evaluationJobConfigId: string;
|
|
206
|
+
evaluatorId: string;
|
|
207
|
+
};
|
|
208
|
+
}) => Promise<boolean>;
|
|
209
|
+
declare const deleteEvaluationJobConfigEvaluatorRelationsByEvaluator: (db: AgentsManageDatabaseClient) => (params: {
|
|
210
|
+
scopes: ProjectScopeConfig & {
|
|
211
|
+
evaluatorId: string;
|
|
212
|
+
};
|
|
213
|
+
}) => Promise<number>;
|
|
214
|
+
declare const linkDatasetRunToEvaluationJobConfig: (db: AgentsRunDatabaseClient) => (params: {
|
|
215
|
+
scopes: ProjectScopeConfig & {
|
|
216
|
+
datasetRunId: string;
|
|
217
|
+
};
|
|
218
|
+
evaluationJobConfigId: string;
|
|
219
|
+
}) => Promise<void>;
|
|
220
|
+
//#endregion
|
|
221
|
+
export { createDataset, createDatasetItem, createDatasetItems, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, getDatasetById, getDatasetItemById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, linkDatasetRunToEvaluationJobConfig, listDatasetItems, listDatasetRunConfigs, listDatasets, listEvaluationJobConfigs, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationSuiteConfigs, listEvaluators, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator };
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { datasetRun } from "../../db/runtime/runtime-schema.js";
|
|
3
|
+
import { and, eq, inArray } from "drizzle-orm";
|
|
4
|
+
|
|
5
|
+
//#region src/data-access/manage/evalConfig.ts
|
|
6
|
+
const getDatasetById = (db) => async (params) => {
|
|
7
|
+
return (await db.select().from(dataset).where(and(eq(dataset.tenantId, params.scopes.tenantId), eq(dataset.projectId, params.scopes.projectId), eq(dataset.id, params.scopes.datasetId))).limit(1))[0] ?? null;
|
|
8
|
+
};
|
|
9
|
+
const listDatasets = (db) => async (params) => {
|
|
10
|
+
return await db.select().from(dataset).where(and(eq(dataset.tenantId, params.scopes.tenantId), eq(dataset.projectId, params.scopes.projectId)));
|
|
11
|
+
};
|
|
12
|
+
const createDataset = (db) => async (data) => {
|
|
13
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
14
|
+
const [created] = await db.insert(dataset).values({
|
|
15
|
+
...data,
|
|
16
|
+
createdAt: now,
|
|
17
|
+
updatedAt: now
|
|
18
|
+
}).returning();
|
|
19
|
+
return created;
|
|
20
|
+
};
|
|
21
|
+
const updateDataset = (db) => async (params) => {
|
|
22
|
+
const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
23
|
+
for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
|
|
24
|
+
const [updated] = await db.update(dataset).set(updateData).where(and(eq(dataset.tenantId, params.scopes.tenantId), eq(dataset.projectId, params.scopes.projectId), eq(dataset.id, params.scopes.datasetId))).returning();
|
|
25
|
+
return updated ?? null;
|
|
26
|
+
};
|
|
27
|
+
const deleteDataset = (db) => async (params) => {
|
|
28
|
+
return (await db.delete(dataset).where(and(eq(dataset.tenantId, params.scopes.tenantId), eq(dataset.projectId, params.scopes.projectId), eq(dataset.id, params.scopes.datasetId))).returning()).length > 0;
|
|
29
|
+
};
|
|
30
|
+
const getDatasetItemById = (db) => async (params) => {
|
|
31
|
+
return (await db.select().from(datasetItem).where(and(eq(datasetItem.tenantId, params.scopes.tenantId), eq(datasetItem.projectId, params.scopes.projectId), eq(datasetItem.id, params.scopes.datasetItemId))).limit(1))[0] ?? null;
|
|
32
|
+
};
|
|
33
|
+
const listDatasetItems = (db) => async (params) => {
|
|
34
|
+
return await db.select().from(datasetItem).where(and(eq(datasetItem.tenantId, params.scopes.tenantId), eq(datasetItem.projectId, params.scopes.projectId), eq(datasetItem.datasetId, params.scopes.datasetId)));
|
|
35
|
+
};
|
|
36
|
+
const createDatasetItem = (db) => async (data) => {
|
|
37
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
38
|
+
const [created] = await db.insert(datasetItem).values({
|
|
39
|
+
...data,
|
|
40
|
+
createdAt: now,
|
|
41
|
+
updatedAt: now
|
|
42
|
+
}).returning();
|
|
43
|
+
return created;
|
|
44
|
+
};
|
|
45
|
+
const createDatasetItems = (db) => async (data) => {
|
|
46
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
47
|
+
const values = data.map((item) => ({
|
|
48
|
+
...item,
|
|
49
|
+
createdAt: now,
|
|
50
|
+
updatedAt: now
|
|
51
|
+
}));
|
|
52
|
+
return await db.insert(datasetItem).values(values).returning();
|
|
53
|
+
};
|
|
54
|
+
const updateDatasetItem = (db) => async (params) => {
|
|
55
|
+
const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
56
|
+
for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
|
|
57
|
+
const [updated] = await db.update(datasetItem).set(updateData).where(and(eq(datasetItem.tenantId, params.scopes.tenantId), eq(datasetItem.projectId, params.scopes.projectId), eq(datasetItem.id, params.scopes.datasetItemId))).returning();
|
|
58
|
+
return updated ?? null;
|
|
59
|
+
};
|
|
60
|
+
const deleteDatasetItem = (db) => async (params) => {
|
|
61
|
+
return (await db.delete(datasetItem).where(and(eq(datasetItem.tenantId, params.scopes.tenantId), eq(datasetItem.projectId, params.scopes.projectId), eq(datasetItem.id, params.scopes.datasetItemId))).returning()).length > 0;
|
|
62
|
+
};
|
|
63
|
+
const deleteDatasetItemsByDataset = (db) => async (params) => {
|
|
64
|
+
return (await db.delete(datasetItem).where(and(eq(datasetItem.tenantId, params.scopes.tenantId), eq(datasetItem.projectId, params.scopes.projectId), eq(datasetItem.datasetId, params.scopes.datasetId))).returning()).length;
|
|
65
|
+
};
|
|
66
|
+
const getDatasetRunConfigById = (db) => async (params) => {
|
|
67
|
+
return (await db.select().from(datasetRunConfig).where(and(eq(datasetRunConfig.tenantId, params.scopes.tenantId), eq(datasetRunConfig.projectId, params.scopes.projectId), eq(datasetRunConfig.id, params.scopes.datasetRunConfigId))).limit(1))[0] ?? null;
|
|
68
|
+
};
|
|
69
|
+
const listDatasetRunConfigs = (db) => async (params) => {
|
|
70
|
+
return await db.select().from(datasetRunConfig).where(and(eq(datasetRunConfig.tenantId, params.scopes.tenantId), eq(datasetRunConfig.projectId, params.scopes.projectId)));
|
|
71
|
+
};
|
|
72
|
+
const createDatasetRunConfig = (db) => async (data) => {
|
|
73
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
74
|
+
const [created] = await db.insert(datasetRunConfig).values({
|
|
75
|
+
...data,
|
|
76
|
+
createdAt: now,
|
|
77
|
+
updatedAt: now
|
|
78
|
+
}).returning();
|
|
79
|
+
return created;
|
|
80
|
+
};
|
|
81
|
+
const updateDatasetRunConfig = (db) => async (params) => {
|
|
82
|
+
const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
83
|
+
for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
|
|
84
|
+
const [updated] = await db.update(datasetRunConfig).set(updateData).where(and(eq(datasetRunConfig.tenantId, params.scopes.tenantId), eq(datasetRunConfig.projectId, params.scopes.projectId), eq(datasetRunConfig.id, params.scopes.datasetRunConfigId))).returning();
|
|
85
|
+
return updated ?? null;
|
|
86
|
+
};
|
|
87
|
+
const deleteDatasetRunConfig = (db) => async (params) => {
|
|
88
|
+
return (await db.delete(datasetRunConfig).where(and(eq(datasetRunConfig.tenantId, params.scopes.tenantId), eq(datasetRunConfig.projectId, params.scopes.projectId), eq(datasetRunConfig.id, params.scopes.datasetRunConfigId))).returning()).length > 0;
|
|
89
|
+
};
|
|
90
|
+
const getDatasetRunConfigAgentRelations = (db) => async (params) => {
|
|
91
|
+
return await db.select().from(datasetRunConfigAgentRelations).where(and(eq(datasetRunConfigAgentRelations.tenantId, params.scopes.tenantId), eq(datasetRunConfigAgentRelations.projectId, params.scopes.projectId), eq(datasetRunConfigAgentRelations.datasetRunConfigId, params.scopes.datasetRunConfigId)));
|
|
92
|
+
};
|
|
93
|
+
const createDatasetRunConfigAgentRelation = (db) => async (data) => {
|
|
94
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
95
|
+
const [created] = await db.insert(datasetRunConfigAgentRelations).values({
|
|
96
|
+
...data,
|
|
97
|
+
createdAt: now,
|
|
98
|
+
updatedAt: now
|
|
99
|
+
}).returning();
|
|
100
|
+
return created;
|
|
101
|
+
};
|
|
102
|
+
const deleteDatasetRunConfigAgentRelation = (db) => async (params) => {
|
|
103
|
+
return (await db.delete(datasetRunConfigAgentRelations).where(and(eq(datasetRunConfigAgentRelations.tenantId, params.scopes.tenantId), eq(datasetRunConfigAgentRelations.projectId, params.scopes.projectId), eq(datasetRunConfigAgentRelations.datasetRunConfigId, params.scopes.datasetRunConfigId), eq(datasetRunConfigAgentRelations.agentId, params.scopes.agentId))).returning()).length > 0;
|
|
104
|
+
};
|
|
105
|
+
const getEvaluatorById = (db) => async (params) => {
|
|
106
|
+
return (await db.select().from(evaluator).where(and(eq(evaluator.tenantId, params.scopes.tenantId), eq(evaluator.projectId, params.scopes.projectId), eq(evaluator.id, params.scopes.evaluatorId))).limit(1))[0] ?? null;
|
|
107
|
+
};
|
|
108
|
+
const listEvaluators = (db) => async (params) => {
|
|
109
|
+
return await db.select().from(evaluator).where(and(eq(evaluator.tenantId, params.scopes.tenantId), eq(evaluator.projectId, params.scopes.projectId)));
|
|
110
|
+
};
|
|
111
|
+
const getEvaluatorsByIds = (db) => async (params) => {
|
|
112
|
+
if (params.evaluatorIds.length === 0) return [];
|
|
113
|
+
return await db.select().from(evaluator).where(and(eq(evaluator.tenantId, params.scopes.tenantId), eq(evaluator.projectId, params.scopes.projectId), inArray(evaluator.id, params.evaluatorIds)));
|
|
114
|
+
};
|
|
115
|
+
const createEvaluator = (db) => async (data) => {
|
|
116
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
117
|
+
const [created] = await db.insert(evaluator).values({
|
|
118
|
+
...data,
|
|
119
|
+
createdAt: now,
|
|
120
|
+
updatedAt: now
|
|
121
|
+
}).returning();
|
|
122
|
+
return created;
|
|
123
|
+
};
|
|
124
|
+
const updateEvaluator = (db) => async (params) => {
|
|
125
|
+
const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
126
|
+
for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
|
|
127
|
+
const [updated] = await db.update(evaluator).set(updateData).where(and(eq(evaluator.tenantId, params.scopes.tenantId), eq(evaluator.projectId, params.scopes.projectId), eq(evaluator.id, params.scopes.evaluatorId))).returning();
|
|
128
|
+
return updated ?? null;
|
|
129
|
+
};
|
|
130
|
+
const deleteEvaluator = (db) => async (params) => {
|
|
131
|
+
return (await db.delete(evaluator).where(and(eq(evaluator.tenantId, params.scopes.tenantId), eq(evaluator.projectId, params.scopes.projectId), eq(evaluator.id, params.scopes.evaluatorId))).returning()).length > 0;
|
|
132
|
+
};
|
|
133
|
+
const getEvaluationSuiteConfigById = (db) => async (params) => {
|
|
134
|
+
return (await db.select().from(evaluationSuiteConfig).where(and(eq(evaluationSuiteConfig.tenantId, params.scopes.tenantId), eq(evaluationSuiteConfig.projectId, params.scopes.projectId), eq(evaluationSuiteConfig.id, params.scopes.evaluationSuiteConfigId))).limit(1))[0] ?? null;
|
|
135
|
+
};
|
|
136
|
+
const listEvaluationSuiteConfigs = (db) => async (params) => {
|
|
137
|
+
return await db.select().from(evaluationSuiteConfig).where(and(eq(evaluationSuiteConfig.tenantId, params.scopes.tenantId), eq(evaluationSuiteConfig.projectId, params.scopes.projectId)));
|
|
138
|
+
};
|
|
139
|
+
const createEvaluationSuiteConfig = (db) => async (data) => {
|
|
140
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
141
|
+
const [created] = await db.insert(evaluationSuiteConfig).values({
|
|
142
|
+
...data,
|
|
143
|
+
createdAt: now,
|
|
144
|
+
updatedAt: now
|
|
145
|
+
}).returning();
|
|
146
|
+
return created;
|
|
147
|
+
};
|
|
148
|
+
const updateEvaluationSuiteConfig = (db) => async (params) => {
|
|
149
|
+
const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
150
|
+
for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
|
|
151
|
+
const [updated] = await db.update(evaluationSuiteConfig).set(updateData).where(and(eq(evaluationSuiteConfig.tenantId, params.scopes.tenantId), eq(evaluationSuiteConfig.projectId, params.scopes.projectId), eq(evaluationSuiteConfig.id, params.scopes.evaluationSuiteConfigId))).returning();
|
|
152
|
+
return updated ?? null;
|
|
153
|
+
};
|
|
154
|
+
const deleteEvaluationSuiteConfig = (db) => async (params) => {
|
|
155
|
+
return (await db.delete(evaluationSuiteConfig).where(and(eq(evaluationSuiteConfig.tenantId, params.scopes.tenantId), eq(evaluationSuiteConfig.projectId, params.scopes.projectId), eq(evaluationSuiteConfig.id, params.scopes.evaluationSuiteConfigId))).returning()).length > 0;
|
|
156
|
+
};
|
|
157
|
+
const getEvaluationSuiteConfigEvaluatorRelations = (db) => async (params) => {
|
|
158
|
+
return await db.select().from(evaluationSuiteConfigEvaluatorRelations).where(and(eq(evaluationSuiteConfigEvaluatorRelations.tenantId, params.scopes.tenantId), eq(evaluationSuiteConfigEvaluatorRelations.projectId, params.scopes.projectId), eq(evaluationSuiteConfigEvaluatorRelations.evaluationSuiteConfigId, params.scopes.evaluationSuiteConfigId)));
|
|
159
|
+
};
|
|
160
|
+
const createEvaluationSuiteConfigEvaluatorRelation = (db) => async (data) => {
|
|
161
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
162
|
+
const [created] = await db.insert(evaluationSuiteConfigEvaluatorRelations).values({
|
|
163
|
+
...data,
|
|
164
|
+
createdAt: now,
|
|
165
|
+
updatedAt: now
|
|
166
|
+
}).returning();
|
|
167
|
+
return created;
|
|
168
|
+
};
|
|
169
|
+
const deleteEvaluationSuiteConfigEvaluatorRelation = (db) => async (params) => {
|
|
170
|
+
return (await db.delete(evaluationSuiteConfigEvaluatorRelations).where(and(eq(evaluationSuiteConfigEvaluatorRelations.tenantId, params.scopes.tenantId), eq(evaluationSuiteConfigEvaluatorRelations.projectId, params.scopes.projectId), eq(evaluationSuiteConfigEvaluatorRelations.evaluationSuiteConfigId, params.scopes.evaluationSuiteConfigId), eq(evaluationSuiteConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length > 0;
|
|
171
|
+
};
|
|
172
|
+
const deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator = (db) => async (params) => {
|
|
173
|
+
return (await db.delete(evaluationSuiteConfigEvaluatorRelations).where(and(eq(evaluationSuiteConfigEvaluatorRelations.tenantId, params.scopes.tenantId), eq(evaluationSuiteConfigEvaluatorRelations.projectId, params.scopes.projectId), eq(evaluationSuiteConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length;
|
|
174
|
+
};
|
|
175
|
+
const getEvaluationRunConfigById = (db) => async (params) => {
|
|
176
|
+
return (await db.select().from(evaluationRunConfig).where(and(eq(evaluationRunConfig.tenantId, params.scopes.tenantId), eq(evaluationRunConfig.projectId, params.scopes.projectId), eq(evaluationRunConfig.id, params.scopes.evaluationRunConfigId))).limit(1))[0] ?? null;
|
|
177
|
+
};
|
|
178
|
+
const listEvaluationRunConfigs = (db) => async (params) => {
|
|
179
|
+
return await db.select().from(evaluationRunConfig).where(and(eq(evaluationRunConfig.tenantId, params.scopes.tenantId), eq(evaluationRunConfig.projectId, params.scopes.projectId)));
|
|
180
|
+
};
|
|
181
|
+
const listEvaluationRunConfigsWithSuiteConfigs = (db) => async (params) => {
|
|
182
|
+
const rows = await db.select({
|
|
183
|
+
runConfig: evaluationRunConfig,
|
|
184
|
+
suiteConfigId: evaluationRunConfigEvaluationSuiteConfigRelations.evaluationSuiteConfigId
|
|
185
|
+
}).from(evaluationRunConfig).leftJoin(evaluationRunConfigEvaluationSuiteConfigRelations, and(eq(evaluationRunConfigEvaluationSuiteConfigRelations.tenantId, evaluationRunConfig.tenantId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.projectId, evaluationRunConfig.projectId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationRunConfigId, evaluationRunConfig.id))).where(and(eq(evaluationRunConfig.tenantId, params.scopes.tenantId), eq(evaluationRunConfig.projectId, params.scopes.projectId)));
|
|
186
|
+
const runConfigsById = /* @__PURE__ */ new Map();
|
|
187
|
+
for (const row of rows) {
|
|
188
|
+
const runConfig = row.runConfig;
|
|
189
|
+
const runConfigId = runConfig.id;
|
|
190
|
+
if (!runConfigsById.has(runConfigId)) {
|
|
191
|
+
const { tenantId: _tenantId, projectId: _projectId, ...apiRunConfig } = runConfig;
|
|
192
|
+
runConfigsById.set(runConfigId, {
|
|
193
|
+
...apiRunConfig,
|
|
194
|
+
suiteConfigIds: []
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
if (row.suiteConfigId) runConfigsById.get(runConfigId)?.suiteConfigIds.push(row.suiteConfigId);
|
|
198
|
+
}
|
|
199
|
+
return Array.from(runConfigsById.values());
|
|
200
|
+
};
|
|
201
|
+
const createEvaluationRunConfig = (db) => async (data) => {
|
|
202
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
203
|
+
const [created] = await db.insert(evaluationRunConfig).values({
|
|
204
|
+
...data,
|
|
205
|
+
createdAt: now,
|
|
206
|
+
updatedAt: now
|
|
207
|
+
}).returning();
|
|
208
|
+
return created;
|
|
209
|
+
};
|
|
210
|
+
const updateEvaluationRunConfig = (db) => async (params) => {
|
|
211
|
+
const updateData = { updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
212
|
+
for (const [key, value] of Object.entries(params.data)) if (value !== void 0) updateData[key] = value;
|
|
213
|
+
const [updated] = await db.update(evaluationRunConfig).set(updateData).where(and(eq(evaluationRunConfig.tenantId, params.scopes.tenantId), eq(evaluationRunConfig.projectId, params.scopes.projectId), eq(evaluationRunConfig.id, params.scopes.evaluationRunConfigId))).returning();
|
|
214
|
+
return updated ?? null;
|
|
215
|
+
};
|
|
216
|
+
const deleteEvaluationRunConfig = (db) => async (params) => {
|
|
217
|
+
return (await db.delete(evaluationRunConfig).where(and(eq(evaluationRunConfig.tenantId, params.scopes.tenantId), eq(evaluationRunConfig.projectId, params.scopes.projectId), eq(evaluationRunConfig.id, params.scopes.evaluationRunConfigId))).returning()).length > 0;
|
|
218
|
+
};
|
|
219
|
+
const getEvaluationRunConfigEvaluationSuiteConfigRelations = (db) => async (params) => {
|
|
220
|
+
return await db.select().from(evaluationRunConfigEvaluationSuiteConfigRelations).where(and(eq(evaluationRunConfigEvaluationSuiteConfigRelations.tenantId, params.scopes.tenantId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.projectId, params.scopes.projectId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationRunConfigId, params.scopes.evaluationRunConfigId)));
|
|
221
|
+
};
|
|
222
|
+
const createEvaluationRunConfigEvaluationSuiteConfigRelation = (db) => async (data) => {
|
|
223
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
224
|
+
const [created] = await db.insert(evaluationRunConfigEvaluationSuiteConfigRelations).values({
|
|
225
|
+
...data,
|
|
226
|
+
createdAt: now,
|
|
227
|
+
updatedAt: now
|
|
228
|
+
}).returning();
|
|
229
|
+
return created;
|
|
230
|
+
};
|
|
231
|
+
const deleteEvaluationRunConfigEvaluationSuiteConfigRelation = (db) => async (params) => {
|
|
232
|
+
return (await db.delete(evaluationRunConfigEvaluationSuiteConfigRelations).where(and(eq(evaluationRunConfigEvaluationSuiteConfigRelations.tenantId, params.scopes.tenantId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.projectId, params.scopes.projectId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationRunConfigId, params.scopes.evaluationRunConfigId), eq(evaluationRunConfigEvaluationSuiteConfigRelations.evaluationSuiteConfigId, params.scopes.evaluationSuiteConfigId))).returning()).length > 0;
|
|
233
|
+
};
|
|
234
|
+
const getEvaluationJobConfigById = (db) => async (params) => {
|
|
235
|
+
return (await db.select().from(evaluationJobConfig).where(and(eq(evaluationJobConfig.tenantId, params.scopes.tenantId), eq(evaluationJobConfig.projectId, params.scopes.projectId), eq(evaluationJobConfig.id, params.scopes.evaluationJobConfigId))).limit(1))[0] ?? null;
|
|
236
|
+
};
|
|
237
|
+
const listEvaluationJobConfigs = (db) => async (params) => {
|
|
238
|
+
return await db.select().from(evaluationJobConfig).where(and(eq(evaluationJobConfig.tenantId, params.scopes.tenantId), eq(evaluationJobConfig.projectId, params.scopes.projectId)));
|
|
239
|
+
};
|
|
240
|
+
const createEvaluationJobConfig = (db) => async (data) => {
|
|
241
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
242
|
+
const [created] = await db.insert(evaluationJobConfig).values({
|
|
243
|
+
...data,
|
|
244
|
+
createdAt: now,
|
|
245
|
+
updatedAt: now
|
|
246
|
+
}).returning();
|
|
247
|
+
return created;
|
|
248
|
+
};
|
|
249
|
+
const deleteEvaluationJobConfig = (db) => async (params) => {
|
|
250
|
+
return (await db.delete(evaluationJobConfig).where(and(eq(evaluationJobConfig.tenantId, params.scopes.tenantId), eq(evaluationJobConfig.projectId, params.scopes.projectId), eq(evaluationJobConfig.id, params.scopes.evaluationJobConfigId))).returning()).length > 0;
|
|
251
|
+
};
|
|
252
|
+
const getEvaluationJobConfigEvaluatorRelations = (db) => async (params) => {
|
|
253
|
+
return await db.select().from(evaluationJobConfigEvaluatorRelations).where(and(eq(evaluationJobConfigEvaluatorRelations.tenantId, params.scopes.tenantId), eq(evaluationJobConfigEvaluatorRelations.projectId, params.scopes.projectId), eq(evaluationJobConfigEvaluatorRelations.evaluationJobConfigId, params.scopes.evaluationJobConfigId)));
|
|
254
|
+
};
|
|
255
|
+
const createEvaluationJobConfigEvaluatorRelation = (db) => async (data) => {
|
|
256
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
257
|
+
const [created] = await db.insert(evaluationJobConfigEvaluatorRelations).values({
|
|
258
|
+
...data,
|
|
259
|
+
createdAt: now,
|
|
260
|
+
updatedAt: now
|
|
261
|
+
}).returning();
|
|
262
|
+
return created;
|
|
263
|
+
};
|
|
264
|
+
const deleteEvaluationJobConfigEvaluatorRelation = (db) => async (params) => {
|
|
265
|
+
return (await db.delete(evaluationJobConfigEvaluatorRelations).where(and(eq(evaluationJobConfigEvaluatorRelations.tenantId, params.scopes.tenantId), eq(evaluationJobConfigEvaluatorRelations.projectId, params.scopes.projectId), eq(evaluationJobConfigEvaluatorRelations.evaluationJobConfigId, params.scopes.evaluationJobConfigId), eq(evaluationJobConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length > 0;
|
|
266
|
+
};
|
|
267
|
+
const deleteEvaluationJobConfigEvaluatorRelationsByEvaluator = (db) => async (params) => {
|
|
268
|
+
return (await db.delete(evaluationJobConfigEvaluatorRelations).where(and(eq(evaluationJobConfigEvaluatorRelations.tenantId, params.scopes.tenantId), eq(evaluationJobConfigEvaluatorRelations.projectId, params.scopes.projectId), eq(evaluationJobConfigEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length;
|
|
269
|
+
};
|
|
270
|
+
const linkDatasetRunToEvaluationJobConfig = (db) => async (params) => {
|
|
271
|
+
await db.update(datasetRun).set({ evaluationJobConfigId: params.evaluationJobConfigId }).where(and(eq(datasetRun.tenantId, params.scopes.tenantId), eq(datasetRun.projectId, params.scopes.projectId), eq(datasetRun.id, params.scopes.datasetRunId)));
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
//#endregion
|
|
275
|
+
export { createDataset, createDatasetItem, createDatasetItems, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, getDatasetById, getDatasetItemById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, linkDatasetRunToEvaluationJobConfig, listDatasetItems, listDatasetRunConfigs, listDatasets, listEvaluationJobConfigs, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationSuiteConfigs, listEvaluators, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator };
|