@inkeep/agents-core 0.0.0-dev-20260123205017 → 0.0.0-dev-20260123211824
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/auth/auth-schema.d.ts +82 -82
- package/dist/auth/auth-validation-schemas.d.ts +129 -129
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/auth.js +16 -12
- package/dist/auth/authz/client.d.ts +9 -3
- package/dist/auth/authz/client.js +24 -17
- package/dist/auth/authz/config.d.ts +51 -24
- package/dist/auth/authz/config.js +44 -27
- package/dist/auth/authz/index.d.ts +3 -3
- package/dist/auth/authz/index.js +3 -3
- package/dist/auth/authz/permissions.d.ts +0 -4
- package/dist/auth/authz/permissions.js +13 -13
- package/dist/auth/authz/sync.d.ts +23 -2
- package/dist/auth/authz/sync.js +136 -52
- package/dist/client-exports.d.ts +6 -6
- package/dist/client-exports.js +2 -1
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +2 -2
- package/dist/data-access/manage/agents.d.ts +37 -37
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +18 -18
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +27 -27
- package/dist/data-access/manage/tools.d.ts +30 -30
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/conversations.d.ts +20 -20
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/organizations.d.ts +2 -2
- package/dist/data-access/runtime/organizations.js +2 -2
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/db/manage/manage-schema.d.ts +377 -377
- package/dist/db/runtime/runtime-schema.d.ts +175 -175
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/validation/schemas.d.ts +1479 -1479
- package/package.json +2 -1
- package/spicedb/schema.zed +114 -0
package/dist/auth/authz/sync.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpiceDbRelations, SpiceDbResourceTypes, isAuthzEnabled } from "./config.js";
|
|
2
|
-
import { deleteRelationship, getSpiceClient, readRelationships, writeRelationship } from "./client.js";
|
|
2
|
+
import { RelationshipOperation, deleteRelationship, getSpiceClient, readRelationships, writeRelationship } from "./client.js";
|
|
3
3
|
|
|
4
4
|
//#region src/auth/authz/sync.ts
|
|
5
5
|
/**
|
|
@@ -7,15 +7,12 @@ import { deleteRelationship, getSpiceClient, readRelationships, writeRelationshi
|
|
|
7
7
|
*
|
|
8
8
|
* Functions for syncing data between better-auth and SpiceDB.
|
|
9
9
|
*/
|
|
10
|
-
const RELATIONSHIP_OPERATION_CREATE = 1;
|
|
11
|
-
const RELATIONSHIP_OPERATION_TOUCH = 2;
|
|
12
|
-
const RELATIONSHIP_OPERATION_DELETE = 3;
|
|
13
10
|
/**
|
|
14
11
|
* Sync a user's org membership to SpiceDB.
|
|
15
12
|
* Call when: user joins org, role changes, user leaves org.
|
|
16
13
|
*/
|
|
17
14
|
async function syncOrgMemberToSpiceDb(params) {
|
|
18
|
-
if (!isAuthzEnabled(
|
|
15
|
+
if (!isAuthzEnabled()) return;
|
|
19
16
|
if (params.action === "add") await writeRelationship({
|
|
20
17
|
resourceType: SpiceDbResourceTypes.ORGANIZATION,
|
|
21
18
|
resourceId: params.tenantId,
|
|
@@ -37,11 +34,11 @@ async function syncOrgMemberToSpiceDb(params) {
|
|
|
37
34
|
* Call when: user's org role is updated (e.g., member -> admin).
|
|
38
35
|
*/
|
|
39
36
|
async function changeOrgRole(params) {
|
|
40
|
-
if (!isAuthzEnabled(
|
|
37
|
+
if (!isAuthzEnabled()) return;
|
|
41
38
|
if (params.oldRole === params.newRole) return;
|
|
42
39
|
await getSpiceClient().promises.writeRelationships({
|
|
43
40
|
updates: [{
|
|
44
|
-
operation:
|
|
41
|
+
operation: RelationshipOperation.DELETE,
|
|
45
42
|
relationship: {
|
|
46
43
|
resource: {
|
|
47
44
|
objectType: SpiceDbResourceTypes.ORGANIZATION,
|
|
@@ -58,7 +55,7 @@ async function changeOrgRole(params) {
|
|
|
58
55
|
optionalCaveat: void 0
|
|
59
56
|
}
|
|
60
57
|
}, {
|
|
61
|
-
operation:
|
|
58
|
+
operation: RelationshipOperation.TOUCH,
|
|
62
59
|
relationship: {
|
|
63
60
|
resource: {
|
|
64
61
|
objectType: SpiceDbResourceTypes.ORGANIZATION,
|
|
@@ -81,47 +78,56 @@ async function changeOrgRole(params) {
|
|
|
81
78
|
}
|
|
82
79
|
/**
|
|
83
80
|
* Sync a new project to SpiceDB.
|
|
84
|
-
* Links project to org and grants creator project_admin role.
|
|
81
|
+
* Links project to org and grants creator project_admin role (if not already org admin/owner).
|
|
85
82
|
* Call when: project is created.
|
|
86
83
|
*/
|
|
87
84
|
async function syncProjectToSpiceDb(params) {
|
|
88
|
-
if (!isAuthzEnabled(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
operation: RELATIONSHIP_OPERATION_CREATE,
|
|
109
|
-
relationship: {
|
|
110
|
-
resource: {
|
|
111
|
-
objectType: SpiceDbResourceTypes.PROJECT,
|
|
112
|
-
objectId: params.projectId
|
|
85
|
+
if (!isAuthzEnabled()) return;
|
|
86
|
+
const spice = getSpiceClient();
|
|
87
|
+
const isOrgAdminOrOwner = (await readRelationships({
|
|
88
|
+
resourceType: SpiceDbResourceTypes.ORGANIZATION,
|
|
89
|
+
resourceId: params.tenantId,
|
|
90
|
+
subjectType: SpiceDbResourceTypes.USER,
|
|
91
|
+
subjectId: params.creatorUserId
|
|
92
|
+
})).some((r) => r.relation === SpiceDbRelations.ADMIN || r.relation === SpiceDbRelations.OWNER);
|
|
93
|
+
const updates = [{
|
|
94
|
+
operation: RelationshipOperation.CREATE,
|
|
95
|
+
relationship: {
|
|
96
|
+
resource: {
|
|
97
|
+
objectType: SpiceDbResourceTypes.PROJECT,
|
|
98
|
+
objectId: params.projectId
|
|
99
|
+
},
|
|
100
|
+
relation: SpiceDbRelations.ORGANIZATION,
|
|
101
|
+
subject: {
|
|
102
|
+
object: {
|
|
103
|
+
objectType: SpiceDbResourceTypes.ORGANIZATION,
|
|
104
|
+
objectId: params.tenantId
|
|
113
105
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
106
|
+
optionalRelation: ""
|
|
107
|
+
},
|
|
108
|
+
optionalCaveat: void 0
|
|
109
|
+
}
|
|
110
|
+
}];
|
|
111
|
+
if (!isOrgAdminOrOwner) updates.push({
|
|
112
|
+
operation: RelationshipOperation.CREATE,
|
|
113
|
+
relationship: {
|
|
114
|
+
resource: {
|
|
115
|
+
objectType: SpiceDbResourceTypes.PROJECT,
|
|
116
|
+
objectId: params.projectId
|
|
117
|
+
},
|
|
118
|
+
relation: SpiceDbRelations.PROJECT_ADMIN,
|
|
119
|
+
subject: {
|
|
120
|
+
object: {
|
|
121
|
+
objectType: SpiceDbResourceTypes.USER,
|
|
122
|
+
objectId: params.creatorUserId
|
|
121
123
|
},
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
124
|
+
optionalRelation: ""
|
|
125
|
+
},
|
|
126
|
+
optionalCaveat: void 0
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
await spice.promises.writeRelationships({
|
|
130
|
+
updates,
|
|
125
131
|
optionalPreconditions: [],
|
|
126
132
|
optionalTransactionMetadata: void 0
|
|
127
133
|
});
|
|
@@ -130,7 +136,7 @@ async function syncProjectToSpiceDb(params) {
|
|
|
130
136
|
* Grant project access to a user.
|
|
131
137
|
*/
|
|
132
138
|
async function grantProjectAccess(params) {
|
|
133
|
-
if (!isAuthzEnabled(
|
|
139
|
+
if (!isAuthzEnabled()) throw new Error("Authorization is not enabled");
|
|
134
140
|
await writeRelationship({
|
|
135
141
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
136
142
|
resourceId: params.projectId,
|
|
@@ -143,7 +149,7 @@ async function grantProjectAccess(params) {
|
|
|
143
149
|
* Revoke project access from a user.
|
|
144
150
|
*/
|
|
145
151
|
async function revokeProjectAccess(params) {
|
|
146
|
-
if (!isAuthzEnabled(
|
|
152
|
+
if (!isAuthzEnabled()) throw new Error("Authorization is not enabled");
|
|
147
153
|
await deleteRelationship({
|
|
148
154
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
149
155
|
resourceId: params.projectId,
|
|
@@ -157,11 +163,11 @@ async function revokeProjectAccess(params) {
|
|
|
157
163
|
* Removes the old role and adds the new one atomically in a single transaction.
|
|
158
164
|
*/
|
|
159
165
|
async function changeProjectRole(params) {
|
|
160
|
-
if (!isAuthzEnabled(
|
|
166
|
+
if (!isAuthzEnabled()) throw new Error("Authorization is not enabled");
|
|
161
167
|
if (params.oldRole === params.newRole) return;
|
|
162
168
|
await getSpiceClient().promises.writeRelationships({
|
|
163
169
|
updates: [{
|
|
164
|
-
operation:
|
|
170
|
+
operation: RelationshipOperation.DELETE,
|
|
165
171
|
relationship: {
|
|
166
172
|
resource: {
|
|
167
173
|
objectType: SpiceDbResourceTypes.PROJECT,
|
|
@@ -178,7 +184,7 @@ async function changeProjectRole(params) {
|
|
|
178
184
|
optionalCaveat: void 0
|
|
179
185
|
}
|
|
180
186
|
}, {
|
|
181
|
-
operation:
|
|
187
|
+
operation: RelationshipOperation.TOUCH,
|
|
182
188
|
relationship: {
|
|
183
189
|
resource: {
|
|
184
190
|
objectType: SpiceDbResourceTypes.PROJECT,
|
|
@@ -204,7 +210,7 @@ async function changeProjectRole(params) {
|
|
|
204
210
|
* Call when: project is deleted.
|
|
205
211
|
*/
|
|
206
212
|
async function removeProjectFromSpiceDb(params) {
|
|
207
|
-
if (!isAuthzEnabled(
|
|
213
|
+
if (!isAuthzEnabled()) return;
|
|
208
214
|
await getSpiceClient().promises.deleteRelationships({
|
|
209
215
|
relationshipFilter: {
|
|
210
216
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
@@ -223,7 +229,7 @@ async function removeProjectFromSpiceDb(params) {
|
|
|
223
229
|
* Returns users with project_admin, project_member, or project_viewer roles.
|
|
224
230
|
*/
|
|
225
231
|
async function listProjectMembers(params) {
|
|
226
|
-
if (!isAuthzEnabled(
|
|
232
|
+
if (!isAuthzEnabled()) return [];
|
|
227
233
|
return (await readRelationships({
|
|
228
234
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
229
235
|
resourceId: params.projectId
|
|
@@ -232,6 +238,84 @@ async function listProjectMembers(params) {
|
|
|
232
238
|
role: rel.relation
|
|
233
239
|
}));
|
|
234
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* List all project memberships for a specific user.
|
|
243
|
+
* Returns projects where the user has explicit project_admin, project_member, or project_viewer roles.
|
|
244
|
+
*/
|
|
245
|
+
async function listUserProjectMembershipsInSpiceDb(params) {
|
|
246
|
+
if (!isAuthzEnabled()) return [];
|
|
247
|
+
return (await readRelationships({
|
|
248
|
+
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
249
|
+
subjectType: SpiceDbResourceTypes.USER,
|
|
250
|
+
subjectId: params.userId
|
|
251
|
+
})).filter((rel) => rel.relation === SpiceDbRelations.PROJECT_ADMIN || rel.relation === SpiceDbRelations.PROJECT_MEMBER || rel.relation === SpiceDbRelations.PROJECT_VIEWER).map((rel) => ({
|
|
252
|
+
projectId: rel.resourceId,
|
|
253
|
+
role: rel.relation
|
|
254
|
+
}));
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Revoke all project memberships for a user.
|
|
258
|
+
* Call when: user is promoted to org admin (they get inherited access, explicit project roles become redundant).
|
|
259
|
+
*
|
|
260
|
+
* Uses efficient bulk delete - deletes all project relationships for user without listing first.
|
|
261
|
+
*/
|
|
262
|
+
async function revokeAllProjectMemberships(params) {
|
|
263
|
+
if (!isAuthzEnabled()) return;
|
|
264
|
+
const spice = getSpiceClient();
|
|
265
|
+
await Promise.all([
|
|
266
|
+
spice.promises.deleteRelationships({
|
|
267
|
+
relationshipFilter: {
|
|
268
|
+
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
269
|
+
optionalResourceId: "",
|
|
270
|
+
optionalResourceIdPrefix: "",
|
|
271
|
+
optionalRelation: SpiceDbRelations.PROJECT_ADMIN,
|
|
272
|
+
optionalSubjectFilter: {
|
|
273
|
+
subjectType: SpiceDbResourceTypes.USER,
|
|
274
|
+
optionalSubjectId: params.userId,
|
|
275
|
+
optionalRelation: void 0
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
optionalPreconditions: [],
|
|
279
|
+
optionalLimit: 0,
|
|
280
|
+
optionalAllowPartialDeletions: false,
|
|
281
|
+
optionalTransactionMetadata: void 0
|
|
282
|
+
}),
|
|
283
|
+
spice.promises.deleteRelationships({
|
|
284
|
+
relationshipFilter: {
|
|
285
|
+
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
286
|
+
optionalResourceId: "",
|
|
287
|
+
optionalResourceIdPrefix: "",
|
|
288
|
+
optionalRelation: SpiceDbRelations.PROJECT_MEMBER,
|
|
289
|
+
optionalSubjectFilter: {
|
|
290
|
+
subjectType: SpiceDbResourceTypes.USER,
|
|
291
|
+
optionalSubjectId: params.userId,
|
|
292
|
+
optionalRelation: void 0
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
optionalPreconditions: [],
|
|
296
|
+
optionalLimit: 0,
|
|
297
|
+
optionalAllowPartialDeletions: false,
|
|
298
|
+
optionalTransactionMetadata: void 0
|
|
299
|
+
}),
|
|
300
|
+
spice.promises.deleteRelationships({
|
|
301
|
+
relationshipFilter: {
|
|
302
|
+
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
303
|
+
optionalResourceId: "",
|
|
304
|
+
optionalResourceIdPrefix: "",
|
|
305
|
+
optionalRelation: SpiceDbRelations.PROJECT_VIEWER,
|
|
306
|
+
optionalSubjectFilter: {
|
|
307
|
+
subjectType: SpiceDbResourceTypes.USER,
|
|
308
|
+
optionalSubjectId: params.userId,
|
|
309
|
+
optionalRelation: void 0
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
optionalPreconditions: [],
|
|
313
|
+
optionalLimit: 0,
|
|
314
|
+
optionalAllowPartialDeletions: false,
|
|
315
|
+
optionalTransactionMetadata: void 0
|
|
316
|
+
})
|
|
317
|
+
]);
|
|
318
|
+
}
|
|
235
319
|
|
|
236
320
|
//#endregion
|
|
237
|
-
export { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, removeProjectFromSpiceDb, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb };
|
|
321
|
+
export { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, listUserProjectMembershipsInSpiceDb, removeProjectFromSpiceDb, revokeAllProjectMemberships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OrgRole, OrgRoles, ProjectRole, ProjectRoles } from "./auth/authz/config.js";
|
|
1
2
|
import { BreakdownComponentDef, CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, ContextBreakdown, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, parseContextBreakdownFromSpan } from "./constants/context-breakdown.js";
|
|
2
3
|
import { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AI_OPERATIONS, AI_TOOL_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from "./constants/otel-attributes.js";
|
|
3
4
|
import { AGGREGATE_OPERATORS, DATA_SOURCES, DATA_TYPES, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS } from "./constants/signoz-queries.js";
|
|
@@ -6,7 +7,6 @@ import "./types/index.js";
|
|
|
6
7
|
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
7
8
|
import { detectAuthenticationRequired } from "./utils/auth-detection.js";
|
|
8
9
|
import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
|
|
9
|
-
import "./index.js";
|
|
10
10
|
import { AgentStopWhen, AgentStopWhenSchema, ApiKeyApiUpdateSchema, FullAgentAgentInsertSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettings, ModelSettingsSchema, SignatureSource, SignatureVerificationConfig, SignatureVerificationConfigSchema, SignedComponent, StopWhen, StopWhenSchema, SubAgentStopWhen, SubAgentStopWhenSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema } from "./validation/schemas.js";
|
|
11
11
|
import { z } from "@hono/zod-openapi";
|
|
12
12
|
|
|
@@ -142,9 +142,9 @@ declare const DataComponentApiInsertSchema: z.ZodObject<{
|
|
|
142
142
|
}, z.core.$strip>>>;
|
|
143
143
|
}, z.core.$strip>;
|
|
144
144
|
declare const ArtifactComponentApiInsertSchema: z.ZodObject<{
|
|
145
|
-
id: z.ZodString;
|
|
146
|
-
name: z.ZodString;
|
|
147
145
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
id: z.ZodString;
|
|
148
148
|
props: z.ZodOptional<z.ZodNullable<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>>;
|
|
149
149
|
render: z.ZodOptional<z.ZodNullable<z.ZodType<{
|
|
150
150
|
component: string;
|
|
@@ -191,9 +191,9 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
191
191
|
description: z.ZodOptional<z.ZodString>;
|
|
192
192
|
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
193
193
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
194
|
-
id: z.ZodString;
|
|
195
|
-
name: z.ZodString;
|
|
196
194
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
195
|
+
name: z.ZodString;
|
|
196
|
+
id: z.ZodString;
|
|
197
197
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
198
198
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
199
199
|
models: z.ZodOptional<z.ZodObject<{
|
|
@@ -314,4 +314,4 @@ declare function generateIdFromName(name: string): string;
|
|
|
314
314
|
type ToolInsert = ToolApiInsert;
|
|
315
315
|
type AgentAgentInsert = AgentAgentApiInsert;
|
|
316
316
|
//#endregion
|
|
317
|
-
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, AgentAgentApiInsert, AgentAgentApiInsertSchema, AgentAgentInsert, AgentApiInsert, AgentApiInsertSchema, type AgentStopWhen, AgentStopWhenSchema, ApiKeyApiCreationResponse, ApiKeyApiCreationResponseSchema, ApiKeyApiSelect, ApiKeyApiSelectSchema, ApiKeyApiUpdateResponse, ArtifactComponentApiInsert, ArtifactComponentApiInsertSchema, BreakdownComponentDef, CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, ContextBreakdown, ContextConfigApiInsert, ContextConfigApiInsertSchema, CredentialReferenceApiInsert, CredentialReferenceApiInsertSchema, CredentialStoreType, DATA_SOURCES, DATA_TYPES, DEFAULT_NANGO_STORE_ID, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, DataComponentApiInsert, DataComponentApiInsertSchema, ErrorResponse, ErrorResponseSchema, ExternalAgentApiInsert, ExternalAgentApiInsertSchema, ExternalAgentDefinition, FIELD_TYPES, FullAgentDefinition, FullAgentDefinitionSchema, FunctionApiInsert, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, IdParamsSchema, InternalAgentDefinition, ListResponseSchema, MAX_ID_LENGTH, MCPTransportType, MIN_ID_LENGTH, type ModelSettings, ModelSettingsSchema, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, PaginationSchema, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, type SignatureSource, type SignatureVerificationConfig, SignatureVerificationConfigSchema, type SignedComponent, SingleResponseSchema, type StopWhen, StopWhenSchema, type SubAgentStopWhen, SubAgentStopWhenSchema, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, TenantParams, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsert, ToolApiInsertSchema, ToolInsert, TriggerApiInsert, TriggerApiInsertSchema, TriggerApiSelect, TriggerApiSelectSchema, TriggerApiUpdate, TriggerApiUpdateSchema, TriggerInvocationApiSelect, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, UNKNOWN_VALUE, URL_SAFE_ID_PATTERN, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, detectAuthenticationRequired, generateIdFromName, parseContextBreakdownFromSpan, resourceIdSchema, validatePropsAsJsonSchema };
|
|
317
|
+
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, AgentAgentApiInsert, AgentAgentApiInsertSchema, AgentAgentInsert, AgentApiInsert, AgentApiInsertSchema, type AgentStopWhen, AgentStopWhenSchema, ApiKeyApiCreationResponse, ApiKeyApiCreationResponseSchema, ApiKeyApiSelect, ApiKeyApiSelectSchema, ApiKeyApiUpdateResponse, ArtifactComponentApiInsert, ArtifactComponentApiInsertSchema, BreakdownComponentDef, CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, ContextBreakdown, ContextConfigApiInsert, ContextConfigApiInsertSchema, CredentialReferenceApiInsert, CredentialReferenceApiInsertSchema, CredentialStoreType, DATA_SOURCES, DATA_TYPES, DEFAULT_NANGO_STORE_ID, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, DataComponentApiInsert, DataComponentApiInsertSchema, ErrorResponse, ErrorResponseSchema, ExternalAgentApiInsert, ExternalAgentApiInsertSchema, ExternalAgentDefinition, FIELD_TYPES, FullAgentDefinition, FullAgentDefinitionSchema, FunctionApiInsert, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, IdParamsSchema, InternalAgentDefinition, ListResponseSchema, MAX_ID_LENGTH, MCPTransportType, MIN_ID_LENGTH, type ModelSettings, ModelSettingsSchema, OPERATORS, ORDER_DIRECTIONS, type OrgRole, OrgRoles, PANEL_TYPES, PaginationSchema, type ProjectRole, ProjectRoles, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, type SignatureSource, type SignatureVerificationConfig, SignatureVerificationConfigSchema, type SignedComponent, SingleResponseSchema, type StopWhen, StopWhenSchema, type SubAgentStopWhen, SubAgentStopWhenSchema, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, TenantParams, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsert, ToolApiInsertSchema, ToolInsert, TriggerApiInsert, TriggerApiInsertSchema, TriggerApiSelect, TriggerApiSelectSchema, TriggerApiUpdate, TriggerApiUpdateSchema, TriggerInvocationApiSelect, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, UNKNOWN_VALUE, URL_SAFE_ID_PATTERN, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, detectAuthenticationRequired, generateIdFromName, parseContextBreakdownFromSpan, resourceIdSchema, validatePropsAsJsonSchema };
|
package/dist/client-exports.js
CHANGED
|
@@ -3,6 +3,7 @@ import { CredentialStoreType, MCPTransportType } from "./types/utility.js";
|
|
|
3
3
|
import { AgentStopWhenSchema, ArtifactComponentApiInsertSchema as ArtifactComponentApiInsertSchema$1, FullAgentAgentInsertSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettingsSchema, SignatureVerificationConfigSchema, StopWhenSchema, SubAgentStopWhenSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema } from "./validation/schemas.js";
|
|
4
4
|
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
5
5
|
import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
|
|
6
|
+
import { OrgRoles, ProjectRoles } from "./auth/authz/config.js";
|
|
6
7
|
import { CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, parseContextBreakdownFromSpan } from "./constants/context-breakdown.js";
|
|
7
8
|
import { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AI_OPERATIONS, AI_TOOL_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, SPAN_KEYS, SPAN_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from "./constants/otel-attributes.js";
|
|
8
9
|
import { AGGREGATE_OPERATORS, DATA_SOURCES, DATA_TYPES, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS } from "./constants/signoz-queries.js";
|
|
@@ -168,4 +169,4 @@ function generateIdFromName(name) {
|
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
//#endregion
|
|
171
|
-
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, AgentAgentApiInsertSchema, AgentApiInsertSchema, AgentStopWhenSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiSelectSchema, ArtifactComponentApiInsertSchema, CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, ContextConfigApiInsertSchema, CredentialReferenceApiInsertSchema, CredentialStoreType, DATA_SOURCES, DATA_TYPES, DEFAULT_NANGO_STORE_ID, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, DataComponentApiInsertSchema, ErrorResponseSchema, ExternalAgentApiInsertSchema, FIELD_TYPES, FullAgentDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, IdParamsSchema, ListResponseSchema, MAX_ID_LENGTH, MCPTransportType, MIN_ID_LENGTH, ModelSettingsSchema, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, PaginationSchema, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, SignatureVerificationConfigSchema, SingleResponseSchema, StopWhenSchema, SubAgentStopWhenSchema, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, UNKNOWN_VALUE, URL_SAFE_ID_PATTERN, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, detectAuthenticationRequired, generateIdFromName, parseContextBreakdownFromSpan, resourceIdSchema, validatePropsAsJsonSchema };
|
|
172
|
+
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, AgentAgentApiInsertSchema, AgentApiInsertSchema, AgentStopWhenSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiSelectSchema, ArtifactComponentApiInsertSchema, CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, ContextConfigApiInsertSchema, CredentialReferenceApiInsertSchema, CredentialStoreType, DATA_SOURCES, DATA_TYPES, DEFAULT_NANGO_STORE_ID, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, DataComponentApiInsertSchema, ErrorResponseSchema, ExternalAgentApiInsertSchema, FIELD_TYPES, FullAgentDefinitionSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, IdParamsSchema, ListResponseSchema, MAX_ID_LENGTH, MCPTransportType, MIN_ID_LENGTH, ModelSettingsSchema, OPERATORS, ORDER_DIRECTIONS, OrgRoles, PANEL_TYPES, PaginationSchema, ProjectRoles, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, SignatureVerificationConfigSchema, SingleResponseSchema, StopWhenSchema, SubAgentStopWhenSchema, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, TenantParamsSchema, TenantProjectIdParamsSchema, TenantProjectParamsSchema, ToolApiInsertSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema, UNKNOWN_VALUE, URL_SAFE_ID_PATTERN, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, detectAuthenticationRequired, generateIdFromName, parseContextBreakdownFromSpan, resourceIdSchema, validatePropsAsJsonSchema };
|
|
@@ -26,10 +26,10 @@ import { createConversation, createOrGetConversation, deleteConversation, getAct
|
|
|
26
26
|
import { createDatasetRun, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationResult, createEvaluationResults, createEvaluationRun, deleteDatasetRun, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, filterConversationsForJob, getDatasetRunById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, listDatasetRuns, listDatasetRunsByConfig, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRuns, listEvaluationRunsByJobConfigId, updateEvaluationResult, updateEvaluationRun } from "./runtime/evalRuns.js";
|
|
27
27
|
import { addLedgerArtifacts, countLedgerArtifactsByTask, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, getLedgerArtifacts, getLedgerArtifactsByContext, upsertLedgerArtifact } from "./runtime/ledgerArtifacts.js";
|
|
28
28
|
import { countMessagesByConversation, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage } from "./runtime/messages.js";
|
|
29
|
-
import { addUserToOrganization, getPendingInvitationsByEmail,
|
|
29
|
+
import { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, upsertOrganization } from "./runtime/organizations.js";
|
|
30
30
|
import { ProjectMetadataPaginatedResult, countProjectsInRuntime, createProjectMetadata, deleteProjectMetadata, getProjectMetadata, listProjectsMetadata, listProjectsMetadataPaginated, projectsMetadataExists } from "./runtime/projects.js";
|
|
31
31
|
import { createTask, getTask, listTaskIdsByContextId, updateTask } from "./runtime/tasks.js";
|
|
32
32
|
import { createTriggerInvocation, getTriggerInvocationById, listTriggerInvocationsPaginated, updateTriggerInvocationStatus } from "./runtime/triggerInvocations.js";
|
|
33
33
|
import { getUserByEmail, getUserById } from "./runtime/users.js";
|
|
34
34
|
import { createValidatedDataAccess, validateProjectExists, withProjectValidation } from "./validation.js";
|
|
35
|
-
export { AgentLogger, AgentsManageDatabaseClient, AgentsManageDatabaseConfig, AgentsRunDatabaseClient, AgentsRunDatabaseConfig, CascadeDeleteResult, CreateProjectWithBranchParams, CreateProjectWithBranchResult, CredentialReferenceWithResources, DeleteProjectWithBranchParams, ListProjectsWithMetadataResult, ProjectConfigMetadata, ProjectLogger, ProjectMetadataPaginatedResult, ProjectWithMetadata, SubAgentIsDefaultError, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, createAgent, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRun, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteProjectMetadata, deleteProjectWithBranch, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getDatasetById, getDatasetItemById, getDatasetRunById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolById, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectMainBranchName, getProjectMetadata, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerInvocationById, getUserByEmail, getUserById,
|
|
35
|
+
export { AgentLogger, AgentsManageDatabaseClient, AgentsManageDatabaseConfig, AgentsRunDatabaseClient, AgentsRunDatabaseConfig, CascadeDeleteResult, CreateProjectWithBranchParams, CreateProjectWithBranchResult, CredentialReferenceWithResources, DeleteProjectWithBranchParams, ListProjectsWithMetadataResult, ProjectConfigMetadata, ProjectLogger, ProjectMetadataPaginatedResult, ProjectWithMetadata, SubAgentIsDefaultError, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, createAgent, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRun, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteProjectMetadata, deleteProjectWithBranch, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getDatasetById, getDatasetItemById, getDatasetRunById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolById, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectMainBranchName, getProjectMetadata, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerInvocationById, getUserByEmail, getUserById, getUserOrganizationsFromDb, getUserScopedCredentialReference, getVisibleMessages, hasApiKey, hasContextConfig, hasCredentialReference, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isFunctionToolAssociatedWithSubAgent, linkDatasetRunToEvaluationJobConfig, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listDatasetItems, listDatasetRunConfigs, listDatasetRuns, listDatasetRunsByConfig, listDatasets, listEvaluationJobConfigs, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationRuns, listEvaluationRunsByJobConfigId, listEvaluationSuiteConfigs, listEvaluators, listExternalAgents, listExternalAgentsPaginated, listFunctionTools, listFunctions, listFunctionsPaginated, listMessages, listProjects, listProjectsMetadata, listProjectsMetadataPaginated, listProjectsPaginated, listProjectsWithMetadataPaginated, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, listTriggerInvocationsPaginated, listTriggers, listTriggersPaginated, projectExists, projectExistsInTable, projectHasResources, projectsMetadataExists, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeFunctionToolFromSubAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveSubAgent, updateCredentialReference, updateDataComponent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationResult, updateEvaluationRun, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, updateTrigger, updateTriggerInvocationStatus, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertOrganization, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, upsertTrigger, validateAndGetApiKey, validateProjectExists, validateSubAgent, withProjectValidation };
|
|
@@ -27,10 +27,10 @@ import { createConversation, createOrGetConversation, deleteConversation, getAct
|
|
|
27
27
|
import { createDatasetRun, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationResult, createEvaluationResults, createEvaluationRun, deleteDatasetRun, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, filterConversationsForJob, getDatasetRunById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, listDatasetRuns, listDatasetRunsByConfig, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRuns, listEvaluationRunsByJobConfigId, updateEvaluationResult, updateEvaluationRun } from "./runtime/evalRuns.js";
|
|
28
28
|
import { addLedgerArtifacts, countLedgerArtifactsByTask, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, getLedgerArtifacts, getLedgerArtifactsByContext, upsertLedgerArtifact } from "./runtime/ledgerArtifacts.js";
|
|
29
29
|
import { countMessagesByConversation, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage } from "./runtime/messages.js";
|
|
30
|
-
import { addUserToOrganization, getPendingInvitationsByEmail,
|
|
30
|
+
import { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, upsertOrganization } from "./runtime/organizations.js";
|
|
31
31
|
import { createTask, getTask, listTaskIdsByContextId, updateTask } from "./runtime/tasks.js";
|
|
32
32
|
import { createTriggerInvocation, getTriggerInvocationById, listTriggerInvocationsPaginated, updateTriggerInvocationStatus } from "./runtime/triggerInvocations.js";
|
|
33
33
|
import { getUserByEmail, getUserById } from "./runtime/users.js";
|
|
34
34
|
import { createValidatedDataAccess, validateProjectExists, withProjectValidation } from "./validation.js";
|
|
35
35
|
|
|
36
|
-
export { SubAgentIsDefaultError, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, createAgent, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRun, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteProjectMetadata, deleteProjectWithBranch, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getDatasetById, getDatasetItemById, getDatasetRunById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolById, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectMainBranchName, getProjectMetadata, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerInvocationById, getUserByEmail, getUserById,
|
|
36
|
+
export { SubAgentIsDefaultError, addFunctionToolToSubAgent, addLedgerArtifacts, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cleanupTenantCache, clearContextConfigCache, clearConversationCache, countApiKeys, countArtifactComponents, countArtifactComponentsForAgent, countContextConfigs, countCredentialReferences, countDataComponents, countExternalAgents, countLedgerArtifactsByTask, countMessagesByConversation, countProjects, countProjectsInRuntime, createAgent, createAgentManageDatabaseConnection, createAgentToolRelation, createAgentsManageDatabaseClient, createAgentsManageDatabasePool, createAgentsRunDatabaseClient, createApiKey, createArtifactComponent, createContextConfig, createConversation, createCredentialReference, createDataComponent, createDataset, createDatasetItem, createDatasetItems, createDatasetRun, createDatasetRunConfig, createDatasetRunConfigAgentRelation, createDatasetRunConversationRelation, createDatasetRunConversationRelations, createEvaluationJobConfig, createEvaluationJobConfigEvaluatorRelation, createEvaluationResult, createEvaluationResults, createEvaluationRun, createEvaluationRunConfig, createEvaluationRunConfigEvaluationSuiteConfigRelation, createEvaluationSuiteConfig, createEvaluationSuiteConfigEvaluatorRelation, createEvaluator, createExternalAgent, createFullAgentServerSide, createFullProjectServerSide, createFunctionTool, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, dbResultToMcpTool, deleteAgent, deleteAgentArtifactComponentRelationByAgent, deleteAgentDataComponentRelationByAgent, deleteAgentRelationsByAgent, deleteAgentToolRelation, deleteAgentToolRelationByAgent, deleteApiKey, deleteArtifactComponent, deleteContextConfig, deleteConversation, deleteCredentialReference, deleteDataComponent, deleteDataset, deleteDatasetItem, deleteDatasetItemsByDataset, deleteDatasetRun, deleteDatasetRunConfig, deleteDatasetRunConfigAgentRelation, deleteDatasetRunConversationRelation, deleteDatasetRunConversationRelationsByRun, deleteEvaluationJobConfig, deleteEvaluationJobConfigEvaluatorRelation, deleteEvaluationJobConfigEvaluatorRelationsByEvaluator, deleteEvaluationResult, deleteEvaluationResultsByRun, deleteEvaluationRun, deleteEvaluationRunConfig, deleteEvaluationRunConfigEvaluationSuiteConfigRelation, deleteEvaluationSuiteConfig, deleteEvaluationSuiteConfigEvaluatorRelation, deleteEvaluationSuiteConfigEvaluatorRelationsByEvaluator, deleteEvaluator, deleteExternalAgent, deleteFullAgent, deleteFullProject, deleteFunction, deleteFunctionTool, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMessage, deleteProject, deleteProjectMetadata, deleteProjectWithBranch, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, externalAgentExists, externalAgentUrlExists, fetchComponentRelationships, filterConversationsForJob, generateAndCreateApiKey, getActiveAgentForConversation, getAgentById, getAgentRelationById, getAgentRelationByParams, getAgentRelations, getAgentRelationsByAgent, getAgentRelationsBySource, getAgentSubAgentInfos, getAgentToolRelationByAgent, getAgentToolRelationById, getAgentToolRelationByTool, getAgentWithDefaultSubAgent, getAgentsForTool, getAgentsUsingArtifactComponent, getAgentsUsingDataComponent, getApiKeyById, getApiKeyByPublicId, getArtifactComponentById, getArtifactComponentsForAgent, getCacheEntry, getContextConfigById, getContextConfigCacheEntries, getConversation, getConversationCacheEntries, getConversationHistory, getCredentialReference, getCredentialReferenceById, getCredentialReferenceWithResources, getDataComponent, getDataComponentsForAgent, getDatasetById, getDatasetItemById, getDatasetRunById, getDatasetRunConfigAgentRelations, getDatasetRunConfigById, getDatasetRunConversationRelationByConversation, getDatasetRunConversationRelations, getEvaluationJobConfigById, getEvaluationJobConfigEvaluatorRelations, getEvaluationResultById, getEvaluationRunById, getEvaluationRunByJobConfigId, getEvaluationRunConfigById, getEvaluationRunConfigEvaluationSuiteConfigRelations, getEvaluationSuiteConfigById, getEvaluationSuiteConfigEvaluatorRelations, getEvaluatorById, getEvaluatorsByIds, getExternalAgent, getExternalAgentByUrl, getExternalAgentsForSubAgent, getFullAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, getFullAgentWithRelationIds, getFullProject, getFullProjectWithRelationIds, getFunction, getFunctionToolById, getFunctionToolsForSubAgent, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolById, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectMainBranchName, getProjectMetadata, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getSubAgentById, getSubAgentExternalAgentRelationById, getSubAgentExternalAgentRelationByParams, getSubAgentExternalAgentRelations, getSubAgentExternalAgentRelationsByAgent, getSubAgentExternalAgentRelationsByExternalAgent, getSubAgentRelationsByTarget, getSubAgentTeamAgentRelationById, getSubAgentTeamAgentRelationByParams, getSubAgentTeamAgentRelations, getSubAgentTeamAgentRelationsByAgent, getSubAgentTeamAgentRelationsByTeamAgent, getSubAgentsByIds, getSubAgentsForExternalAgent, getSubAgentsForTeamAgent, getSubAgentsUsingFunctionTool, getTask, getTeamAgentsForSubAgent, getToolById, getToolsForAgent, getTriggerById, getTriggerInvocationById, getUserByEmail, getUserById, getUserOrganizationsFromDb, getUserScopedCredentialReference, getVisibleMessages, hasApiKey, hasContextConfig, hasCredentialReference, invalidateHeadersCache, invalidateInvocationDefinitionsCache, isArtifactComponentAssociatedWithAgent, isDataComponentAssociatedWithAgent, isFunctionToolAssociatedWithSubAgent, linkDatasetRunToEvaluationJobConfig, listAgentRelations, listAgentToolRelations, listAgents, listAgentsPaginated, listApiKeys, listApiKeysPaginated, listArtifactComponents, listArtifactComponentsPaginated, listContextConfigs, listContextConfigsPaginated, listConversations, listCredentialReferences, listCredentialReferencesPaginated, listDataComponents, listDataComponentsPaginated, listDatasetItems, listDatasetRunConfigs, listDatasetRuns, listDatasetRunsByConfig, listDatasets, listEvaluationJobConfigs, listEvaluationResults, listEvaluationResultsByConversation, listEvaluationResultsByRun, listEvaluationRunConfigs, listEvaluationRunConfigsWithSuiteConfigs, listEvaluationRuns, listEvaluationRunsByJobConfigId, listEvaluationSuiteConfigs, listEvaluators, listExternalAgents, listExternalAgentsPaginated, listFunctionTools, listFunctions, listFunctionsPaginated, listMessages, listProjects, listProjectsMetadata, listProjectsMetadataPaginated, listProjectsPaginated, listProjectsWithMetadataPaginated, listSubAgentExternalAgentRelations, listSubAgentTeamAgentRelations, listSubAgents, listSubAgentsPaginated, listTaskIdsByContextId, listTools, listTriggerInvocationsPaginated, listTriggers, listTriggersPaginated, projectExists, projectExistsInTable, projectHasResources, projectsMetadataExists, removeArtifactComponentFromAgent, removeDataComponentFromAgent, removeFunctionToolFromSubAgent, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveSubAgent, updateCredentialReference, updateDataComponent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationResult, updateEvaluationRun, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateMessage, updateProject, updateSubAgent, updateSubAgentExternalAgentRelation, updateSubAgentFunctionToolRelation, updateSubAgentTeamAgentRelation, updateTask, updateTool, updateTrigger, updateTriggerInvocationStatus, upsertAgent, upsertAgentArtifactComponentRelation, upsertAgentDataComponentRelation, upsertArtifactComponent, upsertContextConfig, upsertCredentialReference, upsertDataComponent, upsertExternalAgent, upsertFunction, upsertFunctionTool, upsertLedgerArtifact, upsertOrganization, upsertSubAgent, upsertSubAgentExternalAgentRelation, upsertSubAgentFunctionToolRelation, upsertSubAgentRelation, upsertSubAgentTeamAgentRelation, upsertSubAgentToolRelation, upsertTool, upsertTrigger, validateAndGetApiKey, validateProjectExists, validateSubAgent, withProjectValidation };
|
|
@@ -8,17 +8,14 @@ import { PgTable } from "drizzle-orm/pg-core";
|
|
|
8
8
|
declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
name: string;
|
|
12
11
|
description: string | null;
|
|
13
|
-
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
12
|
+
name: string;
|
|
16
13
|
tenantId: string;
|
|
17
14
|
projectId: string;
|
|
18
|
-
|
|
19
|
-
transferCountIs?: number | undefined;
|
|
20
|
-
} | null;
|
|
15
|
+
id: string;
|
|
21
16
|
prompt: string | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
22
19
|
models: {
|
|
23
20
|
base?: {
|
|
24
21
|
model?: string | undefined;
|
|
@@ -33,6 +30,9 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
33
30
|
providerOptions?: Record<string, any> | undefined;
|
|
34
31
|
} | undefined;
|
|
35
32
|
} | null;
|
|
33
|
+
stopWhen: {
|
|
34
|
+
transferCountIs?: number | undefined;
|
|
35
|
+
} | null;
|
|
36
36
|
defaultSubAgentId: string | null;
|
|
37
37
|
contextConfigId: string | null;
|
|
38
38
|
statusUpdates: {
|
|
@@ -54,17 +54,14 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
54
54
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
56
56
|
}) => Promise<{
|
|
57
|
-
name: string;
|
|
58
57
|
description: string | null;
|
|
59
|
-
|
|
60
|
-
createdAt: string;
|
|
61
|
-
updatedAt: string;
|
|
58
|
+
name: string;
|
|
62
59
|
tenantId: string;
|
|
63
60
|
projectId: string;
|
|
64
|
-
|
|
65
|
-
transferCountIs?: number | undefined;
|
|
66
|
-
} | null;
|
|
61
|
+
id: string;
|
|
67
62
|
prompt: string | null;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
updatedAt: string;
|
|
68
65
|
models: {
|
|
69
66
|
base?: {
|
|
70
67
|
model?: string | undefined;
|
|
@@ -79,6 +76,9 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
79
76
|
providerOptions?: Record<string, any> | undefined;
|
|
80
77
|
} | undefined;
|
|
81
78
|
} | null;
|
|
79
|
+
stopWhen: {
|
|
80
|
+
transferCountIs?: number | undefined;
|
|
81
|
+
} | null;
|
|
82
82
|
defaultSubAgentId: string | null;
|
|
83
83
|
contextConfigId: string | null;
|
|
84
84
|
statusUpdates: {
|
|
@@ -97,18 +97,15 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
97
97
|
}[] | undefined;
|
|
98
98
|
} | null;
|
|
99
99
|
defaultSubAgent: {
|
|
100
|
-
name: string;
|
|
101
100
|
description: string | null;
|
|
102
|
-
|
|
103
|
-
createdAt: string;
|
|
104
|
-
updatedAt: string;
|
|
101
|
+
name: string;
|
|
105
102
|
tenantId: string;
|
|
106
103
|
projectId: string;
|
|
107
|
-
|
|
108
|
-
stepCountIs?: number | undefined;
|
|
109
|
-
} | null;
|
|
104
|
+
id: string;
|
|
110
105
|
prompt: string | null;
|
|
111
|
-
|
|
106
|
+
agentId: string;
|
|
107
|
+
createdAt: string;
|
|
108
|
+
updatedAt: string;
|
|
112
109
|
models: {
|
|
113
110
|
base?: {
|
|
114
111
|
model?: string | undefined;
|
|
@@ -123,23 +120,23 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
123
120
|
providerOptions?: Record<string, any> | undefined;
|
|
124
121
|
} | undefined;
|
|
125
122
|
} | null;
|
|
126
|
-
|
|
123
|
+
stopWhen: {
|
|
124
|
+
stepCountIs?: number | undefined;
|
|
125
|
+
} | null;
|
|
126
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
127
127
|
} | null;
|
|
128
128
|
} | null>;
|
|
129
129
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
130
130
|
scopes: ProjectScopeConfig;
|
|
131
131
|
}) => Promise<{
|
|
132
|
-
name: string;
|
|
133
132
|
description: string | null;
|
|
134
|
-
|
|
135
|
-
createdAt: string;
|
|
136
|
-
updatedAt: string;
|
|
133
|
+
name: string;
|
|
137
134
|
tenantId: string;
|
|
138
135
|
projectId: string;
|
|
139
|
-
|
|
140
|
-
transferCountIs?: number | undefined;
|
|
141
|
-
} | null;
|
|
136
|
+
id: string;
|
|
142
137
|
prompt: string | null;
|
|
138
|
+
createdAt: string;
|
|
139
|
+
updatedAt: string;
|
|
143
140
|
models: {
|
|
144
141
|
base?: {
|
|
145
142
|
model?: string | undefined;
|
|
@@ -154,6 +151,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
154
151
|
providerOptions?: Record<string, any> | undefined;
|
|
155
152
|
} | undefined;
|
|
156
153
|
} | null;
|
|
154
|
+
stopWhen: {
|
|
155
|
+
transferCountIs?: number | undefined;
|
|
156
|
+
} | null;
|
|
157
157
|
defaultSubAgentId: string | null;
|
|
158
158
|
contextConfigId: string | null;
|
|
159
159
|
statusUpdates: {
|
|
@@ -228,17 +228,14 @@ declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params:
|
|
|
228
228
|
};
|
|
229
229
|
}>;
|
|
230
230
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
231
|
-
name: string;
|
|
232
231
|
description: string | null;
|
|
233
|
-
|
|
234
|
-
createdAt: string;
|
|
235
|
-
updatedAt: string;
|
|
232
|
+
name: string;
|
|
236
233
|
tenantId: string;
|
|
237
234
|
projectId: string;
|
|
238
|
-
|
|
239
|
-
transferCountIs?: number | undefined;
|
|
240
|
-
} | null;
|
|
235
|
+
id: string;
|
|
241
236
|
prompt: string | null;
|
|
237
|
+
createdAt: string;
|
|
238
|
+
updatedAt: string;
|
|
242
239
|
models: {
|
|
243
240
|
base?: {
|
|
244
241
|
model?: string | undefined;
|
|
@@ -253,6 +250,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
253
250
|
providerOptions?: Record<string, any> | undefined;
|
|
254
251
|
} | undefined;
|
|
255
252
|
} | null;
|
|
253
|
+
stopWhen: {
|
|
254
|
+
transferCountIs?: number | undefined;
|
|
255
|
+
} | null;
|
|
256
256
|
defaultSubAgentId: string | null;
|
|
257
257
|
contextConfigId: string | null;
|
|
258
258
|
statusUpdates: {
|