@inkeep/agents-core 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/auth.d.ts +4 -2
- package/dist/auth/auth.js +4 -3
- package/dist/auth/authz/client.d.ts +0 -1
- package/dist/auth/authz/client.js +0 -1
- package/dist/auth/authz/config.d.ts +1 -7
- package/dist/auth/authz/config.js +1 -9
- package/dist/auth/authz/index.d.ts +2 -2
- package/dist/auth/authz/index.js +2 -2
- package/dist/auth/authz/permissions.js +4 -8
- package/dist/auth/authz/sync.js +1 -11
- package/dist/auth/init.d.ts +1 -0
- package/dist/auth/init.js +115 -0
- package/dist/client-exports.d.ts +2 -6
- package/dist/client-exports.js +3 -7
- package/dist/constants/otel-attributes.d.ts +5 -0
- package/dist/constants/otel-attributes.js +8 -3
- package/dist/constants/signoz-queries.d.ts +1 -0
- package/dist/constants/signoz-queries.js +2 -1
- package/dist/data-access/index.d.ts +3 -2
- package/dist/data-access/index.js +3 -2
- package/dist/data-access/manage/agentFull.js +42 -1
- package/dist/data-access/manage/agents.d.ts +9 -9
- package/dist/data-access/manage/artifactComponents.d.ts +4 -4
- package/dist/data-access/manage/artifactComponents.js +1 -1
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/dataComponents.js +1 -1
- package/dist/data-access/manage/functionTools.d.ts +8 -8
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +22 -22
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +3 -3
- package/dist/data-access/manage/tools.d.ts +26 -21
- package/dist/data-access/manage/tools.js +20 -1
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/data-access/runtime/cascade-delete.d.ts +48 -1
- package/dist/data-access/runtime/cascade-delete.js +52 -2
- package/dist/data-access/runtime/conversations.d.ts +19 -19
- package/dist/data-access/runtime/github-work-app-installations.d.ts +261 -0
- package/dist/data-access/runtime/github-work-app-installations.js +457 -0
- package/dist/data-access/runtime/messages.d.ts +15 -15
- 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 +318 -301
- package/dist/db/manage/manage-schema.js +1 -0
- package/dist/db/runtime/runtime-schema.d.ts +1009 -165
- package/dist/db/runtime/runtime-schema.js +173 -5
- package/dist/dolt/branch.js +1 -1
- package/dist/dolt/branches-api.js +1 -1
- package/dist/dolt/index.js +3 -3
- package/dist/dolt/migrate-all-branches.js +1 -1
- package/dist/dolt/ref-helpers.js +1 -1
- package/dist/dolt/ref-middleware.js +1 -1
- package/dist/dolt/ref-scope.js +1 -1
- package/dist/env.d.ts +6 -4
- package/dist/env.js +11 -10
- package/dist/index.d.ts +8 -9
- package/dist/index.js +18 -19
- package/dist/types/entities.d.ts +9 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +16 -2
- package/dist/validation/agentFull.js +1 -1
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +4 -23
- package/dist/validation/drizzle-schema-helpers.js +3 -30
- package/dist/validation/index.d.ts +2 -4
- package/dist/validation/index.js +4 -6
- package/dist/validation/schemas.d.ts +3233 -1440
- package/dist/validation/schemas.js +164 -79
- package/drizzle/manage/0006_fixed_umar.sql +1 -0
- package/drizzle/manage/meta/0006_snapshot.json +3148 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/drizzle/runtime/0010_previous_black_knight.sql +84 -0
- package/drizzle/runtime/meta/0010_snapshot.json +3066 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +4 -2
- package/dist/validation/id-validation.d.ts +0 -24
- package/dist/validation/id-validation.js +0 -52
package/dist/auth/auth.d.ts
CHANGED
|
@@ -179,11 +179,11 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
179
179
|
useSecureCookies?: boolean | undefined;
|
|
180
180
|
disableCSRFCheck?: boolean | undefined;
|
|
181
181
|
disableOriginCheck?: boolean | undefined;
|
|
182
|
-
crossSubDomainCookies
|
|
182
|
+
crossSubDomainCookies?: {
|
|
183
183
|
enabled: boolean;
|
|
184
184
|
additionalCookies?: string[];
|
|
185
185
|
domain?: string;
|
|
186
|
-
};
|
|
186
|
+
} | undefined;
|
|
187
187
|
cookies?: {
|
|
188
188
|
[key: string]: {
|
|
189
189
|
name?: string;
|
|
@@ -873,6 +873,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
873
873
|
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
874
874
|
};
|
|
875
875
|
};
|
|
876
|
+
creatorRole: "admin";
|
|
876
877
|
membershipLimit: number;
|
|
877
878
|
invitationLimit: number;
|
|
878
879
|
invitationExpiresIn: number;
|
|
@@ -1182,6 +1183,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1182
1183
|
statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
|
|
1183
1184
|
};
|
|
1184
1185
|
};
|
|
1186
|
+
creatorRole: "admin";
|
|
1185
1187
|
membershipLimit: number;
|
|
1186
1188
|
invitationLimit: number;
|
|
1187
1189
|
invitationExpiresIn: number;
|
package/dist/auth/auth.js
CHANGED
|
@@ -106,10 +106,10 @@ function createAuth(config) {
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
advanced: {
|
|
109
|
-
crossSubDomainCookies: {
|
|
109
|
+
...cookieDomain && { crossSubDomainCookies: {
|
|
110
110
|
enabled: true,
|
|
111
|
-
|
|
112
|
-
},
|
|
111
|
+
domain: cookieDomain
|
|
112
|
+
} },
|
|
113
113
|
defaultCookieAttributes: {
|
|
114
114
|
sameSite: "none",
|
|
115
115
|
secure: true,
|
|
@@ -138,6 +138,7 @@ function createAuth(config) {
|
|
|
138
138
|
admin: adminRole,
|
|
139
139
|
owner: ownerRole
|
|
140
140
|
},
|
|
141
|
+
creatorRole: OrgRoles.ADMIN,
|
|
141
142
|
membershipLimit: 300,
|
|
142
143
|
invitationLimit: 300,
|
|
143
144
|
invitationExpiresIn: 10080 * 60,
|
|
@@ -16,7 +16,6 @@ declare const RelationshipOperation: typeof v1.RelationshipUpdate_Operation;
|
|
|
16
16
|
declare const Permissionship: typeof v1.CheckPermissionResponse_Permissionship;
|
|
17
17
|
/**
|
|
18
18
|
* Check if a subject has a permission on a resource.
|
|
19
|
-
* Note: Caller must verify isAuthzEnabled() before calling.
|
|
20
19
|
*/
|
|
21
20
|
declare function checkPermission(params: {
|
|
22
21
|
resourceType: string;
|
|
@@ -30,7 +30,6 @@ const RelationshipOperation = RelationshipUpdate_Operation;
|
|
|
30
30
|
const Permissionship = CheckPermissionResponse_Permissionship;
|
|
31
31
|
/**
|
|
32
32
|
* Check if a subject has a permission on a resource.
|
|
33
|
-
* Note: Caller must verify isAuthzEnabled() before calling.
|
|
34
33
|
*/
|
|
35
34
|
async function checkPermission(params) {
|
|
36
35
|
return (await getSpiceClient().promises.checkPermission({
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
//#region src/auth/authz/config.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* SpiceDB Authorization Configuration
|
|
4
|
-
*
|
|
5
|
-
* Feature flag and configuration for the SpiceDB authorization system.
|
|
6
|
-
*/
|
|
7
|
-
declare function isAuthzEnabled(): boolean;
|
|
8
2
|
/**
|
|
9
3
|
* Get SpiceDB connection configuration from environment variables.
|
|
10
4
|
* TLS is auto-detected: disabled for localhost, enabled for remote endpoints.
|
|
@@ -100,4 +94,4 @@ interface ProjectPermissions {
|
|
|
100
94
|
canEdit: boolean;
|
|
101
95
|
}
|
|
102
96
|
//#endregion
|
|
103
|
-
export { OrgRole, OrgRoles, ProjectPermissionLevel, ProjectPermissions, ProjectRole, ProjectRoles, SpiceDbOrgPermission, SpiceDbOrgPermissions, SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig
|
|
97
|
+
export { OrgRole, OrgRoles, ProjectPermissionLevel, ProjectPermissions, ProjectRole, ProjectRoles, SpiceDbOrgPermission, SpiceDbOrgPermissions, SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig };
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
//#region src/auth/authz/config.ts
|
|
2
2
|
/**
|
|
3
|
-
* SpiceDB Authorization Configuration
|
|
4
|
-
*
|
|
5
|
-
* Feature flag and configuration for the SpiceDB authorization system.
|
|
6
|
-
*/
|
|
7
|
-
function isAuthzEnabled() {
|
|
8
|
-
return process.env.ENABLE_AUTHZ === "true";
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
3
|
* Get SpiceDB connection configuration from environment variables.
|
|
12
4
|
* TLS is auto-detected: disabled for localhost, enabled for remote endpoints.
|
|
13
5
|
*/
|
|
@@ -90,4 +82,4 @@ const ProjectRoles = {
|
|
|
90
82
|
};
|
|
91
83
|
|
|
92
84
|
//#endregion
|
|
93
|
-
export { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig
|
|
85
|
+
export { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, lookupResources, readRelationships, resetSpiceClient, writeRelationship } from "./client.js";
|
|
2
|
-
import { OrgRole, OrgRoles, ProjectPermissionLevel, ProjectPermissions, ProjectRole, ProjectRoles, SpiceDbOrgPermission, SpiceDbOrgPermissions, SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig
|
|
2
|
+
import { OrgRole, OrgRoles, ProjectPermissionLevel, ProjectPermissions, ProjectRole, ProjectRoles, SpiceDbOrgPermission, SpiceDbOrgPermissions, SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig } from "./config.js";
|
|
3
3
|
import { canEditProject, canUseProject, canViewProject, listAccessibleProjectIds } from "./permissions.js";
|
|
4
4
|
import { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, listUserProjectMembershipsInSpiceDb, removeProjectFromSpiceDb, revokeAllProjectMemberships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb } from "./sync.js";
|
|
5
|
-
export { type OrgRole, OrgRoles, type ProjectPermissionLevel, type ProjectPermissions, type ProjectRole, ProjectRoles, type SpiceDbOrgPermission, SpiceDbOrgPermissions, type SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, canEditProject, canUseProject, canViewProject, changeOrgRole, changeProjectRole, checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, getSpiceDbConfig, grantProjectAccess,
|
|
5
|
+
export { type OrgRole, OrgRoles, type ProjectPermissionLevel, type ProjectPermissions, type ProjectRole, ProjectRoles, type SpiceDbOrgPermission, SpiceDbOrgPermissions, type SpiceDbProjectPermission, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, canEditProject, canUseProject, canViewProject, changeOrgRole, changeProjectRole, checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, getSpiceDbConfig, grantProjectAccess, listAccessibleProjectIds, listProjectMembers, listUserProjectMembershipsInSpiceDb, lookupResources, readRelationships, removeProjectFromSpiceDb, resetSpiceClient, revokeAllProjectMemberships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb, writeRelationship };
|
package/dist/auth/authz/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig
|
|
1
|
+
import { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, getSpiceDbConfig } from "./config.js";
|
|
2
2
|
import { checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, lookupResources, readRelationships, resetSpiceClient, writeRelationship } from "./client.js";
|
|
3
3
|
import { canEditProject, canUseProject, canViewProject, listAccessibleProjectIds } from "./permissions.js";
|
|
4
4
|
import { changeOrgRole, changeProjectRole, grantProjectAccess, listProjectMembers, listUserProjectMembershipsInSpiceDb, removeProjectFromSpiceDb, revokeAllProjectMemberships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb } from "./sync.js";
|
|
5
5
|
|
|
6
|
-
export { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, canEditProject, canUseProject, canViewProject, changeOrgRole, changeProjectRole, checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, getSpiceDbConfig, grantProjectAccess,
|
|
6
|
+
export { OrgRoles, ProjectRoles, SpiceDbOrgPermissions, SpiceDbProjectPermissions, SpiceDbRelations, SpiceDbResourceTypes, canEditProject, canUseProject, canViewProject, changeOrgRole, changeProjectRole, checkBulkPermissions, checkPermission, deleteRelationship, getSpiceClient, getSpiceDbConfig, grantProjectAccess, listAccessibleProjectIds, listProjectMembers, listUserProjectMembershipsInSpiceDb, lookupResources, readRelationships, removeProjectFromSpiceDb, resetSpiceClient, revokeAllProjectMemberships, revokeProjectAccess, syncOrgMemberToSpiceDb, syncProjectToSpiceDb, writeRelationship };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OrgRoles, SpiceDbProjectPermissions, SpiceDbResourceTypes
|
|
1
|
+
import { OrgRoles, SpiceDbProjectPermissions, SpiceDbResourceTypes } from "./config.js";
|
|
2
2
|
import { checkPermission, lookupResources } from "./client.js";
|
|
3
3
|
|
|
4
4
|
//#region src/auth/authz/permissions.ts
|
|
@@ -15,8 +15,7 @@ import { checkPermission, lookupResources } from "./client.js";
|
|
|
15
15
|
* - Otherwise: checks SpiceDB
|
|
16
16
|
*/
|
|
17
17
|
async function canViewProject(params) {
|
|
18
|
-
|
|
19
|
-
if (!isAuthzEnabled() || isAdmin) return true;
|
|
18
|
+
if (params.orgRole === OrgRoles.OWNER || params.orgRole === OrgRoles.ADMIN) return true;
|
|
20
19
|
return checkPermission({
|
|
21
20
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
22
21
|
resourceId: params.projectId,
|
|
@@ -33,8 +32,7 @@ async function canViewProject(params) {
|
|
|
33
32
|
* - Otherwise: checks SpiceDB for use permission
|
|
34
33
|
*/
|
|
35
34
|
async function canUseProject(params) {
|
|
36
|
-
|
|
37
|
-
if (!isAuthzEnabled() || isAdmin) return true;
|
|
35
|
+
if (params.orgRole === OrgRoles.OWNER || params.orgRole === OrgRoles.ADMIN) return true;
|
|
38
36
|
return checkPermission({
|
|
39
37
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
40
38
|
resourceId: params.projectId,
|
|
@@ -52,7 +50,6 @@ async function canUseProject(params) {
|
|
|
52
50
|
*/
|
|
53
51
|
async function canEditProject(params) {
|
|
54
52
|
if (params.orgRole === OrgRoles.OWNER || params.orgRole === OrgRoles.ADMIN) return true;
|
|
55
|
-
if (!isAuthzEnabled()) return false;
|
|
56
53
|
return checkPermission({
|
|
57
54
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
58
55
|
resourceId: params.projectId,
|
|
@@ -69,8 +66,7 @@ async function canEditProject(params) {
|
|
|
69
66
|
* - Otherwise: uses SpiceDB LookupResources
|
|
70
67
|
*/
|
|
71
68
|
async function listAccessibleProjectIds(params) {
|
|
72
|
-
|
|
73
|
-
if (!isAuthzEnabled() || isAdmin) return "all";
|
|
69
|
+
if (params.orgRole === OrgRoles.OWNER || params.orgRole === OrgRoles.ADMIN) return "all";
|
|
74
70
|
return lookupResources({
|
|
75
71
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
76
72
|
permission: SpiceDbProjectPermissions.VIEW,
|
package/dist/auth/authz/sync.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpiceDbRelations, SpiceDbResourceTypes
|
|
1
|
+
import { SpiceDbRelations, SpiceDbResourceTypes } from "./config.js";
|
|
2
2
|
import { RelationshipOperation, deleteRelationship, getSpiceClient, readRelationships, writeRelationship } from "./client.js";
|
|
3
3
|
|
|
4
4
|
//#region src/auth/authz/sync.ts
|
|
@@ -12,7 +12,6 @@ import { RelationshipOperation, deleteRelationship, getSpiceClient, readRelation
|
|
|
12
12
|
* Call when: user joins org, role changes, user leaves org.
|
|
13
13
|
*/
|
|
14
14
|
async function syncOrgMemberToSpiceDb(params) {
|
|
15
|
-
if (!isAuthzEnabled()) return;
|
|
16
15
|
if (params.action === "add") await writeRelationship({
|
|
17
16
|
resourceType: SpiceDbResourceTypes.ORGANIZATION,
|
|
18
17
|
resourceId: params.tenantId,
|
|
@@ -34,7 +33,6 @@ async function syncOrgMemberToSpiceDb(params) {
|
|
|
34
33
|
* Call when: user's org role is updated (e.g., member -> admin).
|
|
35
34
|
*/
|
|
36
35
|
async function changeOrgRole(params) {
|
|
37
|
-
if (!isAuthzEnabled()) return;
|
|
38
36
|
if (params.oldRole === params.newRole) return;
|
|
39
37
|
await getSpiceClient().promises.writeRelationships({
|
|
40
38
|
updates: [{
|
|
@@ -82,7 +80,6 @@ async function changeOrgRole(params) {
|
|
|
82
80
|
* Call when: project is created.
|
|
83
81
|
*/
|
|
84
82
|
async function syncProjectToSpiceDb(params) {
|
|
85
|
-
if (!isAuthzEnabled()) return;
|
|
86
83
|
const spice = getSpiceClient();
|
|
87
84
|
const isOrgAdminOrOwner = (await readRelationships({
|
|
88
85
|
resourceType: SpiceDbResourceTypes.ORGANIZATION,
|
|
@@ -136,7 +133,6 @@ async function syncProjectToSpiceDb(params) {
|
|
|
136
133
|
* Grant project access to a user.
|
|
137
134
|
*/
|
|
138
135
|
async function grantProjectAccess(params) {
|
|
139
|
-
if (!isAuthzEnabled()) throw new Error("Authorization is not enabled");
|
|
140
136
|
await writeRelationship({
|
|
141
137
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
142
138
|
resourceId: params.projectId,
|
|
@@ -149,7 +145,6 @@ async function grantProjectAccess(params) {
|
|
|
149
145
|
* Revoke project access from a user.
|
|
150
146
|
*/
|
|
151
147
|
async function revokeProjectAccess(params) {
|
|
152
|
-
if (!isAuthzEnabled()) throw new Error("Authorization is not enabled");
|
|
153
148
|
await deleteRelationship({
|
|
154
149
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
155
150
|
resourceId: params.projectId,
|
|
@@ -163,7 +158,6 @@ async function revokeProjectAccess(params) {
|
|
|
163
158
|
* Removes the old role and adds the new one atomically in a single transaction.
|
|
164
159
|
*/
|
|
165
160
|
async function changeProjectRole(params) {
|
|
166
|
-
if (!isAuthzEnabled()) throw new Error("Authorization is not enabled");
|
|
167
161
|
if (params.oldRole === params.newRole) return;
|
|
168
162
|
await getSpiceClient().promises.writeRelationships({
|
|
169
163
|
updates: [{
|
|
@@ -210,7 +204,6 @@ async function changeProjectRole(params) {
|
|
|
210
204
|
* Call when: project is deleted.
|
|
211
205
|
*/
|
|
212
206
|
async function removeProjectFromSpiceDb(params) {
|
|
213
|
-
if (!isAuthzEnabled()) return;
|
|
214
207
|
await getSpiceClient().promises.deleteRelationships({
|
|
215
208
|
relationshipFilter: {
|
|
216
209
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
@@ -229,7 +222,6 @@ async function removeProjectFromSpiceDb(params) {
|
|
|
229
222
|
* Returns users with project_admin, project_member, or project_viewer roles.
|
|
230
223
|
*/
|
|
231
224
|
async function listProjectMembers(params) {
|
|
232
|
-
if (!isAuthzEnabled()) return [];
|
|
233
225
|
return (await readRelationships({
|
|
234
226
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
235
227
|
resourceId: params.projectId
|
|
@@ -243,7 +235,6 @@ async function listProjectMembers(params) {
|
|
|
243
235
|
* Returns projects where the user has explicit project_admin, project_member, or project_viewer roles.
|
|
244
236
|
*/
|
|
245
237
|
async function listUserProjectMembershipsInSpiceDb(params) {
|
|
246
|
-
if (!isAuthzEnabled()) return [];
|
|
247
238
|
return (await readRelationships({
|
|
248
239
|
resourceType: SpiceDbResourceTypes.PROJECT,
|
|
249
240
|
subjectType: SpiceDbResourceTypes.USER,
|
|
@@ -260,7 +251,6 @@ async function listUserProjectMembershipsInSpiceDb(params) {
|
|
|
260
251
|
* Uses efficient bulk delete - deletes all project relationships for user without listing first.
|
|
261
252
|
*/
|
|
262
253
|
async function revokeAllProjectMemberships(params) {
|
|
263
|
-
if (!isAuthzEnabled()) return;
|
|
264
254
|
const spice = getSpiceClient();
|
|
265
255
|
await Promise.all([
|
|
266
256
|
spice.promises.deleteRelationships({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { OrgRoles } from "./authz/config.js";
|
|
2
|
+
import { loadEnvironmentFiles } from "../env.js";
|
|
3
|
+
import { syncOrgMemberToSpiceDb } from "./authz/sync.js";
|
|
4
|
+
import "./authz/index.js";
|
|
5
|
+
import { createAgentsRunDatabaseClient } from "../db/runtime/runtime-client.js";
|
|
6
|
+
import { addUserToOrganization, upsertOrganization } from "../data-access/runtime/organizations.js";
|
|
7
|
+
import { getUserByEmail } from "../data-access/runtime/users.js";
|
|
8
|
+
import { createAuth } from "./auth.js";
|
|
9
|
+
|
|
10
|
+
//#region src/auth/init.ts
|
|
11
|
+
/**
|
|
12
|
+
* Standalone initialization script for creating the default organization and admin user.
|
|
13
|
+
* This script is designed to run during setup/migration, NOT at server startup.
|
|
14
|
+
*
|
|
15
|
+
* Uses upsertOrganization to create org with TENANT_ID as the actual organization ID,
|
|
16
|
+
* and Better Auth's API for user creation.
|
|
17
|
+
*
|
|
18
|
+
* Usage: pnpm db:auth:init
|
|
19
|
+
*
|
|
20
|
+
* Required environment variables:
|
|
21
|
+
* - INKEEP_AGENTS_RUN_DATABASE_URL: PostgreSQL connection string
|
|
22
|
+
* - TENANT_ID: Organization/tenant ID (defaults to 'default') - this becomes the org ID
|
|
23
|
+
* - INKEEP_AGENTS_MANAGE_UI_USERNAME: Admin email address
|
|
24
|
+
* - INKEEP_AGENTS_MANAGE_UI_PASSWORD: Admin password (min 8 chars)
|
|
25
|
+
* - BETTER_AUTH_SECRET: Secret for Better Auth
|
|
26
|
+
*
|
|
27
|
+
* Optional environment variables:
|
|
28
|
+
* - INKEEP_AGENTS_API_URL: API URL for Better Auth (defaults to http://localhost:3002)
|
|
29
|
+
*/
|
|
30
|
+
loadEnvironmentFiles();
|
|
31
|
+
const TENANT_ID = process.env.TENANT_ID || "default";
|
|
32
|
+
async function init() {
|
|
33
|
+
console.log("🚀 Initializing database with default organization and user...\n");
|
|
34
|
+
const dbClient = createAgentsRunDatabaseClient();
|
|
35
|
+
const username = process.env.INKEEP_AGENTS_MANAGE_UI_USERNAME;
|
|
36
|
+
const password = process.env.INKEEP_AGENTS_MANAGE_UI_PASSWORD;
|
|
37
|
+
const authSecret = process.env.BETTER_AUTH_SECRET;
|
|
38
|
+
if (!username || !password) {
|
|
39
|
+
console.error("❌ INKEEP_AGENTS_MANAGE_UI_USERNAME and INKEEP_AGENTS_MANAGE_UI_PASSWORD are required");
|
|
40
|
+
console.error(" These credentials are used to create the initial admin user.");
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
if (!authSecret) {
|
|
44
|
+
console.error("❌ BETTER_AUTH_SECRET is required");
|
|
45
|
+
console.error(" This secret is used to sign authentication tokens.");
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
const auth = createAuth({
|
|
49
|
+
baseURL: process.env.INKEEP_AGENTS_API_URL || "http://localhost:3002",
|
|
50
|
+
secret: authSecret,
|
|
51
|
+
dbClient
|
|
52
|
+
});
|
|
53
|
+
console.log(`📦 Checking/creating organization: ${TENANT_ID}`);
|
|
54
|
+
const { created: orgCreated } = await upsertOrganization(dbClient)({
|
|
55
|
+
organizationId: TENANT_ID,
|
|
56
|
+
name: TENANT_ID,
|
|
57
|
+
slug: TENANT_ID,
|
|
58
|
+
logo: null,
|
|
59
|
+
metadata: null
|
|
60
|
+
});
|
|
61
|
+
if (orgCreated) console.log(` ✅ Organization created with ID: ${TENANT_ID}`);
|
|
62
|
+
else console.log(` ℹ️ Organization already exists: ${TENANT_ID}`);
|
|
63
|
+
console.log(`\n👤 Creating admin user: ${username}`);
|
|
64
|
+
let user = await getUserByEmail(dbClient)(username);
|
|
65
|
+
if (user) console.log(` ℹ️ User already exists: ${username}`);
|
|
66
|
+
else {
|
|
67
|
+
console.log(" Creating user with Better Auth...");
|
|
68
|
+
if (!(await auth.api.signUpEmail({ body: {
|
|
69
|
+
email: username,
|
|
70
|
+
password,
|
|
71
|
+
name: username.split("@")[0]
|
|
72
|
+
} })).user) {
|
|
73
|
+
console.error(" ❌ Failed to create user: signUpEmail returned no user");
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
user = await getUserByEmail(dbClient)(username);
|
|
77
|
+
if (!user) {
|
|
78
|
+
console.error(" ❌ User was created but could not be retrieved from database");
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
console.log(` ✅ User created: ${user.email}`);
|
|
82
|
+
}
|
|
83
|
+
console.log(`\n🔗 Adding user to organization...`);
|
|
84
|
+
await addUserToOrganization(dbClient)({
|
|
85
|
+
userId: user.id,
|
|
86
|
+
organizationId: TENANT_ID,
|
|
87
|
+
role: OrgRoles.ADMIN
|
|
88
|
+
});
|
|
89
|
+
console.log(` ✅ User ${user.email} added as ${OrgRoles.ADMIN}`);
|
|
90
|
+
try {
|
|
91
|
+
await syncOrgMemberToSpiceDb({
|
|
92
|
+
tenantId: TENANT_ID,
|
|
93
|
+
userId: user.id,
|
|
94
|
+
role: OrgRoles.ADMIN,
|
|
95
|
+
action: "add"
|
|
96
|
+
});
|
|
97
|
+
console.log(" ✅ Synced to SpiceDB");
|
|
98
|
+
} catch {
|
|
99
|
+
console.log(" ℹ️ SpiceDB sync failed");
|
|
100
|
+
}
|
|
101
|
+
console.log("\n================================================");
|
|
102
|
+
console.log("✅ Initialization complete!");
|
|
103
|
+
console.log("================================================");
|
|
104
|
+
console.log(`\nOrganization: ${TENANT_ID}`);
|
|
105
|
+
console.log(`Admin user: ${username} (owner)`);
|
|
106
|
+
console.log("\nYou can now log in with these credentials.\n");
|
|
107
|
+
process.exit(0);
|
|
108
|
+
}
|
|
109
|
+
init().catch((error) => {
|
|
110
|
+
console.error("\n❌ Initialization failed:", error);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
//#endregion
|
|
115
|
+
export { };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js
|
|
|
8
8
|
import { detectAuthenticationRequired } from "./utils/auth-detection.js";
|
|
9
9
|
import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
|
|
10
10
|
import "./index.js";
|
|
11
|
-
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
|
+
import { AgentStopWhen, AgentStopWhenSchema, ApiKeyApiUpdateSchema, FullAgentAgentInsertSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, ModelSettings, ModelSettingsSchema, ResourceIdSchema, SignatureSource, SignatureVerificationConfig, SignatureVerificationConfigSchema, SignedComponent, StopWhen, StopWhenSchema, SubAgentStopWhen, SubAgentStopWhenSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema } from "./validation/schemas.js";
|
|
12
12
|
import { z } from "@hono/zod-openapi";
|
|
13
13
|
|
|
14
14
|
//#region src/client-exports.d.ts
|
|
@@ -307,12 +307,8 @@ type InternalAgentDefinition = z.infer<typeof FullAgentAgentInsertSchema>;
|
|
|
307
307
|
type ExternalAgentDefinition = z.infer<typeof ExternalAgentApiInsertSchema>;
|
|
308
308
|
type TenantParams = z.infer<typeof TenantParamsSchema>;
|
|
309
309
|
type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
|
|
310
|
-
declare const MIN_ID_LENGTH = 1;
|
|
311
|
-
declare const MAX_ID_LENGTH = 255;
|
|
312
|
-
declare const URL_SAFE_ID_PATTERN: RegExp;
|
|
313
|
-
declare const resourceIdSchema: z.ZodString;
|
|
314
310
|
declare function generateIdFromName(name: string): string;
|
|
315
311
|
type ToolInsert = ToolApiInsert;
|
|
316
312
|
type AgentAgentInsert = AgentAgentApiInsert;
|
|
317
313
|
//#endregion
|
|
318
|
-
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,
|
|
314
|
+
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, MCPTransportType, 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, ResourceIdSchema, 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, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, detectAuthenticationRequired, generateIdFromName, parseContextBreakdownFromSpan, validatePropsAsJsonSchema };
|
package/dist/client-exports.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { schemaValidationDefaults } from "./constants/schema-validation/defaults.js";
|
|
2
2
|
import { CredentialStoreType, MCPTransportType } from "./types/utility.js";
|
|
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
|
-
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
5
3
|
import { validatePropsAsJsonSchema } from "./validation/props-validation.js";
|
|
4
|
+
import { AgentStopWhenSchema, ArtifactComponentApiInsertSchema as ArtifactComponentApiInsertSchema$1, FullAgentAgentInsertSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, MAX_ID_LENGTH, ModelSettingsSchema, ResourceIdSchema, SignatureVerificationConfigSchema, StopWhenSchema, SubAgentStopWhenSchema, TriggerApiInsertSchema, TriggerApiSelectSchema, TriggerApiUpdateSchema, TriggerInvocationApiSelectSchema, TriggerInvocationListResponse, TriggerInvocationResponse, TriggerInvocationStatusEnum, TriggerListResponse, TriggerResponse, TriggerWithWebhookUrlListResponse, TriggerWithWebhookUrlResponse, TriggerWithWebhookUrlSchema } from "./validation/schemas.js";
|
|
5
|
+
import { DEFAULT_NANGO_STORE_ID } from "./credential-stores/default-constants.js";
|
|
6
6
|
import { OrgRoles, ProjectRoles } from "./auth/authz/config.js";
|
|
7
7
|
import { CONTEXT_BREAKDOWN_TOTAL_SPAN_ATTRIBUTE, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, parseContextBreakdownFromSpan } from "./constants/context-breakdown.js";
|
|
8
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";
|
|
@@ -160,13 +160,9 @@ const FullAgentDefinitionSchema = AgentAgentApiInsertSchema.extend({
|
|
|
160
160
|
})).optional()
|
|
161
161
|
}).optional()
|
|
162
162
|
});
|
|
163
|
-
const MIN_ID_LENGTH = 1;
|
|
164
|
-
const MAX_ID_LENGTH = 255;
|
|
165
|
-
const URL_SAFE_ID_PATTERN = /^[a-zA-Z0-9\-_.]+$/;
|
|
166
|
-
const resourceIdSchema = z.string().min(MIN_ID_LENGTH).max(MAX_ID_LENGTH).regex(URL_SAFE_ID_PATTERN, { message: "ID must contain only letters, numbers, hyphens, underscores, and dots" });
|
|
167
163
|
function generateIdFromName(name) {
|
|
168
164
|
return name.toLowerCase().replace(/[^a-zA-Z0-9]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").slice(0, MAX_ID_LENGTH);
|
|
169
165
|
}
|
|
170
166
|
|
|
171
167
|
//#endregion
|
|
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,
|
|
168
|
+
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, MCPTransportType, ModelSettingsSchema, OPERATORS, ORDER_DIRECTIONS, OrgRoles, PANEL_TYPES, PaginationSchema, ProjectRoles, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, ResourceIdSchema, 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, V1_BREAKDOWN_SCHEMA, calculateBreakdownTotal, createEmptyBreakdown, detectAuthenticationRequired, generateIdFromName, parseContextBreakdownFromSpan, validatePropsAsJsonSchema };
|
|
@@ -15,6 +15,7 @@ declare const SPAN_NAMES: {
|
|
|
15
15
|
readonly TOOL_APPROVAL_APPROVED: "tool.approval_approved";
|
|
16
16
|
readonly TOOL_APPROVAL_DENIED: "tool.approval_denied";
|
|
17
17
|
readonly COMPRESSOR_SAFE_COMPRESS: "compressor.safe_compress";
|
|
18
|
+
readonly AGENT_MAX_STEPS_REACHED: "agent.max_steps_reached";
|
|
18
19
|
};
|
|
19
20
|
declare const AI_OPERATIONS: {
|
|
20
21
|
readonly GENERATE_TEXT: "ai.generateText.doGenerate";
|
|
@@ -102,6 +103,9 @@ declare const SPAN_KEYS: {
|
|
|
102
103
|
readonly CONTEXT_BREAKDOWN_THINKING_PREPARATION: "context.breakdown.thinking_preparation_tokens";
|
|
103
104
|
readonly CONTEXT_BREAKDOWN_CONVERSATION_HISTORY: "context.breakdown.conversation_history_tokens";
|
|
104
105
|
readonly CONTEXT_BREAKDOWN_TOTAL: "context.breakdown.total_tokens";
|
|
106
|
+
readonly AGENT_MAX_STEPS_REACHED: "agent.max_steps_reached";
|
|
107
|
+
readonly AGENT_STEPS_COMPLETED: "agent.steps_completed";
|
|
108
|
+
readonly AGENT_MAX_STEPS: "agent.max_steps";
|
|
105
109
|
};
|
|
106
110
|
declare const UNKNOWN_VALUE: "unknown";
|
|
107
111
|
/** Activity Types */
|
|
@@ -118,6 +122,7 @@ declare const ACTIVITY_TYPES: {
|
|
|
118
122
|
readonly TOOL_APPROVAL_APPROVED: "tool_approval_approved";
|
|
119
123
|
readonly TOOL_APPROVAL_DENIED: "tool_approval_denied";
|
|
120
124
|
readonly COMPRESSION: "compression";
|
|
125
|
+
readonly MAX_STEPS_REACHED: "max_steps_reached";
|
|
121
126
|
};
|
|
122
127
|
/** Activity Status Values */
|
|
123
128
|
declare const ACTIVITY_STATUS: {
|
|
@@ -14,7 +14,8 @@ const SPAN_NAMES = {
|
|
|
14
14
|
TOOL_APPROVAL_REQUESTED: "tool.approval_requested",
|
|
15
15
|
TOOL_APPROVAL_APPROVED: "tool.approval_approved",
|
|
16
16
|
TOOL_APPROVAL_DENIED: "tool.approval_denied",
|
|
17
|
-
COMPRESSOR_SAFE_COMPRESS: "compressor.safe_compress"
|
|
17
|
+
COMPRESSOR_SAFE_COMPRESS: "compressor.safe_compress",
|
|
18
|
+
AGENT_MAX_STEPS_REACHED: "agent.max_steps_reached"
|
|
18
19
|
};
|
|
19
20
|
const AI_OPERATIONS = {
|
|
20
21
|
GENERATE_TEXT: "ai.generateText.doGenerate",
|
|
@@ -101,7 +102,10 @@ const SPAN_KEYS = {
|
|
|
101
102
|
CONTEXT_BREAKDOWN_DELEGATION_INSTRUCTIONS: "context.breakdown.delegation_instructions_tokens",
|
|
102
103
|
CONTEXT_BREAKDOWN_THINKING_PREPARATION: "context.breakdown.thinking_preparation_tokens",
|
|
103
104
|
CONTEXT_BREAKDOWN_CONVERSATION_HISTORY: "context.breakdown.conversation_history_tokens",
|
|
104
|
-
CONTEXT_BREAKDOWN_TOTAL: "context.breakdown.total_tokens"
|
|
105
|
+
CONTEXT_BREAKDOWN_TOTAL: "context.breakdown.total_tokens",
|
|
106
|
+
AGENT_MAX_STEPS_REACHED: "agent.max_steps_reached",
|
|
107
|
+
AGENT_STEPS_COMPLETED: "agent.steps_completed",
|
|
108
|
+
AGENT_MAX_STEPS: "agent.max_steps"
|
|
105
109
|
};
|
|
106
110
|
const UNKNOWN_VALUE = "unknown";
|
|
107
111
|
/** Activity Types */
|
|
@@ -117,7 +121,8 @@ const ACTIVITY_TYPES = {
|
|
|
117
121
|
TOOL_APPROVAL_REQUESTED: "tool_approval_requested",
|
|
118
122
|
TOOL_APPROVAL_APPROVED: "tool_approval_approved",
|
|
119
123
|
TOOL_APPROVAL_DENIED: "tool_approval_denied",
|
|
120
|
-
COMPRESSION: "compression"
|
|
124
|
+
COMPRESSION: "compression",
|
|
125
|
+
MAX_STEPS_REACHED: "max_steps_reached"
|
|
121
126
|
};
|
|
122
127
|
/** Activity Status Values */
|
|
123
128
|
const ACTIVITY_STATUS = {
|
|
@@ -103,6 +103,7 @@ declare const QUERY_EXPRESSIONS: {
|
|
|
103
103
|
readonly TOOL_APPROVAL_APPROVED: "toolApprovalApproved";
|
|
104
104
|
readonly TOOL_APPROVAL_DENIED: "toolApprovalDenied";
|
|
105
105
|
readonly COMPRESSION: "compression";
|
|
106
|
+
readonly MAX_STEPS_REACHED: "maxStepsReached";
|
|
106
107
|
};
|
|
107
108
|
/** Query Reduce Operations */
|
|
108
109
|
declare const REDUCE_OPERATIONS: {
|
|
@@ -102,7 +102,8 @@ const QUERY_EXPRESSIONS = {
|
|
|
102
102
|
TOOL_APPROVAL_REQUESTED: "toolApprovalRequested",
|
|
103
103
|
TOOL_APPROVAL_APPROVED: "toolApprovalApproved",
|
|
104
104
|
TOOL_APPROVAL_DENIED: "toolApprovalDenied",
|
|
105
|
-
COMPRESSION: "compression"
|
|
105
|
+
COMPRESSION: "compression",
|
|
106
|
+
MAX_STEPS_REACHED: "maxStepsReached"
|
|
106
107
|
};
|
|
107
108
|
/** Query Reduce Operations */
|
|
108
109
|
const REDUCE_OPERATIONS = {
|
|
@@ -20,10 +20,11 @@ import { createSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelation, delet
|
|
|
20
20
|
import { addToolToAgent, createTool, dbResultToMcpTool, dbResultToMcpToolSkeleton, deleteTool, getMcpToolById, getToolById, listTools, removeToolFromAgent, updateTool, upsertSubAgentToolRelation, upsertTool } from "./manage/tools.js";
|
|
21
21
|
import { createTrigger, deleteTrigger, getTriggerById, listTriggers, listTriggersPaginated, updateTrigger, upsertTrigger } from "./manage/triggers.js";
|
|
22
22
|
import { countApiKeys, createApiKey, deleteApiKey, generateAndCreateApiKey, getApiKeyById, getApiKeyByPublicId, hasApiKey, listApiKeys, listApiKeysPaginated, updateApiKey, updateApiKeyLastUsed, validateAndGetApiKey } from "./runtime/apiKeys.js";
|
|
23
|
-
import { CascadeDeleteResult, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent } from "./runtime/cascade-delete.js";
|
|
23
|
+
import { CascadeDeleteResult, ProjectGitHubAccessCascadeDeleteResult, ToolCascadeDeleteResult, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cascadeDeleteByTool, cascadeDeleteGitHubAccessByProject } from "./runtime/cascade-delete.js";
|
|
24
24
|
import { cleanupTenantCache, clearContextConfigCache, clearConversationCache, getCacheEntry, getContextConfigCacheEntries, getConversationCacheEntries, invalidateHeadersCache, invalidateInvocationDefinitionsCache, setCacheEntry } from "./runtime/contextCache.js";
|
|
25
25
|
import { createConversation, createOrGetConversation, deleteConversation, getActiveAgentForConversation, getConversation, getConversationHistory, listConversations, setActiveAgentForConversation, setActiveAgentForThread, updateConversation, updateConversationActiveSubAgent } from "./runtime/conversations.js";
|
|
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
|
+
import { WorkAppGitHubAccessMode, addRepositories, checkProjectRepositoryAccess, clearMcpToolRepositoryAccess, clearProjectRepositoryAccess, createInstallation, deleteInstallation, deleteMcpToolAccessMode, deleteProjectAccessMode, disconnectInstallation, getInstallationByGitHubId, getInstallationById, getInstallationsByTenantId, getMcpToolAccessMode, getMcpToolRepositoryAccess, getMcpToolRepositoryAccessWithDetails, getProjectAccessMode, getProjectRepositoryAccess, getProjectRepositoryAccessWithDetails, getRepositoriesByInstallationId, getRepositoriesByTenantId, getRepositoryByFullName, getRepositoryById, getRepositoryCount, getRepositoryCountsByTenantId, isGithubWorkAppTool, removeRepositories, setMcpToolAccessMode, setMcpToolRepositoryAccess, setProjectAccessMode, setProjectRepositoryAccess, syncRepositories, updateInstallationStatus, updateInstallationStatusByGitHubId, validateRepositoryOwnership } from "./runtime/github-work-app-installations.js";
|
|
27
28
|
import { addLedgerArtifacts, countLedgerArtifactsByTask, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, getLedgerArtifacts, getLedgerArtifactsByContext, upsertLedgerArtifact } from "./runtime/ledgerArtifacts.js";
|
|
28
29
|
import { countMessagesByConversation, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage } from "./runtime/messages.js";
|
|
29
30
|
import { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, upsertOrganization } from "./runtime/organizations.js";
|
|
@@ -32,4 +33,4 @@ import { createTask, getTask, listTaskIdsByContextId, updateTask } from "./runti
|
|
|
32
33
|
import { createTriggerInvocation, getTriggerInvocationById, listTriggerInvocationsPaginated, updateTriggerInvocationStatus } from "./runtime/triggerInvocations.js";
|
|
33
34
|
import { getUserByEmail, getUserById } from "./runtime/users.js";
|
|
34
35
|
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, dbResultToMcpToolSkeleton, 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 };
|
|
36
|
+
export { AgentLogger, AgentsManageDatabaseClient, AgentsManageDatabaseConfig, AgentsRunDatabaseClient, AgentsRunDatabaseConfig, CascadeDeleteResult, CreateProjectWithBranchParams, CreateProjectWithBranchResult, CredentialReferenceWithResources, DeleteProjectWithBranchParams, ListProjectsWithMetadataResult, ProjectConfigMetadata, ProjectGitHubAccessCascadeDeleteResult, ProjectLogger, ProjectMetadataPaginatedResult, ProjectWithMetadata, SubAgentIsDefaultError, ToolCascadeDeleteResult, WorkAppGitHubAccessMode, addFunctionToolToSubAgent, addLedgerArtifacts, addRepositories, addToolToAgent, addUserToOrganization, agentHasArtifactComponents, associateArtifactComponentWithAgent, associateDataComponentWithAgent, associateFunctionToolWithSubAgent, cascadeDeleteByAgent, cascadeDeleteByBranch, cascadeDeleteByContextConfig, cascadeDeleteByProject, cascadeDeleteBySubAgent, cascadeDeleteByTool, cascadeDeleteGitHubAccessByProject, checkProjectRepositoryAccess, cleanupTenantCache, clearContextConfigCache, clearConversationCache, clearMcpToolRepositoryAccess, clearProjectRepositoryAccess, 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, createInstallation, createMessage, createOrGetConversation, createProject, createProjectMetadata, createProjectMetadataAndBranch, createSubAgent, createSubAgentExternalAgentRelation, createSubAgentRelation, createSubAgentTeamAgentRelation, createTask, createTool, createTrigger, createTriggerInvocation, createValidatedDataAccess, dbResultToMcpTool, dbResultToMcpToolSkeleton, 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, deleteInstallation, deleteLedgerArtifactsByContext, deleteLedgerArtifactsByTask, deleteMcpToolAccessMode, deleteMessage, deleteProject, deleteProjectAccessMode, deleteProjectMetadata, deleteProjectWithBranch, deleteSubAgent, deleteSubAgentExternalAgentRelation, deleteSubAgentExternalAgentRelationsByAgent, deleteSubAgentExternalAgentRelationsBySubAgent, deleteSubAgentRelation, deleteSubAgentTeamAgentRelation, deleteSubAgentTeamAgentRelationsByAgent, deleteSubAgentTeamAgentRelationsBySubAgent, deleteTool, deleteTrigger, disconnectInstallation, 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, getInstallationByGitHubId, getInstallationById, getInstallationsByTenantId, getLedgerArtifacts, getLedgerArtifactsByContext, getMcpToolAccessMode, getMcpToolById, getMcpToolRepositoryAccess, getMcpToolRepositoryAccessWithDetails, getMessageById, getMessagesByConversation, getMessagesByTask, getPendingInvitationsByEmail, getProject, getProjectAccessMode, getProjectMainBranchName, getProjectMetadata, getProjectRepositoryAccess, getProjectRepositoryAccessWithDetails, getProjectResourceCounts, getProjectWithBranchInfo, getProjectWithMetadata, getRelatedAgentsForAgent, getRepositoriesByInstallationId, getRepositoriesByTenantId, getRepositoryByFullName, getRepositoryById, getRepositoryCount, getRepositoryCountsByTenantId, 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, isGithubWorkAppTool, 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, removeRepositories, removeToolFromAgent, setActiveAgentForConversation, setActiveAgentForThread, setCacheEntry, setMcpToolAccessMode, setMcpToolRepositoryAccess, setProjectAccessMode, setProjectRepositoryAccess, syncRepositories, updateAgent, updateAgentRelation, updateAgentToolRelation, updateApiKey, updateApiKeyLastUsed, updateArtifactComponent, updateContextConfig, updateConversation, updateConversationActiveSubAgent, updateCredentialReference, updateDataComponent, updateDataset, updateDatasetItem, updateDatasetRunConfig, updateEvaluationResult, updateEvaluationRun, updateEvaluationRunConfig, updateEvaluationSuiteConfig, updateEvaluator, updateExternalAgent, updateFullAgentServerSide, updateFullProjectServerSide, updateFunctionTool, updateInstallationStatus, updateInstallationStatusByGitHubId, 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, validateRepositoryOwnership, validateSubAgent, withProjectValidation };
|