@inkeep/agents-core 0.41.2 → 0.43.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 +60 -2
- package/dist/auth/authz/client.d.ts +87 -0
- package/dist/auth/authz/client.js +196 -0
- package/dist/auth/authz/config.d.ts +103 -0
- package/dist/auth/authz/config.js +93 -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 +53 -0
- package/dist/auth/authz/permissions.js +83 -0
- package/dist/auth/authz/sync.d.ts +106 -0
- package/dist/auth/authz/sync.js +321 -0
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/auth/permissions.js +2 -181
- package/dist/client-exports.d.ts +9 -3
- package/dist/client-exports.js +4 -2
- package/dist/constants/context-breakdown.d.ts +61 -0
- package/dist/constants/context-breakdown.js +124 -0
- package/dist/constants/execution-limits-shared/defaults.d.ts +1 -1
- package/dist/constants/execution-limits-shared/defaults.js +1 -1
- package/dist/constants/execution-limits-shared/index.d.ts +1 -1
- 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.d.ts +0 -6
- package/dist/context/TemplateEngine.js +4 -19
- package/dist/context/index.d.ts +1 -5
- package/dist/context/index.js +1 -5
- package/dist/credential-stores/keychain-store.d.ts +20 -8
- package/dist/credential-stores/keychain-store.js +107 -43
- 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} +209 -7
- package/dist/data-access/{agents.d.ts → manage/agents.d.ts} +64 -63
- package/dist/data-access/{agents.js → manage/agents.js} +80 -27
- package/dist/data-access/{artifactComponents.d.ts → manage/artifactComponents.d.ts} +33 -33
- package/dist/data-access/{artifactComponents.js → manage/artifactComponents.js} +5 -5
- package/dist/data-access/{contextConfigs.d.ts → manage/contextConfigs.d.ts} +26 -26
- 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} +26 -26
- 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/manage/functionTools.d.ts +242 -0
- package/dist/data-access/{functionTools.js → manage/functionTools.js} +124 -30
- 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} +43 -43
- package/dist/data-access/{subAgentExternalAgentRelations.js → manage/subAgentExternalAgentRelations.js} +2 -2
- package/dist/data-access/{subAgentRelations.d.ts → manage/subAgentRelations.d.ts} +65 -65
- package/dist/data-access/{subAgentRelations.js → manage/subAgentRelations.js} +3 -3
- package/dist/data-access/{subAgentTeamAgentRelations.d.ts → manage/subAgentTeamAgentRelations.d.ts} +43 -43
- package/dist/data-access/{subAgentTeamAgentRelations.js → manage/subAgentTeamAgentRelations.js} +2 -2
- package/dist/data-access/{subAgents.d.ts → manage/subAgents.d.ts} +28 -28
- package/dist/data-access/{subAgents.js → manage/subAgents.js} +4 -4
- package/dist/data-access/{tools.d.ts → manage/tools.d.ts} +65 -52
- package/dist/data-access/{tools.js → manage/tools.js} +109 -64
- package/dist/data-access/manage/triggers.d.ts +106 -0
- package/dist/data-access/manage/triggers.js +81 -0
- package/dist/data-access/{apiKeys.d.ts → runtime/apiKeys.d.ts} +37 -37
- 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} +80 -31
- 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} +24 -24
- 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} +16 -4
- 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} +1257 -969
- package/dist/db/{schema.js → manage/manage-schema.js} +436 -334
- 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/db/utils.d.ts +6 -0
- package/dist/db/utils.js +42 -0
- 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 +83 -0
- package/dist/dolt/migrate-dolt.d.ts +1 -0
- package/dist/dolt/migrate-dolt.js +25 -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 +135 -0
- package/dist/dolt/schema-sync.js +255 -0
- package/dist/env.d.ts +6 -4
- package/dist/env.js +3 -2
- package/dist/index.d.ts +73 -46
- package/dist/index.js +76 -49
- package/dist/types/@napi-rs__keyring/index.d.ts +14 -0
- package/dist/types/entities.d.ts +81 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +46 -5
- package/dist/types/utility.js +2 -1
- package/dist/utils/JsonTransformer.d.ts +42 -0
- package/dist/utils/JsonTransformer.js +103 -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 +8 -4
- package/dist/utils/index.js +8 -4
- package/dist/utils/internal-service-auth.d.ts +79 -0
- package/dist/utils/internal-service-auth.js +140 -0
- package/dist/utils/jmespath-utils.d.ts +152 -0
- package/dist/utils/jmespath-utils.js +213 -0
- package/dist/utils/jwt-helpers.d.ts +56 -0
- package/dist/utils/jwt-helpers.js +90 -0
- package/dist/utils/mcp-client.d.ts +1 -1
- package/dist/utils/mcp-client.js +1 -1
- package/dist/utils/service-token-auth.d.ts +9 -27
- package/dist/utils/service-token-auth.js +48 -96
- package/dist/utils/signature-validation.d.ts +2 -0
- package/dist/utils/signature-validation.js +3 -0
- 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.d.ts +13 -1
- package/dist/utils/third-party-mcp-servers/composio-client.js +47 -29
- package/dist/utils/third-party-mcp-servers/index.d.ts +2 -2
- package/dist/utils/third-party-mcp-servers/index.js +2 -2
- package/dist/utils/trigger-auth.d.ts +85 -0
- package/dist/utils/trigger-auth.js +233 -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 +5 -4
- package/dist/validation/index.js +4 -3
- package/dist/validation/render-validation.js +19 -0
- package/dist/validation/schemas.d.ts +18223 -5148
- package/dist/validation/schemas.js +559 -12
- package/dist/validation/stream-event-schemas.d.ts +96 -1
- package/dist/validation/stream-event-schemas.js +67 -2
- 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/0003_tiny_captain_universe.sql +8 -0
- package/drizzle/manage/0004_curious_phil_sheldon.sql +2 -0
- package/drizzle/manage/0005_silent_shatterstar.sql +53 -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/0003_snapshot.json +3134 -0
- package/drizzle/manage/meta/0004_snapshot.json +3141 -0
- package/drizzle/manage/meta/0005_snapshot.json +3141 -0
- package/drizzle/manage/meta/_journal.json +48 -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 +56 -18
- package/spicedb/schema.zed +114 -0
- 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/functionTools.d.ts +0 -169
- 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,35 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { AgentScopeConfig, ContextFetchDefinition, PaginationConfig } from "../../types/utility.js";
|
|
2
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
|
+
import "../../index.js";
|
|
4
|
+
import { ContextConfigInsert, ContextConfigUpdate } from "../../types/entities.js";
|
|
5
5
|
|
|
6
|
-
//#region src/data-access/contextConfigs.d.ts
|
|
7
|
-
declare const getContextConfigById: (db:
|
|
6
|
+
//#region src/data-access/manage/contextConfigs.d.ts
|
|
7
|
+
declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params: {
|
|
8
8
|
scopes: AgentScopeConfig;
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
17
|
headersSchema: unknown;
|
|
18
18
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
19
19
|
} | undefined>;
|
|
20
|
-
declare const listContextConfigs: (db:
|
|
20
|
+
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
22
22
|
}) => Promise<{
|
|
23
|
-
tenantId: string;
|
|
24
|
-
projectId: string;
|
|
25
23
|
id: string;
|
|
26
|
-
agentId: string;
|
|
27
24
|
createdAt: string;
|
|
28
25
|
updatedAt: string;
|
|
26
|
+
tenantId: string;
|
|
27
|
+
agentId: string;
|
|
28
|
+
projectId: string;
|
|
29
29
|
headersSchema: unknown;
|
|
30
30
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
31
31
|
}[]>;
|
|
32
|
-
declare const listContextConfigsPaginated: (db:
|
|
32
|
+
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
33
33
|
scopes: AgentScopeConfig;
|
|
34
34
|
pagination?: PaginationConfig;
|
|
35
35
|
}) => Promise<{
|
|
@@ -41,17 +41,17 @@ declare const listContextConfigsPaginated: (db: DatabaseClient) => (params: {
|
|
|
41
41
|
pages: number;
|
|
42
42
|
};
|
|
43
43
|
}>;
|
|
44
|
-
declare const createContextConfig: (db:
|
|
45
|
-
tenantId: string;
|
|
46
|
-
projectId: string;
|
|
44
|
+
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
47
45
|
id: string;
|
|
48
|
-
agentId: string;
|
|
49
46
|
createdAt: string;
|
|
50
47
|
updatedAt: string;
|
|
48
|
+
tenantId: string;
|
|
49
|
+
agentId: string;
|
|
50
|
+
projectId: string;
|
|
51
51
|
headersSchema: unknown;
|
|
52
52
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
53
53
|
}>;
|
|
54
|
-
declare const updateContextConfig: (db:
|
|
54
|
+
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
56
56
|
id: string;
|
|
57
57
|
data: Partial<ContextConfigUpdate>;
|
|
@@ -65,29 +65,29 @@ declare const updateContextConfig: (db: DatabaseClient) => (params: {
|
|
|
65
65
|
tenantId: string;
|
|
66
66
|
id: string;
|
|
67
67
|
}>;
|
|
68
|
-
declare const deleteContextConfig: (db:
|
|
68
|
+
declare const deleteContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
69
69
|
scopes: AgentScopeConfig;
|
|
70
70
|
id: string;
|
|
71
71
|
}) => Promise<boolean>;
|
|
72
|
-
declare const hasContextConfig: (db:
|
|
72
|
+
declare const hasContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
73
73
|
scopes: AgentScopeConfig;
|
|
74
74
|
id: string;
|
|
75
75
|
}) => Promise<boolean>;
|
|
76
|
-
declare const countContextConfigs: (db:
|
|
76
|
+
declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
77
77
|
scopes: AgentScopeConfig;
|
|
78
78
|
}) => Promise<number>;
|
|
79
79
|
/**
|
|
80
80
|
* Upsert a context config (create if it doesn't exist, update if it does)
|
|
81
81
|
*/
|
|
82
|
-
declare const upsertContextConfig: (db:
|
|
82
|
+
declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
83
83
|
data: ContextConfigInsert;
|
|
84
84
|
}) => Promise<{
|
|
85
|
-
tenantId: string;
|
|
86
|
-
projectId: string;
|
|
87
85
|
id: string;
|
|
88
|
-
agentId: string;
|
|
89
86
|
createdAt: string;
|
|
90
87
|
updatedAt: string;
|
|
88
|
+
tenantId: string;
|
|
89
|
+
agentId: string;
|
|
90
|
+
projectId: string;
|
|
91
91
|
headersSchema: unknown;
|
|
92
92
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
93
93
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { contextConfigs } from "
|
|
2
|
-
import { generateId } from "
|
|
1
|
+
import { contextConfigs } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { generateId } from "../../utils/conversations.js";
|
|
3
3
|
import { and, count, desc, eq, sql } from "drizzle-orm";
|
|
4
4
|
|
|
5
|
-
//#region src/data-access/contextConfigs.ts
|
|
5
|
+
//#region src/data-access/manage/contextConfigs.ts
|
|
6
6
|
const getContextConfigById = (db) => async (params) => {
|
|
7
7
|
return await db.query.contextConfigs.findFirst({ where: and(eq(contextConfigs.tenantId, params.scopes.tenantId), eq(contextConfigs.projectId, params.scopes.projectId), eq(contextConfigs.agentId, params.scopes.agentId), eq(contextConfigs.id, params.id)) });
|
|
8
8
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { PaginationConfig, ProjectScopeConfig } from "../../types/utility.js";
|
|
2
|
+
import "../../types/index.js";
|
|
3
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
4
|
+
import { CredentialReferenceInsert, CredentialReferenceSelect, CredentialReferenceUpdate, ExternalAgentSelect, ToolSelect } from "../../types/entities.js";
|
|
5
5
|
|
|
6
|
-
//#region src/data-access/credentialReferences.d.ts
|
|
6
|
+
//#region src/data-access/manage/credentialReferences.d.ts
|
|
7
7
|
type CredentialReferenceWithResources = CredentialReferenceSelect & {
|
|
8
8
|
tools: ToolSelect[];
|
|
9
9
|
externalAgents: ExternalAgentSelect[];
|
|
@@ -11,14 +11,14 @@ type CredentialReferenceWithResources = CredentialReferenceSelect & {
|
|
|
11
11
|
/**
|
|
12
12
|
* Get a credential reference by ID
|
|
13
13
|
*/
|
|
14
|
-
declare const getCredentialReference: (db:
|
|
14
|
+
declare const getCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
15
15
|
scopes: ProjectScopeConfig;
|
|
16
16
|
id: string;
|
|
17
17
|
}) => Promise<CredentialReferenceSelect | undefined>;
|
|
18
18
|
/**
|
|
19
19
|
* Get a user-scoped credential reference by toolId and userId
|
|
20
20
|
*/
|
|
21
|
-
declare const getUserScopedCredentialReference: (db:
|
|
21
|
+
declare const getUserScopedCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
22
22
|
scopes: ProjectScopeConfig;
|
|
23
23
|
toolId: string;
|
|
24
24
|
userId: string;
|
|
@@ -26,20 +26,20 @@ declare const getUserScopedCredentialReference: (db: DatabaseClient) => (params:
|
|
|
26
26
|
/**
|
|
27
27
|
* Get a credential reference by ID with its related tools
|
|
28
28
|
*/
|
|
29
|
-
declare const getCredentialReferenceWithResources: (db:
|
|
29
|
+
declare const getCredentialReferenceWithResources: (db: AgentsManageDatabaseClient) => (params: {
|
|
30
30
|
scopes: ProjectScopeConfig;
|
|
31
31
|
id: string;
|
|
32
32
|
}) => Promise<CredentialReferenceWithResources | undefined>;
|
|
33
33
|
/**
|
|
34
34
|
* List all credential references for a tenant/project
|
|
35
35
|
*/
|
|
36
|
-
declare const listCredentialReferences: (db:
|
|
36
|
+
declare const listCredentialReferences: (db: AgentsManageDatabaseClient) => (params: {
|
|
37
37
|
scopes: ProjectScopeConfig;
|
|
38
38
|
}) => Promise<CredentialReferenceSelect[]>;
|
|
39
39
|
/**
|
|
40
40
|
* List credential references with pagination
|
|
41
41
|
*/
|
|
42
|
-
declare const listCredentialReferencesPaginated: (db:
|
|
42
|
+
declare const listCredentialReferencesPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
43
43
|
scopes: ProjectScopeConfig;
|
|
44
44
|
pagination?: PaginationConfig;
|
|
45
45
|
}) => Promise<{
|
|
@@ -54,11 +54,11 @@ declare const listCredentialReferencesPaginated: (db: DatabaseClient) => (params
|
|
|
54
54
|
/**
|
|
55
55
|
* Create a new credential reference
|
|
56
56
|
*/
|
|
57
|
-
declare const createCredentialReference: (db:
|
|
57
|
+
declare const createCredentialReference: (db: AgentsManageDatabaseClient) => (params: CredentialReferenceInsert) => Promise<CredentialReferenceSelect>;
|
|
58
58
|
/**
|
|
59
59
|
* Update a credential reference
|
|
60
60
|
*/
|
|
61
|
-
declare const updateCredentialReference: (db:
|
|
61
|
+
declare const updateCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
62
62
|
scopes: ProjectScopeConfig;
|
|
63
63
|
id: string;
|
|
64
64
|
data: Partial<CredentialReferenceUpdate>;
|
|
@@ -66,34 +66,34 @@ declare const updateCredentialReference: (db: DatabaseClient) => (params: {
|
|
|
66
66
|
/**
|
|
67
67
|
* Delete a credential reference
|
|
68
68
|
*/
|
|
69
|
-
declare const deleteCredentialReference: (db:
|
|
69
|
+
declare const deleteCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
70
70
|
scopes: ProjectScopeConfig;
|
|
71
71
|
id: string;
|
|
72
72
|
}) => Promise<boolean>;
|
|
73
73
|
/**
|
|
74
74
|
* Check if a credential reference exists
|
|
75
75
|
*/
|
|
76
|
-
declare const hasCredentialReference: (db:
|
|
76
|
+
declare const hasCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
77
77
|
scopes: ProjectScopeConfig;
|
|
78
78
|
id: string;
|
|
79
79
|
}) => Promise<boolean>;
|
|
80
80
|
/**
|
|
81
81
|
* Get credential reference by ID (simple version without tools)
|
|
82
82
|
*/
|
|
83
|
-
declare const getCredentialReferenceById: (db:
|
|
83
|
+
declare const getCredentialReferenceById: (db: AgentsManageDatabaseClient) => (params: {
|
|
84
84
|
scopes: ProjectScopeConfig;
|
|
85
85
|
id: string;
|
|
86
86
|
}) => Promise<CredentialReferenceSelect | null>;
|
|
87
87
|
/**
|
|
88
88
|
* Count credential references for a tenant/project
|
|
89
89
|
*/
|
|
90
|
-
declare const countCredentialReferences: (db:
|
|
90
|
+
declare const countCredentialReferences: (db: AgentsManageDatabaseClient) => (params: {
|
|
91
91
|
scopes: ProjectScopeConfig;
|
|
92
92
|
}) => Promise<number>;
|
|
93
93
|
/**
|
|
94
94
|
* Upsert a credential reference (create if it doesn't exist, update if it does)
|
|
95
95
|
*/
|
|
96
|
-
declare const upsertCredentialReference: (db:
|
|
96
|
+
declare const upsertCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
97
97
|
data: CredentialReferenceInsert;
|
|
98
98
|
}) => Promise<CredentialReferenceSelect>;
|
|
99
99
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { credentialReferences, externalAgents, tools } from "
|
|
1
|
+
import { credentialReferences, externalAgents, tools } from "../../db/manage/manage-schema.js";
|
|
2
2
|
import { and, count, desc, eq, sql } from "drizzle-orm";
|
|
3
3
|
|
|
4
|
-
//#region src/data-access/credentialReferences.ts
|
|
4
|
+
//#region src/data-access/manage/credentialReferences.ts
|
|
5
5
|
/**
|
|
6
6
|
* Get a credential reference by ID
|
|
7
7
|
*/
|
|
@@ -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,45 +47,45 @@ 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<{
|
|
67
|
-
tenantId: string;
|
|
68
|
-
projectId: string;
|
|
69
67
|
id: string;
|
|
70
|
-
agentId: string;
|
|
71
68
|
createdAt: string;
|
|
69
|
+
tenantId: string;
|
|
70
|
+
agentId: string;
|
|
71
|
+
projectId: string;
|
|
72
72
|
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
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,35 +95,35 @@ 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<{
|
|
109
|
-
tenantId: string;
|
|
110
|
-
projectId: string;
|
|
111
109
|
id: string;
|
|
112
|
-
agentId: string;
|
|
113
110
|
createdAt: string;
|
|
111
|
+
tenantId: string;
|
|
112
|
+
agentId: string;
|
|
113
|
+
projectId: string;
|
|
114
114
|
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
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 };
|