@inkeep/agents-core 0.63.2 → 0.64.1
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/eval-api-client.d.ts +2 -12
- package/dist/api-client/eval-api-client.js +0 -15
- package/dist/api-client/index.d.ts +2 -2
- package/dist/auth/auth-schema.d.ts +86 -86
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/auth.js +28 -9
- package/dist/auth/entitlement-constants.d.ts +11 -0
- package/dist/auth/entitlement-constants.js +10 -0
- package/dist/auth/entitlement-lock.d.ts +6 -0
- package/dist/auth/entitlement-lock.js +13 -0
- package/dist/auth/entitlements.d.ts +11 -0
- package/dist/auth/entitlements.js +55 -0
- package/dist/auth/init.js +2 -4
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +6 -4
- package/dist/client-exports.js +4 -2
- package/dist/constants/models.d.ts +2 -1
- package/dist/constants/models.js +6 -1
- package/dist/constants/otel-attributes.d.ts +2 -0
- package/dist/constants/otel-attributes.js +2 -0
- package/dist/data-access/index.d.ts +5 -4
- package/dist/data-access/index.js +4 -3
- package/dist/data-access/manage/agents.d.ts +83 -41
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/evalConfig.d.ts +49 -3
- package/dist/data-access/manage/evalConfig.js +61 -3
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/projectLifecycle.d.ts +1 -1
- package/dist/data-access/manage/skills.d.ts +11 -11
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +26 -20
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +30 -18
- package/dist/data-access/manage/subAgents.d.ts +51 -15
- package/dist/data-access/manage/tools.d.ts +18 -18
- package/dist/data-access/manage/tools.js +41 -4
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +32 -41
- package/dist/data-access/runtime/cascade-delete.d.ts +1 -1
- package/dist/data-access/runtime/conversations.d.ts +21 -21
- package/dist/data-access/runtime/entitlements.d.ts +13 -0
- package/dist/data-access/runtime/entitlements.js +33 -0
- package/dist/data-access/runtime/ledgerArtifacts.d.ts +1 -1
- package/dist/data-access/runtime/messages.d.ts +25 -25
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +50 -5
- package/dist/data-access/runtime/scheduledTriggerInvocations.js +34 -1
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/data-access/runtime/workflowExecutions.d.ts +1 -1
- package/dist/data-reconciliation/types.d.ts +1 -1
- package/dist/db/clean.d.ts +1 -1
- package/dist/db/manage/manage-schema.d.ts +674 -596
- package/dist/db/manage/manage-schema.js +154 -134
- package/dist/db/runtime/runtime-schema.d.ts +501 -394
- package/dist/db/runtime/runtime-schema.js +20 -3
- package/dist/dolt/backfill-skill-files.d.ts +41 -0
- package/dist/dolt/backfill-skill-files.js +209 -0
- package/dist/dolt/run-sql-file-on-all-branches.d.ts +29 -0
- package/dist/dolt/run-sql-file-on-all-branches.js +177 -0
- package/dist/index.d.ts +20 -16
- package/dist/index.js +12 -8
- package/dist/middleware/create-protected-route.d.ts +3 -0
- package/dist/middleware/create-protected-route.js +7 -2
- package/dist/middleware/entitlement-meta.d.ts +9 -0
- package/dist/middleware/entitlement-meta.js +11 -0
- package/dist/middleware/index.d.ts +2 -1
- package/dist/middleware/index.js +2 -1
- package/dist/types/entities.d.ts +8 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +5 -6
- package/dist/utils/error.d.ts +54 -51
- package/dist/utils/error.js +3 -0
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +2 -2
- package/dist/utils/mcp-client.d.ts +1 -1
- package/dist/utils/mcp-client.js +1 -1
- package/dist/utils/model-factory.js +24 -9
- package/dist/utils/usage-cost-middleware.d.ts +2 -1
- package/dist/utils/usage-cost-middleware.js +22 -5
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas/skills.d.ts +45 -45
- package/dist/validation/schemas.d.ts +3829 -2894
- package/dist/validation/schemas.js +22 -24
- package/drizzle/manage/0016_complex_klaw.sql +2 -0
- package/drizzle/manage/0017_brief_doctor_strange.sql +29 -0
- package/drizzle/manage/meta/0016_snapshot.json +3530 -0
- package/drizzle/manage/meta/0017_snapshot.json +3748 -0
- package/drizzle/manage/meta/_journal.json +14 -0
- package/drizzle/runtime/0029_burly_satana.sql +13 -0
- package/drizzle/runtime/0030_set-allow-anonymous-for-existing-apps.sql +56 -0
- package/drizzle/runtime/meta/0029_snapshot.json +4756 -0
- package/drizzle/runtime/meta/_journal.json +14 -0
- package/package.json +3 -1
- /package/drizzle/runtime/meta/{0023_snapshot.json → 0025_snapshot.json} +0 -0
|
@@ -10,33 +10,34 @@ import { PgColumn } from "drizzle-orm/pg-core";
|
|
|
10
10
|
declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
11
11
|
scopes: AgentScopeConfig;
|
|
12
12
|
}) => Promise<{
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
13
15
|
id: string;
|
|
14
16
|
name: string;
|
|
15
17
|
description: string | null;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
projectId: string;
|
|
19
|
-
tenantId: string;
|
|
18
|
+
defaultSubAgentId: string | null;
|
|
19
|
+
contextConfigId: string | null;
|
|
20
20
|
models: {
|
|
21
21
|
base?: {
|
|
22
22
|
model?: string | undefined;
|
|
23
23
|
providerOptions?: Record<string, unknown> | undefined;
|
|
24
|
+
fallbackModels?: string[] | undefined;
|
|
25
|
+
allowedProviders?: string[] | undefined;
|
|
24
26
|
} | undefined;
|
|
25
27
|
structuredOutput?: {
|
|
26
28
|
model?: string | undefined;
|
|
27
29
|
providerOptions?: Record<string, unknown> | undefined;
|
|
30
|
+
fallbackModels?: string[] | undefined;
|
|
31
|
+
allowedProviders?: string[] | undefined;
|
|
28
32
|
} | undefined;
|
|
29
33
|
summarizer?: {
|
|
30
34
|
model?: string | undefined;
|
|
31
35
|
providerOptions?: Record<string, unknown> | undefined;
|
|
36
|
+
fallbackModels?: string[] | undefined;
|
|
37
|
+
allowedProviders?: string[] | undefined;
|
|
32
38
|
} | undefined;
|
|
33
39
|
} | null;
|
|
34
|
-
stopWhen: {
|
|
35
|
-
transferCountIs?: number | undefined;
|
|
36
|
-
} | null;
|
|
37
40
|
prompt: string | null;
|
|
38
|
-
defaultSubAgentId: string | null;
|
|
39
|
-
contextConfigId: string | null;
|
|
40
41
|
statusUpdates: {
|
|
41
42
|
enabled?: boolean | undefined;
|
|
42
43
|
numEvents?: number | undefined;
|
|
@@ -52,38 +53,44 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
52
53
|
} | undefined;
|
|
53
54
|
}[] | undefined;
|
|
54
55
|
} | null;
|
|
56
|
+
stopWhen: {
|
|
57
|
+
transferCountIs?: number | undefined;
|
|
58
|
+
} | null;
|
|
55
59
|
executionMode: "classic" | "durable";
|
|
60
|
+
createdAt: string;
|
|
61
|
+
updatedAt: string;
|
|
56
62
|
} | null>;
|
|
57
63
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
64
|
scopes: AgentScopeConfig;
|
|
59
65
|
}) => Promise<{
|
|
66
|
+
tenantId: string;
|
|
67
|
+
projectId: string;
|
|
60
68
|
id: string;
|
|
61
69
|
name: string;
|
|
62
70
|
description: string | null;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
projectId: string;
|
|
66
|
-
tenantId: string;
|
|
71
|
+
defaultSubAgentId: string | null;
|
|
72
|
+
contextConfigId: string | null;
|
|
67
73
|
models: {
|
|
68
74
|
base?: {
|
|
69
75
|
model?: string | undefined;
|
|
70
76
|
providerOptions?: Record<string, unknown> | undefined;
|
|
77
|
+
fallbackModels?: string[] | undefined;
|
|
78
|
+
allowedProviders?: string[] | undefined;
|
|
71
79
|
} | undefined;
|
|
72
80
|
structuredOutput?: {
|
|
73
81
|
model?: string | undefined;
|
|
74
82
|
providerOptions?: Record<string, unknown> | undefined;
|
|
83
|
+
fallbackModels?: string[] | undefined;
|
|
84
|
+
allowedProviders?: string[] | undefined;
|
|
75
85
|
} | undefined;
|
|
76
86
|
summarizer?: {
|
|
77
87
|
model?: string | undefined;
|
|
78
88
|
providerOptions?: Record<string, unknown> | undefined;
|
|
89
|
+
fallbackModels?: string[] | undefined;
|
|
90
|
+
allowedProviders?: string[] | undefined;
|
|
79
91
|
} | undefined;
|
|
80
92
|
} | null;
|
|
81
|
-
stopWhen: {
|
|
82
|
-
transferCountIs?: number | undefined;
|
|
83
|
-
} | null;
|
|
84
93
|
prompt: string | null;
|
|
85
|
-
defaultSubAgentId: string | null;
|
|
86
|
-
contextConfigId: string | null;
|
|
87
94
|
statusUpdates: {
|
|
88
95
|
enabled?: boolean | undefined;
|
|
89
96
|
numEvents?: number | undefined;
|
|
@@ -99,67 +106,79 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
99
106
|
} | undefined;
|
|
100
107
|
}[] | undefined;
|
|
101
108
|
} | null;
|
|
109
|
+
stopWhen: {
|
|
110
|
+
transferCountIs?: number | undefined;
|
|
111
|
+
} | null;
|
|
102
112
|
executionMode: "classic" | "durable";
|
|
113
|
+
createdAt: string;
|
|
114
|
+
updatedAt: string;
|
|
103
115
|
defaultSubAgent: {
|
|
116
|
+
tenantId: string;
|
|
117
|
+
projectId: string;
|
|
104
118
|
id: string;
|
|
105
119
|
name: string;
|
|
106
120
|
description: string | null;
|
|
107
|
-
createdAt: string;
|
|
108
|
-
updatedAt: string;
|
|
109
|
-
projectId: string;
|
|
110
|
-
tenantId: string;
|
|
111
121
|
models: {
|
|
112
122
|
base?: {
|
|
113
123
|
model?: string | undefined;
|
|
114
124
|
providerOptions?: Record<string, unknown> | undefined;
|
|
125
|
+
fallbackModels?: string[] | undefined;
|
|
126
|
+
allowedProviders?: string[] | undefined;
|
|
115
127
|
} | undefined;
|
|
116
128
|
structuredOutput?: {
|
|
117
129
|
model?: string | undefined;
|
|
118
130
|
providerOptions?: Record<string, unknown> | undefined;
|
|
131
|
+
fallbackModels?: string[] | undefined;
|
|
132
|
+
allowedProviders?: string[] | undefined;
|
|
119
133
|
} | undefined;
|
|
120
134
|
summarizer?: {
|
|
121
135
|
model?: string | undefined;
|
|
122
136
|
providerOptions?: Record<string, unknown> | undefined;
|
|
137
|
+
fallbackModels?: string[] | undefined;
|
|
138
|
+
allowedProviders?: string[] | undefined;
|
|
123
139
|
} | undefined;
|
|
124
140
|
} | null;
|
|
141
|
+
prompt: string | null;
|
|
125
142
|
stopWhen: {
|
|
126
143
|
stepCountIs?: number | undefined;
|
|
127
144
|
} | null;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
updatedAt: string;
|
|
128
147
|
agentId: string;
|
|
129
|
-
prompt: string | null;
|
|
130
148
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
131
149
|
} | null;
|
|
132
150
|
} | null>;
|
|
133
151
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
134
152
|
scopes: ProjectScopeConfig;
|
|
135
153
|
}) => Promise<{
|
|
154
|
+
tenantId: string;
|
|
155
|
+
projectId: string;
|
|
136
156
|
id: string;
|
|
137
157
|
name: string;
|
|
138
158
|
description: string | null;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
projectId: string;
|
|
142
|
-
tenantId: string;
|
|
159
|
+
defaultSubAgentId: string | null;
|
|
160
|
+
contextConfigId: string | null;
|
|
143
161
|
models: {
|
|
144
162
|
base?: {
|
|
145
163
|
model?: string | undefined;
|
|
146
164
|
providerOptions?: Record<string, unknown> | undefined;
|
|
165
|
+
fallbackModels?: string[] | undefined;
|
|
166
|
+
allowedProviders?: string[] | undefined;
|
|
147
167
|
} | undefined;
|
|
148
168
|
structuredOutput?: {
|
|
149
169
|
model?: string | undefined;
|
|
150
170
|
providerOptions?: Record<string, unknown> | undefined;
|
|
171
|
+
fallbackModels?: string[] | undefined;
|
|
172
|
+
allowedProviders?: string[] | undefined;
|
|
151
173
|
} | undefined;
|
|
152
174
|
summarizer?: {
|
|
153
175
|
model?: string | undefined;
|
|
154
176
|
providerOptions?: Record<string, unknown> | undefined;
|
|
177
|
+
fallbackModels?: string[] | undefined;
|
|
178
|
+
allowedProviders?: string[] | undefined;
|
|
155
179
|
} | undefined;
|
|
156
180
|
} | null;
|
|
157
|
-
stopWhen: {
|
|
158
|
-
transferCountIs?: number | undefined;
|
|
159
|
-
} | null;
|
|
160
181
|
prompt: string | null;
|
|
161
|
-
defaultSubAgentId: string | null;
|
|
162
|
-
contextConfigId: string | null;
|
|
163
182
|
statusUpdates: {
|
|
164
183
|
enabled?: boolean | undefined;
|
|
165
184
|
numEvents?: number | undefined;
|
|
@@ -175,7 +194,12 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
175
194
|
} | undefined;
|
|
176
195
|
}[] | undefined;
|
|
177
196
|
} | null;
|
|
197
|
+
stopWhen: {
|
|
198
|
+
transferCountIs?: number | undefined;
|
|
199
|
+
} | null;
|
|
178
200
|
executionMode: "classic" | "durable";
|
|
201
|
+
createdAt: string;
|
|
202
|
+
updatedAt: string;
|
|
179
203
|
}[]>;
|
|
180
204
|
declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
181
205
|
scopes: ProjectScopeConfig;
|
|
@@ -190,14 +214,20 @@ declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params:
|
|
|
190
214
|
base?: {
|
|
191
215
|
model?: string | undefined;
|
|
192
216
|
providerOptions?: Record<string, unknown> | undefined;
|
|
217
|
+
fallbackModels?: string[] | undefined;
|
|
218
|
+
allowedProviders?: string[] | undefined;
|
|
193
219
|
} | undefined;
|
|
194
220
|
structuredOutput?: {
|
|
195
221
|
model?: string | undefined;
|
|
196
222
|
providerOptions?: Record<string, unknown> | undefined;
|
|
223
|
+
fallbackModels?: string[] | undefined;
|
|
224
|
+
allowedProviders?: string[] | undefined;
|
|
197
225
|
} | undefined;
|
|
198
226
|
summarizer?: {
|
|
199
227
|
model?: string | undefined;
|
|
200
228
|
providerOptions?: Record<string, unknown> | undefined;
|
|
229
|
+
fallbackModels?: string[] | undefined;
|
|
230
|
+
allowedProviders?: string[] | undefined;
|
|
201
231
|
} | undefined;
|
|
202
232
|
} | null;
|
|
203
233
|
statusUpdates: {
|
|
@@ -251,33 +281,34 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
251
281
|
projectIds: string[];
|
|
252
282
|
}): Promise<AvailableAgentInfo[]>;
|
|
253
283
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
284
|
+
tenantId: string;
|
|
285
|
+
projectId: string;
|
|
254
286
|
id: string;
|
|
255
287
|
name: string;
|
|
256
288
|
description: string | null;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
projectId: string;
|
|
260
|
-
tenantId: string;
|
|
289
|
+
defaultSubAgentId: string | null;
|
|
290
|
+
contextConfigId: string | null;
|
|
261
291
|
models: {
|
|
262
292
|
base?: {
|
|
263
293
|
model?: string | undefined;
|
|
264
294
|
providerOptions?: Record<string, unknown> | undefined;
|
|
295
|
+
fallbackModels?: string[] | undefined;
|
|
296
|
+
allowedProviders?: string[] | undefined;
|
|
265
297
|
} | undefined;
|
|
266
298
|
structuredOutput?: {
|
|
267
299
|
model?: string | undefined;
|
|
268
300
|
providerOptions?: Record<string, unknown> | undefined;
|
|
301
|
+
fallbackModels?: string[] | undefined;
|
|
302
|
+
allowedProviders?: string[] | undefined;
|
|
269
303
|
} | undefined;
|
|
270
304
|
summarizer?: {
|
|
271
305
|
model?: string | undefined;
|
|
272
306
|
providerOptions?: Record<string, unknown> | undefined;
|
|
307
|
+
fallbackModels?: string[] | undefined;
|
|
308
|
+
allowedProviders?: string[] | undefined;
|
|
273
309
|
} | undefined;
|
|
274
310
|
} | null;
|
|
275
|
-
stopWhen: {
|
|
276
|
-
transferCountIs?: number | undefined;
|
|
277
|
-
} | null;
|
|
278
311
|
prompt: string | null;
|
|
279
|
-
defaultSubAgentId: string | null;
|
|
280
|
-
contextConfigId: string | null;
|
|
281
312
|
statusUpdates: {
|
|
282
313
|
enabled?: boolean | undefined;
|
|
283
314
|
numEvents?: number | undefined;
|
|
@@ -293,7 +324,12 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
293
324
|
} | undefined;
|
|
294
325
|
}[] | undefined;
|
|
295
326
|
} | null;
|
|
327
|
+
stopWhen: {
|
|
328
|
+
transferCountIs?: number | undefined;
|
|
329
|
+
} | null;
|
|
296
330
|
executionMode: "classic" | "durable";
|
|
331
|
+
createdAt: string;
|
|
332
|
+
updatedAt: string;
|
|
297
333
|
}>;
|
|
298
334
|
declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
299
335
|
scopes: AgentScopeConfig;
|
|
@@ -307,14 +343,20 @@ declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
307
343
|
base?: {
|
|
308
344
|
model?: string | undefined;
|
|
309
345
|
providerOptions?: Record<string, unknown> | undefined;
|
|
346
|
+
fallbackModels?: string[] | undefined;
|
|
347
|
+
allowedProviders?: string[] | undefined;
|
|
310
348
|
} | undefined;
|
|
311
349
|
structuredOutput?: {
|
|
312
350
|
model?: string | undefined;
|
|
313
351
|
providerOptions?: Record<string, unknown> | undefined;
|
|
352
|
+
fallbackModels?: string[] | undefined;
|
|
353
|
+
allowedProviders?: string[] | undefined;
|
|
314
354
|
} | undefined;
|
|
315
355
|
summarizer?: {
|
|
316
356
|
model?: string | undefined;
|
|
317
357
|
providerOptions?: Record<string, unknown> | undefined;
|
|
358
|
+
fallbackModels?: string[] | undefined;
|
|
359
|
+
allowedProviders?: string[] | undefined;
|
|
318
360
|
} | undefined;
|
|
319
361
|
} | null;
|
|
320
362
|
statusUpdates: {
|
|
@@ -9,13 +9,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
9
9
|
scopes: ProjectScopeConfig;
|
|
10
10
|
id: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
+
tenantId: string;
|
|
13
|
+
projectId: string;
|
|
12
14
|
id: string;
|
|
13
15
|
name: string;
|
|
14
16
|
description: string | null;
|
|
15
17
|
createdAt: string;
|
|
16
18
|
updatedAt: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
19
|
props: {
|
|
20
20
|
[x: string]: unknown;
|
|
21
21
|
type: "object";
|
|
@@ -65,13 +65,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
67
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
68
|
+
tenantId: string;
|
|
69
|
+
projectId: string;
|
|
68
70
|
id: string;
|
|
69
71
|
name: string;
|
|
70
72
|
description: string | null;
|
|
71
73
|
createdAt: string;
|
|
72
74
|
updatedAt: string;
|
|
73
|
-
projectId: string;
|
|
74
|
-
tenantId: string;
|
|
75
75
|
props: {
|
|
76
76
|
[x: string]: unknown;
|
|
77
77
|
type: "object";
|
|
@@ -141,10 +141,10 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
141
141
|
scopes: SubAgentScopeConfig;
|
|
142
142
|
artifactComponentId: string;
|
|
143
143
|
}) => Promise<{
|
|
144
|
+
tenantId: string;
|
|
145
|
+
projectId: string;
|
|
144
146
|
id: string;
|
|
145
147
|
createdAt: string;
|
|
146
|
-
projectId: string;
|
|
147
|
-
tenantId: string;
|
|
148
148
|
agentId: string;
|
|
149
149
|
subAgentId: string;
|
|
150
150
|
artifactComponentId: string;
|
|
@@ -184,10 +184,10 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
184
184
|
scopes: SubAgentScopeConfig;
|
|
185
185
|
artifactComponentId: string;
|
|
186
186
|
}) => Promise<{
|
|
187
|
+
tenantId: string;
|
|
188
|
+
projectId: string;
|
|
187
189
|
id: string;
|
|
188
190
|
createdAt: string;
|
|
189
|
-
projectId: string;
|
|
190
|
-
tenantId: string;
|
|
191
191
|
agentId: string;
|
|
192
192
|
subAgentId: string;
|
|
193
193
|
artifactComponentId: string;
|
|
@@ -9,11 +9,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
id: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
+
tenantId: string;
|
|
13
|
+
projectId: string;
|
|
12
14
|
id: string;
|
|
13
15
|
createdAt: string;
|
|
14
16
|
updatedAt: string;
|
|
15
|
-
projectId: string;
|
|
16
|
-
tenantId: string;
|
|
17
17
|
agentId: string;
|
|
18
18
|
headersSchema: unknown;
|
|
19
19
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
@@ -21,11 +21,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
21
21
|
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
22
22
|
scopes: AgentScopeConfig;
|
|
23
23
|
}) => Promise<{
|
|
24
|
+
tenantId: string;
|
|
25
|
+
projectId: string;
|
|
24
26
|
id: string;
|
|
25
27
|
createdAt: string;
|
|
26
28
|
updatedAt: string;
|
|
27
|
-
projectId: string;
|
|
28
|
-
tenantId: string;
|
|
29
29
|
agentId: string;
|
|
30
30
|
headersSchema: unknown;
|
|
31
31
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
@@ -43,11 +43,11 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
45
45
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
46
|
+
tenantId: string;
|
|
47
|
+
projectId: string;
|
|
46
48
|
id: string;
|
|
47
49
|
createdAt: string;
|
|
48
50
|
updatedAt: string;
|
|
49
|
-
projectId: string;
|
|
50
|
-
tenantId: string;
|
|
51
51
|
agentId: string;
|
|
52
52
|
headersSchema: unknown;
|
|
53
53
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
@@ -83,11 +83,11 @@ declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params:
|
|
|
83
83
|
declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
84
84
|
data: ContextConfigInsert;
|
|
85
85
|
}) => Promise<{
|
|
86
|
+
tenantId: string;
|
|
87
|
+
projectId: string;
|
|
86
88
|
id: string;
|
|
87
89
|
createdAt: string;
|
|
88
90
|
updatedAt: string;
|
|
89
|
-
projectId: string;
|
|
90
|
-
tenantId: string;
|
|
91
91
|
agentId: string;
|
|
92
92
|
headersSchema: unknown;
|
|
93
93
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
@@ -65,10 +65,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
scopes: SubAgentScopeConfig;
|
|
66
66
|
dataComponentId: string;
|
|
67
67
|
}) => Promise<{
|
|
68
|
+
tenantId: string;
|
|
69
|
+
projectId: string;
|
|
68
70
|
id: string;
|
|
69
71
|
createdAt: string;
|
|
70
|
-
projectId: string;
|
|
71
|
-
tenantId: string;
|
|
72
72
|
agentId: string;
|
|
73
73
|
subAgentId: string;
|
|
74
74
|
dataComponentId: string;
|
|
@@ -107,10 +107,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
107
107
|
scopes: SubAgentScopeConfig;
|
|
108
108
|
dataComponentId: string;
|
|
109
109
|
}) => Promise<{
|
|
110
|
+
tenantId: string;
|
|
111
|
+
projectId: string;
|
|
110
112
|
id: string;
|
|
111
113
|
createdAt: string;
|
|
112
|
-
projectId: string;
|
|
113
|
-
tenantId: string;
|
|
114
114
|
agentId: string;
|
|
115
115
|
subAgentId: string;
|
|
116
116
|
dataComponentId: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
2
|
import "../../types/utility.js";
|
|
3
|
-
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
4
3
|
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
5
|
-
import {
|
|
4
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
5
|
+
import { AgentDatasetRelationInsert, AgentDatasetRelationSelect, AgentEvaluatorRelationInsert, AgentEvaluatorRelationSelect, 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";
|
|
6
6
|
|
|
7
7
|
//#region src/data-access/manage/evalConfig.d.ts
|
|
8
8
|
declare const getDatasetById: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -218,5 +218,51 @@ declare const linkDatasetRunToEvaluationJobConfig: (db: AgentsRunDatabaseClient)
|
|
|
218
218
|
};
|
|
219
219
|
evaluationJobConfigId: string;
|
|
220
220
|
}) => Promise<void>;
|
|
221
|
+
declare const getAgentDatasetRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
222
|
+
scopes: ProjectScopeConfig & {
|
|
223
|
+
agentId: string;
|
|
224
|
+
};
|
|
225
|
+
}) => Promise<AgentDatasetRelationSelect[]>;
|
|
226
|
+
declare const getAgentDatasetRelationsByDataset: (db: AgentsManageDatabaseClient) => (params: {
|
|
227
|
+
scopes: ProjectScopeConfig & {
|
|
228
|
+
datasetId: string;
|
|
229
|
+
};
|
|
230
|
+
}) => Promise<AgentDatasetRelationSelect[]>;
|
|
231
|
+
declare const createAgentDatasetRelation: (db: AgentsManageDatabaseClient) => (data: AgentDatasetRelationInsert) => Promise<AgentDatasetRelationSelect>;
|
|
232
|
+
declare const deleteAgentDatasetRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
233
|
+
scopes: ProjectScopeConfig & {
|
|
234
|
+
agentId: string;
|
|
235
|
+
datasetId: string;
|
|
236
|
+
};
|
|
237
|
+
}) => Promise<boolean>;
|
|
238
|
+
declare const getAgentEvaluatorRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
239
|
+
scopes: ProjectScopeConfig & {
|
|
240
|
+
agentId: string;
|
|
241
|
+
};
|
|
242
|
+
}) => Promise<AgentEvaluatorRelationSelect[]>;
|
|
243
|
+
declare const getAgentEvaluatorRelationsByEvaluator: (db: AgentsManageDatabaseClient) => (params: {
|
|
244
|
+
scopes: ProjectScopeConfig & {
|
|
245
|
+
evaluatorId: string;
|
|
246
|
+
};
|
|
247
|
+
}) => Promise<AgentEvaluatorRelationSelect[]>;
|
|
248
|
+
declare const createAgentEvaluatorRelation: (db: AgentsManageDatabaseClient) => (data: AgentEvaluatorRelationInsert) => Promise<AgentEvaluatorRelationSelect>;
|
|
249
|
+
declare const deleteAgentEvaluatorRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
250
|
+
scopes: ProjectScopeConfig & {
|
|
251
|
+
agentId: string;
|
|
252
|
+
evaluatorId: string;
|
|
253
|
+
};
|
|
254
|
+
}) => Promise<boolean>;
|
|
255
|
+
declare const listDatasetsForAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
256
|
+
scopes: ProjectScopeConfig;
|
|
257
|
+
agentId: string;
|
|
258
|
+
}) => Promise<DatasetSelect[]>;
|
|
259
|
+
declare const listEvaluatorsForAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
260
|
+
scopes: ProjectScopeConfig;
|
|
261
|
+
agentId: string;
|
|
262
|
+
}) => Promise<EvaluatorSelect[]>;
|
|
263
|
+
declare const getAgentIdsForEvaluators: (db: AgentsManageDatabaseClient) => (params: {
|
|
264
|
+
scopes: ProjectScopeConfig;
|
|
265
|
+
evaluatorIds: string[];
|
|
266
|
+
}) => Promise<Map<string, string[]>>;
|
|
221
267
|
//#endregion
|
|
222
|
-
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 };
|
|
268
|
+
export { createAgentDatasetRelation, createAgentEvaluatorRelation, createDataset, createDatasetItem, createDatasetItems, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, deleteAgentDatasetRelation, deleteAgentEvaluatorRelation, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, getAgentDatasetRelationsByAgent, getAgentDatasetRelationsByDataset, getAgentEvaluatorRelationsByAgent, getAgentEvaluatorRelationsByEvaluator, getAgentIdsForEvaluators, getDatasetById, getDatasetItemById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, linkDatasetRunToEvaluationJobConfig, listDatasetItems, listDatasetRunConfigs, listDatasets, listDatasetsForAgent, listEvaluationJobConfigs, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationSuiteConfigs, listEvaluators, listEvaluatorsForAgent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator } from "../../db/manage/manage-schema.js";
|
|
1
|
+
import { agentDatasetRelations, agentEvaluatorRelations, dataset, datasetItem, datasetRunConfig, datasetRunConfigAgentRelations, evaluationJobConfig, evaluationJobConfigEvaluatorRelations, evaluationRunConfig, evaluationRunConfigEvaluationSuiteConfigRelations, evaluationSuiteConfig, evaluationSuiteConfigEvaluatorRelations, evaluator } from "../../db/manage/manage-schema.js";
|
|
2
2
|
import { datasetRun } from "../../db/runtime/runtime-schema.js";
|
|
3
3
|
import { projectScopedWhere } from "./scope-helpers.js";
|
|
4
|
-
import { and, eq, inArray } from "drizzle-orm";
|
|
4
|
+
import { and, eq, inArray, isNull, or } from "drizzle-orm";
|
|
5
5
|
|
|
6
6
|
//#region src/data-access/manage/evalConfig.ts
|
|
7
7
|
const getDatasetById = (db) => async (params) => {
|
|
@@ -271,6 +271,64 @@ const deleteEvaluationJobConfigEvaluatorRelationsByEvaluator = (db) => async (pa
|
|
|
271
271
|
const linkDatasetRunToEvaluationJobConfig = (db) => async (params) => {
|
|
272
272
|
await db.update(datasetRun).set({ evaluationJobConfigId: params.evaluationJobConfigId }).where(and(projectScopedWhere(datasetRun, params.scopes), eq(datasetRun.id, params.scopes.datasetRunId)));
|
|
273
273
|
};
|
|
274
|
+
const getAgentDatasetRelationsByAgent = (db) => async (params) => {
|
|
275
|
+
return await db.select().from(agentDatasetRelations).where(and(projectScopedWhere(agentDatasetRelations, params.scopes), eq(agentDatasetRelations.agentId, params.scopes.agentId)));
|
|
276
|
+
};
|
|
277
|
+
const getAgentDatasetRelationsByDataset = (db) => async (params) => {
|
|
278
|
+
return await db.select().from(agentDatasetRelations).where(and(projectScopedWhere(agentDatasetRelations, params.scopes), eq(agentDatasetRelations.datasetId, params.scopes.datasetId)));
|
|
279
|
+
};
|
|
280
|
+
const createAgentDatasetRelation = (db) => async (data) => {
|
|
281
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
282
|
+
const [created] = await db.insert(agentDatasetRelations).values({
|
|
283
|
+
...data,
|
|
284
|
+
createdAt: now,
|
|
285
|
+
updatedAt: now
|
|
286
|
+
}).returning();
|
|
287
|
+
return created;
|
|
288
|
+
};
|
|
289
|
+
const deleteAgentDatasetRelation = (db) => async (params) => {
|
|
290
|
+
return (await db.delete(agentDatasetRelations).where(and(projectScopedWhere(agentDatasetRelations, params.scopes), eq(agentDatasetRelations.agentId, params.scopes.agentId), eq(agentDatasetRelations.datasetId, params.scopes.datasetId))).returning()).length > 0;
|
|
291
|
+
};
|
|
292
|
+
const getAgentEvaluatorRelationsByAgent = (db) => async (params) => {
|
|
293
|
+
return await db.select().from(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), eq(agentEvaluatorRelations.agentId, params.scopes.agentId)));
|
|
294
|
+
};
|
|
295
|
+
const getAgentEvaluatorRelationsByEvaluator = (db) => async (params) => {
|
|
296
|
+
return await db.select().from(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), eq(agentEvaluatorRelations.evaluatorId, params.scopes.evaluatorId)));
|
|
297
|
+
};
|
|
298
|
+
const createAgentEvaluatorRelation = (db) => async (data) => {
|
|
299
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
300
|
+
const [created] = await db.insert(agentEvaluatorRelations).values({
|
|
301
|
+
...data,
|
|
302
|
+
createdAt: now,
|
|
303
|
+
updatedAt: now
|
|
304
|
+
}).returning();
|
|
305
|
+
return created;
|
|
306
|
+
};
|
|
307
|
+
const deleteAgentEvaluatorRelation = (db) => async (params) => {
|
|
308
|
+
return (await db.delete(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), eq(agentEvaluatorRelations.agentId, params.scopes.agentId), eq(agentEvaluatorRelations.evaluatorId, params.scopes.evaluatorId))).returning()).length > 0;
|
|
309
|
+
};
|
|
310
|
+
const listDatasetsForAgent = (db) => async (params) => {
|
|
311
|
+
const { scopes, agentId } = params;
|
|
312
|
+
return (await db.select({ dataset }).from(dataset).leftJoin(agentDatasetRelations, and(eq(dataset.tenantId, agentDatasetRelations.tenantId), eq(dataset.projectId, agentDatasetRelations.projectId), eq(dataset.id, agentDatasetRelations.datasetId))).where(and(projectScopedWhere(dataset, scopes), or(isNull(agentDatasetRelations.agentId), eq(agentDatasetRelations.agentId, agentId))))).map((r) => r.dataset);
|
|
313
|
+
};
|
|
314
|
+
const listEvaluatorsForAgent = (db) => async (params) => {
|
|
315
|
+
const { scopes, agentId } = params;
|
|
316
|
+
return (await db.select({ evaluator }).from(evaluator).leftJoin(agentEvaluatorRelations, and(eq(evaluator.tenantId, agentEvaluatorRelations.tenantId), eq(evaluator.projectId, agentEvaluatorRelations.projectId), eq(evaluator.id, agentEvaluatorRelations.evaluatorId))).where(and(projectScopedWhere(evaluator, scopes), or(isNull(agentEvaluatorRelations.agentId), eq(agentEvaluatorRelations.agentId, agentId))))).map((r) => r.evaluator);
|
|
317
|
+
};
|
|
318
|
+
const getAgentIdsForEvaluators = (db) => async (params) => {
|
|
319
|
+
if (params.evaluatorIds.length === 0) return /* @__PURE__ */ new Map();
|
|
320
|
+
const rows = await db.select({
|
|
321
|
+
evaluatorId: agentEvaluatorRelations.evaluatorId,
|
|
322
|
+
agentId: agentEvaluatorRelations.agentId
|
|
323
|
+
}).from(agentEvaluatorRelations).where(and(projectScopedWhere(agentEvaluatorRelations, params.scopes), inArray(agentEvaluatorRelations.evaluatorId, params.evaluatorIds)));
|
|
324
|
+
const result = /* @__PURE__ */ new Map();
|
|
325
|
+
for (const row of rows) {
|
|
326
|
+
const existing = result.get(row.evaluatorId) ?? [];
|
|
327
|
+
existing.push(row.agentId);
|
|
328
|
+
result.set(row.evaluatorId, existing);
|
|
329
|
+
}
|
|
330
|
+
return result;
|
|
331
|
+
};
|
|
274
332
|
|
|
275
333
|
//#endregion
|
|
276
|
-
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 };
|
|
334
|
+
export { createAgentDatasetRelation, createAgentEvaluatorRelation, createDataset, createDatasetItem, createDatasetItems, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, deleteAgentDatasetRelation, deleteAgentEvaluatorRelation, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, getAgentDatasetRelationsByAgent, getAgentDatasetRelationsByDataset, getAgentEvaluatorRelationsByAgent, getAgentEvaluatorRelationsByEvaluator, getAgentIdsForEvaluators, getDatasetById, getDatasetItemById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, linkDatasetRunToEvaluationJobConfig, listDatasetItems, listDatasetRunConfigs, listDatasets, listDatasetsForAgent, listEvaluationJobConfigs, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationSuiteConfigs, listEvaluators, listEvaluatorsForAgent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator };
|
|
@@ -53,13 +53,13 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
53
53
|
data: FunctionToolApiInsert;
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
|
+
tenantId: string;
|
|
57
|
+
projectId: string;
|
|
56
58
|
id: string;
|
|
57
59
|
name: string;
|
|
58
60
|
description: string | null;
|
|
59
61
|
createdAt: string;
|
|
60
62
|
updatedAt: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
tenantId: string;
|
|
63
63
|
agentId: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
@@ -95,13 +95,13 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
95
95
|
data: FunctionToolApiInsert;
|
|
96
96
|
scopes: AgentScopeConfig;
|
|
97
97
|
}) => Promise<{
|
|
98
|
+
tenantId: string;
|
|
99
|
+
projectId: string;
|
|
98
100
|
id: string;
|
|
99
101
|
name: string;
|
|
100
102
|
description: string | null;
|
|
101
103
|
createdAt: string;
|
|
102
104
|
updatedAt: string;
|
|
103
|
-
projectId: string;
|
|
104
|
-
tenantId: string;
|
|
105
105
|
agentId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
@@ -157,17 +157,17 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
157
157
|
needsApproval?: boolean;
|
|
158
158
|
}> | null;
|
|
159
159
|
}) => Promise<{
|
|
160
|
+
tenantId: string;
|
|
161
|
+
projectId: string;
|
|
160
162
|
id: string;
|
|
161
163
|
createdAt: string;
|
|
162
164
|
updatedAt: string;
|
|
163
|
-
projectId: string;
|
|
164
|
-
tenantId: string;
|
|
165
165
|
agentId: string;
|
|
166
|
-
subAgentId: string;
|
|
167
|
-
functionToolId: string;
|
|
168
166
|
toolPolicies: Record<string, {
|
|
169
167
|
needsApproval?: boolean;
|
|
170
168
|
}> | null;
|
|
169
|
+
subAgentId: string;
|
|
170
|
+
functionToolId: string;
|
|
171
171
|
}>;
|
|
172
172
|
/**
|
|
173
173
|
* Update an agent-function tool relation
|
|
@@ -222,17 +222,17 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
222
222
|
needsApproval?: boolean;
|
|
223
223
|
}> | null;
|
|
224
224
|
}) => Promise<{
|
|
225
|
+
tenantId: string;
|
|
226
|
+
projectId: string;
|
|
225
227
|
id: string;
|
|
226
228
|
createdAt: string;
|
|
227
229
|
updatedAt: string;
|
|
228
|
-
projectId: string;
|
|
229
|
-
tenantId: string;
|
|
230
230
|
agentId: string;
|
|
231
|
-
subAgentId: string;
|
|
232
|
-
functionToolId: string;
|
|
233
231
|
toolPolicies: Record<string, {
|
|
234
232
|
needsApproval?: boolean;
|
|
235
233
|
}> | null;
|
|
234
|
+
subAgentId: string;
|
|
235
|
+
functionToolId: string;
|
|
236
236
|
}>;
|
|
237
237
|
//#endregion
|
|
238
238
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaginationConfig, PaginationResult, ProjectModels } from "../../types/utility.js";
|
|
2
|
-
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
2
|
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
3
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
4
4
|
import { StopWhen } from "../../validation/schemas.js";
|
|
5
5
|
import { ProjectMetadataSelect } from "../../types/entities.js";
|
|
6
6
|
|