@inkeep/agents-core 0.0.0-dev-20260219045007 → 0.0.0-dev-20260219103848
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 +22 -22
- package/dist/auth/auth.d.ts +22 -22
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +3 -3
- package/dist/data-access/manage/agents.d.ts +21 -21
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/scope-helpers.d.ts +25 -0
- package/dist/data-access/manage/scope-helpers.js +18 -0
- package/dist/data-access/manage/skills.d.ts +13 -13
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentExternalAgentRelations.js +13 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +26 -26
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +27 -27
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +3 -3
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/db/manage/manage-schema.d.ts +96 -96
- package/dist/db/runtime/runtime-schema.d.ts +38 -38
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/schemas.d.ts +331 -331
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as drizzle_orm3 from "drizzle-orm";
|
|
2
2
|
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
3
3
|
|
|
4
4
|
//#region src/auth/auth-schema.d.ts
|
|
@@ -1306,33 +1306,33 @@ declare const deviceCode: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
1306
1306
|
};
|
|
1307
1307
|
dialect: "pg";
|
|
1308
1308
|
}>;
|
|
1309
|
-
declare const userRelations:
|
|
1310
|
-
sessions:
|
|
1311
|
-
accounts:
|
|
1312
|
-
ssoProviders:
|
|
1313
|
-
members:
|
|
1314
|
-
invitations:
|
|
1309
|
+
declare const userRelations: drizzle_orm3.Relations<"user", {
|
|
1310
|
+
sessions: drizzle_orm3.Many<"session">;
|
|
1311
|
+
accounts: drizzle_orm3.Many<"account">;
|
|
1312
|
+
ssoProviders: drizzle_orm3.Many<"sso_provider">;
|
|
1313
|
+
members: drizzle_orm3.Many<"member">;
|
|
1314
|
+
invitations: drizzle_orm3.Many<"invitation">;
|
|
1315
1315
|
}>;
|
|
1316
|
-
declare const sessionRelations:
|
|
1317
|
-
user:
|
|
1316
|
+
declare const sessionRelations: drizzle_orm3.Relations<"session", {
|
|
1317
|
+
user: drizzle_orm3.One<"user", true>;
|
|
1318
1318
|
}>;
|
|
1319
|
-
declare const accountRelations:
|
|
1320
|
-
user:
|
|
1319
|
+
declare const accountRelations: drizzle_orm3.Relations<"account", {
|
|
1320
|
+
user: drizzle_orm3.One<"user", true>;
|
|
1321
1321
|
}>;
|
|
1322
|
-
declare const ssoProviderRelations:
|
|
1323
|
-
user:
|
|
1322
|
+
declare const ssoProviderRelations: drizzle_orm3.Relations<"sso_provider", {
|
|
1323
|
+
user: drizzle_orm3.One<"user", false>;
|
|
1324
1324
|
}>;
|
|
1325
|
-
declare const organizationRelations:
|
|
1326
|
-
members:
|
|
1327
|
-
invitations:
|
|
1325
|
+
declare const organizationRelations: drizzle_orm3.Relations<"organization", {
|
|
1326
|
+
members: drizzle_orm3.Many<"member">;
|
|
1327
|
+
invitations: drizzle_orm3.Many<"invitation">;
|
|
1328
1328
|
}>;
|
|
1329
|
-
declare const memberRelations:
|
|
1330
|
-
organization:
|
|
1331
|
-
user:
|
|
1329
|
+
declare const memberRelations: drizzle_orm3.Relations<"member", {
|
|
1330
|
+
organization: drizzle_orm3.One<"organization", true>;
|
|
1331
|
+
user: drizzle_orm3.One<"user", true>;
|
|
1332
1332
|
}>;
|
|
1333
|
-
declare const invitationRelations:
|
|
1334
|
-
organization:
|
|
1335
|
-
user:
|
|
1333
|
+
declare const invitationRelations: drizzle_orm3.Relations<"invitation", {
|
|
1334
|
+
organization: drizzle_orm3.One<"organization", true>;
|
|
1335
|
+
user: drizzle_orm3.One<"user", true>;
|
|
1336
1336
|
}>;
|
|
1337
1337
|
//#endregion
|
|
1338
1338
|
export { account, accountRelations, deviceCode, invitation, invitationRelations, member, memberRelations, organization, organizationRelations, session, sessionRelations, ssoProvider, ssoProviderRelations, user, userRelations, verification };
|
package/dist/auth/auth.d.ts
CHANGED
|
@@ -880,25 +880,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
880
880
|
ac: better_auth_plugins0.AccessControl;
|
|
881
881
|
roles: {
|
|
882
882
|
member: {
|
|
883
|
-
authorize<K_1 extends "organization" | "
|
|
884
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
883
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
884
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
885
885
|
connector: "OR" | "AND";
|
|
886
886
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
887
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
887
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
888
888
|
};
|
|
889
889
|
admin: {
|
|
890
|
-
authorize<K_1 extends "organization" | "
|
|
891
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
890
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
891
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
892
892
|
connector: "OR" | "AND";
|
|
893
893
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
894
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
894
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
895
895
|
};
|
|
896
896
|
owner: {
|
|
897
|
-
authorize<K_1 extends "organization" | "
|
|
898
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
897
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
898
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
899
899
|
connector: "OR" | "AND";
|
|
900
900
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
901
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
901
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
902
902
|
};
|
|
903
903
|
};
|
|
904
904
|
creatorRole: "admin";
|
|
@@ -1084,7 +1084,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1084
1084
|
id: string;
|
|
1085
1085
|
organizationId: string;
|
|
1086
1086
|
email: string;
|
|
1087
|
-
role: "
|
|
1087
|
+
role: "owner" | "admin" | "member";
|
|
1088
1088
|
status: better_auth_plugins0.InvitationStatus;
|
|
1089
1089
|
inviterId: string;
|
|
1090
1090
|
expiresAt: Date;
|
|
@@ -1094,7 +1094,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1094
1094
|
Member: {
|
|
1095
1095
|
id: string;
|
|
1096
1096
|
organizationId: string;
|
|
1097
|
-
role: "
|
|
1097
|
+
role: "owner" | "admin" | "member";
|
|
1098
1098
|
createdAt: Date;
|
|
1099
1099
|
userId: string;
|
|
1100
1100
|
user: {
|
|
@@ -1110,7 +1110,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1110
1110
|
members: {
|
|
1111
1111
|
id: string;
|
|
1112
1112
|
organizationId: string;
|
|
1113
|
-
role: "
|
|
1113
|
+
role: "owner" | "admin" | "member";
|
|
1114
1114
|
createdAt: Date;
|
|
1115
1115
|
userId: string;
|
|
1116
1116
|
user: {
|
|
@@ -1124,7 +1124,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1124
1124
|
id: string;
|
|
1125
1125
|
organizationId: string;
|
|
1126
1126
|
email: string;
|
|
1127
|
-
role: "
|
|
1127
|
+
role: "owner" | "admin" | "member";
|
|
1128
1128
|
status: better_auth_plugins0.InvitationStatus;
|
|
1129
1129
|
inviterId: string;
|
|
1130
1130
|
expiresAt: Date;
|
|
@@ -1203,25 +1203,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
|
|
|
1203
1203
|
ac: better_auth_plugins0.AccessControl;
|
|
1204
1204
|
roles: {
|
|
1205
1205
|
member: {
|
|
1206
|
-
authorize<K_1 extends "organization" | "
|
|
1207
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
1206
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1207
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
1208
1208
|
connector: "OR" | "AND";
|
|
1209
1209
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1210
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
1210
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1211
1211
|
};
|
|
1212
1212
|
admin: {
|
|
1213
|
-
authorize<K_1 extends "organization" | "
|
|
1214
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
1213
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1214
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
1215
1215
|
connector: "OR" | "AND";
|
|
1216
1216
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1217
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
1217
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1218
1218
|
};
|
|
1219
1219
|
owner: {
|
|
1220
|
-
authorize<K_1 extends "organization" | "
|
|
1221
|
-
actions: better_auth_plugins0.Subset<"organization" | "
|
|
1220
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
|
|
1221
|
+
actions: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>[key];
|
|
1222
1222
|
connector: "OR" | "AND";
|
|
1223
1223
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
|
|
1224
|
-
statements: better_auth_plugins0.Subset<"organization" | "
|
|
1224
|
+
statements: better_auth_plugins0.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins0.Statements>;
|
|
1225
1225
|
};
|
|
1226
1226
|
};
|
|
1227
1227
|
creatorRole: "admin";
|
|
@@ -5,25 +5,25 @@ import { organizationClient } from "better-auth/client/plugins";
|
|
|
5
5
|
//#region src/auth/permissions.d.ts
|
|
6
6
|
declare const ac: AccessControl;
|
|
7
7
|
declare const memberRole: {
|
|
8
|
-
authorize<K_1 extends "organization" | "
|
|
9
|
-
actions: better_auth_plugins69.Subset<"organization" | "
|
|
8
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
|
|
9
|
+
actions: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
|
|
10
10
|
connector: "OR" | "AND";
|
|
11
11
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
12
|
-
statements: better_auth_plugins69.Subset<"organization" | "
|
|
12
|
+
statements: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
|
|
13
13
|
};
|
|
14
14
|
declare const adminRole: {
|
|
15
|
-
authorize<K_1 extends "organization" | "
|
|
16
|
-
actions: better_auth_plugins69.Subset<"organization" | "
|
|
15
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
|
|
16
|
+
actions: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
|
|
17
17
|
connector: "OR" | "AND";
|
|
18
18
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
19
|
-
statements: better_auth_plugins69.Subset<"organization" | "
|
|
19
|
+
statements: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
|
|
20
20
|
};
|
|
21
21
|
declare const ownerRole: {
|
|
22
|
-
authorize<K_1 extends "organization" | "
|
|
23
|
-
actions: better_auth_plugins69.Subset<"organization" | "
|
|
22
|
+
authorize<K_1 extends "organization" | "project" | "member" | "invitation" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key] | {
|
|
23
|
+
actions: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>[key];
|
|
24
24
|
connector: "OR" | "AND";
|
|
25
25
|
} | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins69.AuthorizeResponse;
|
|
26
|
-
statements: better_auth_plugins69.Subset<"organization" | "
|
|
26
|
+
statements: better_auth_plugins69.Subset<"organization" | "project" | "member" | "invitation" | "ac" | "team", better_auth_plugins69.Statements>;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ac, adminRole, memberRole, organizationClient, ownerRole };
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -19,9 +19,8 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
19
19
|
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
20
20
|
id: z.ZodString;
|
|
21
21
|
name: z.ZodString;
|
|
22
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
23
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
24
22
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
conversationHistoryConfig: z.ZodOptional<z.ZodNullable<z.ZodType<ConversationHistoryConfig, ConversationHistoryConfig, z.core.$ZodTypeInternals<ConversationHistoryConfig, ConversationHistoryConfig>>>>;
|
|
25
24
|
models: z.ZodOptional<z.ZodObject<{
|
|
26
25
|
base: z.ZodOptional<z.ZodObject<{
|
|
27
26
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -45,7 +44,8 @@ declare const FullAgentDefinitionSchema: z.ZodObject<{
|
|
|
45
44
|
}, {
|
|
46
45
|
stepCountIs?: number | undefined;
|
|
47
46
|
}>>>>;
|
|
48
|
-
|
|
47
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
48
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
49
49
|
type: z.ZodLiteral<"internal">;
|
|
50
50
|
canUse: z.ZodArray<z.ZodObject<{
|
|
51
51
|
agentToolRelationId: z.ZodOptional<z.ZodString>;
|
|
@@ -10,11 +10,11 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
13
|
description: string | null;
|
|
14
|
+
defaultSubAgentId: string | null;
|
|
16
15
|
tenantId: string;
|
|
17
16
|
projectId: string;
|
|
17
|
+
prompt: string | null;
|
|
18
18
|
models: {
|
|
19
19
|
base?: {
|
|
20
20
|
model?: string | undefined;
|
|
@@ -32,8 +32,8 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
32
32
|
stopWhen: {
|
|
33
33
|
transferCountIs?: number | undefined;
|
|
34
34
|
} | null;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
37
|
contextConfigId: string | null;
|
|
38
38
|
statusUpdates: {
|
|
39
39
|
enabled?: boolean | undefined;
|
|
@@ -56,11 +56,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
56
56
|
}) => Promise<{
|
|
57
57
|
id: string;
|
|
58
58
|
name: string;
|
|
59
|
-
createdAt: string;
|
|
60
|
-
updatedAt: string;
|
|
61
59
|
description: string | null;
|
|
60
|
+
defaultSubAgentId: string | null;
|
|
62
61
|
tenantId: string;
|
|
63
62
|
projectId: string;
|
|
63
|
+
prompt: string | null;
|
|
64
64
|
models: {
|
|
65
65
|
base?: {
|
|
66
66
|
model?: string | undefined;
|
|
@@ -78,8 +78,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
78
78
|
stopWhen: {
|
|
79
79
|
transferCountIs?: number | undefined;
|
|
80
80
|
} | null;
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
createdAt: string;
|
|
82
|
+
updatedAt: string;
|
|
83
83
|
contextConfigId: string | null;
|
|
84
84
|
statusUpdates: {
|
|
85
85
|
enabled?: boolean | undefined;
|
|
@@ -99,11 +99,12 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
99
99
|
defaultSubAgent: {
|
|
100
100
|
id: string;
|
|
101
101
|
name: string;
|
|
102
|
-
createdAt: string;
|
|
103
|
-
updatedAt: string;
|
|
104
102
|
description: string | null;
|
|
105
103
|
tenantId: string;
|
|
106
104
|
projectId: string;
|
|
105
|
+
agentId: string;
|
|
106
|
+
prompt: string | null;
|
|
107
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
107
108
|
models: {
|
|
108
109
|
base?: {
|
|
109
110
|
model?: string | undefined;
|
|
@@ -121,9 +122,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
121
122
|
stopWhen: {
|
|
122
123
|
stepCountIs?: number | undefined;
|
|
123
124
|
} | null;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
agentId: string;
|
|
125
|
+
createdAt: string;
|
|
126
|
+
updatedAt: string;
|
|
127
127
|
} | null;
|
|
128
128
|
} | null>;
|
|
129
129
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -131,11 +131,11 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
131
131
|
}) => Promise<{
|
|
132
132
|
id: string;
|
|
133
133
|
name: string;
|
|
134
|
-
createdAt: string;
|
|
135
|
-
updatedAt: string;
|
|
136
134
|
description: string | null;
|
|
135
|
+
defaultSubAgentId: string | null;
|
|
137
136
|
tenantId: string;
|
|
138
137
|
projectId: string;
|
|
138
|
+
prompt: string | null;
|
|
139
139
|
models: {
|
|
140
140
|
base?: {
|
|
141
141
|
model?: string | undefined;
|
|
@@ -153,8 +153,8 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
153
153
|
stopWhen: {
|
|
154
154
|
transferCountIs?: number | undefined;
|
|
155
155
|
} | null;
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
createdAt: string;
|
|
157
|
+
updatedAt: string;
|
|
158
158
|
contextConfigId: string | null;
|
|
159
159
|
statusUpdates: {
|
|
160
160
|
enabled?: boolean | undefined;
|
|
@@ -247,11 +247,11 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
247
247
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
248
248
|
id: string;
|
|
249
249
|
name: string;
|
|
250
|
-
createdAt: string;
|
|
251
|
-
updatedAt: string;
|
|
252
250
|
description: string | null;
|
|
251
|
+
defaultSubAgentId: string | null;
|
|
253
252
|
tenantId: string;
|
|
254
253
|
projectId: string;
|
|
254
|
+
prompt: string | null;
|
|
255
255
|
models: {
|
|
256
256
|
base?: {
|
|
257
257
|
model?: string | undefined;
|
|
@@ -269,8 +269,8 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
269
269
|
stopWhen: {
|
|
270
270
|
transferCountIs?: number | undefined;
|
|
271
271
|
} | null;
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
createdAt: string;
|
|
273
|
+
updatedAt: string;
|
|
274
274
|
contextConfigId: string | null;
|
|
275
275
|
statusUpdates: {
|
|
276
276
|
enabled?: boolean | undefined;
|
|
@@ -10,11 +10,11 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
13
|
description: string | null;
|
|
16
14
|
tenantId: string;
|
|
17
15
|
projectId: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
18
|
props: {
|
|
19
19
|
[x: string]: unknown;
|
|
20
20
|
type: "object";
|
|
@@ -66,11 +66,11 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
66
66
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
67
67
|
id: string;
|
|
68
68
|
name: string;
|
|
69
|
-
createdAt: string;
|
|
70
|
-
updatedAt: string;
|
|
71
69
|
description: string | null;
|
|
72
70
|
tenantId: string;
|
|
73
71
|
projectId: string;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
updatedAt: string;
|
|
74
74
|
props: {
|
|
75
75
|
[x: string]: unknown;
|
|
76
76
|
type: "object";
|
|
@@ -141,11 +141,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
141
141
|
artifactComponentId: string;
|
|
142
142
|
}) => Promise<{
|
|
143
143
|
id: string;
|
|
144
|
-
createdAt: string;
|
|
145
144
|
tenantId: string;
|
|
146
145
|
projectId: string;
|
|
147
|
-
subAgentId: string;
|
|
148
146
|
agentId: string;
|
|
147
|
+
createdAt: string;
|
|
148
|
+
subAgentId: string;
|
|
149
149
|
artifactComponentId: string;
|
|
150
150
|
}>;
|
|
151
151
|
declare const removeArtifactComponentFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -184,11 +184,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
184
184
|
artifactComponentId: string;
|
|
185
185
|
}) => Promise<{
|
|
186
186
|
id: string;
|
|
187
|
-
createdAt: string;
|
|
188
187
|
tenantId: string;
|
|
189
188
|
projectId: string;
|
|
190
|
-
subAgentId: string;
|
|
191
189
|
agentId: string;
|
|
190
|
+
createdAt: string;
|
|
191
|
+
subAgentId: string;
|
|
192
192
|
artifactComponentId: string;
|
|
193
193
|
} | null>;
|
|
194
194
|
/**
|
|
@@ -9,11 +9,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
updatedAt: string;
|
|
14
12
|
tenantId: string;
|
|
15
13
|
projectId: string;
|
|
16
14
|
agentId: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
17
|
headersSchema: unknown;
|
|
18
18
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
19
19
|
} | undefined>;
|
|
@@ -21,11 +21,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
|
-
createdAt: string;
|
|
25
|
-
updatedAt: string;
|
|
26
24
|
tenantId: string;
|
|
27
25
|
projectId: string;
|
|
28
26
|
agentId: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
29
|
headersSchema: unknown;
|
|
30
30
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
31
31
|
}[]>;
|
|
@@ -43,11 +43,11 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
43
43
|
}>;
|
|
44
44
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
45
45
|
id: string;
|
|
46
|
-
createdAt: string;
|
|
47
|
-
updatedAt: string;
|
|
48
46
|
tenantId: string;
|
|
49
47
|
projectId: string;
|
|
50
48
|
agentId: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
51
|
headersSchema: unknown;
|
|
52
52
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
53
53
|
}>;
|
|
@@ -83,11 +83,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
83
83
|
data: ContextConfigInsert;
|
|
84
84
|
}) => Promise<{
|
|
85
85
|
id: string;
|
|
86
|
-
createdAt: string;
|
|
87
|
-
updatedAt: string;
|
|
88
86
|
tenantId: string;
|
|
89
87
|
projectId: string;
|
|
90
88
|
agentId: string;
|
|
89
|
+
createdAt: string;
|
|
90
|
+
updatedAt: string;
|
|
91
91
|
headersSchema: unknown;
|
|
92
92
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
93
93
|
}>;
|
|
@@ -65,11 +65,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
67
67
|
id: string;
|
|
68
|
-
createdAt: string;
|
|
69
68
|
tenantId: string;
|
|
70
69
|
projectId: string;
|
|
71
|
-
subAgentId: string;
|
|
72
70
|
agentId: string;
|
|
71
|
+
createdAt: string;
|
|
72
|
+
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
75
75
|
/**
|
|
@@ -107,11 +107,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
109
109
|
id: string;
|
|
110
|
-
createdAt: string;
|
|
111
110
|
tenantId: string;
|
|
112
111
|
projectId: string;
|
|
113
|
-
subAgentId: string;
|
|
114
112
|
agentId: string;
|
|
113
|
+
createdAt: string;
|
|
114
|
+
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
117
117
|
/**
|
|
@@ -55,12 +55,12 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
55
55
|
}) => Promise<{
|
|
56
56
|
id: string;
|
|
57
57
|
name: string;
|
|
58
|
-
createdAt: string;
|
|
59
|
-
updatedAt: string;
|
|
60
58
|
description: string | null;
|
|
61
59
|
tenantId: string;
|
|
62
60
|
projectId: string;
|
|
63
61
|
agentId: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -97,12 +97,12 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
97
97
|
}) => Promise<{
|
|
98
98
|
id: string;
|
|
99
99
|
name: string;
|
|
100
|
-
createdAt: string;
|
|
101
|
-
updatedAt: string;
|
|
102
100
|
description: string | null;
|
|
103
101
|
tenantId: string;
|
|
104
102
|
projectId: string;
|
|
105
103
|
agentId: string;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
updatedAt: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -162,16 +162,16 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
162
162
|
}> | null;
|
|
163
163
|
}) => Promise<{
|
|
164
164
|
id: string;
|
|
165
|
-
createdAt: string;
|
|
166
|
-
updatedAt: string;
|
|
167
165
|
tenantId: string;
|
|
168
166
|
projectId: string;
|
|
169
|
-
subAgentId: string;
|
|
170
167
|
agentId: string;
|
|
171
|
-
|
|
168
|
+
createdAt: string;
|
|
169
|
+
updatedAt: string;
|
|
172
170
|
toolPolicies: Record<string, {
|
|
173
171
|
needsApproval?: boolean;
|
|
174
172
|
}> | null;
|
|
173
|
+
subAgentId: string;
|
|
174
|
+
functionToolId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -227,16 +227,16 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
227
227
|
}> | null;
|
|
228
228
|
}) => Promise<{
|
|
229
229
|
id: string;
|
|
230
|
-
createdAt: string;
|
|
231
|
-
updatedAt: string;
|
|
232
230
|
tenantId: string;
|
|
233
231
|
projectId: string;
|
|
234
|
-
subAgentId: string;
|
|
235
232
|
agentId: string;
|
|
236
|
-
|
|
233
|
+
createdAt: string;
|
|
234
|
+
updatedAt: string;
|
|
237
235
|
toolPolicies: Record<string, {
|
|
238
236
|
needsApproval?: boolean;
|
|
239
237
|
}> | null;
|
|
238
|
+
subAgentId: string;
|
|
239
|
+
functionToolId: string;
|
|
240
240
|
}>;
|
|
241
241
|
//#endregion
|
|
242
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AgentScopeConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../types/utility.js";
|
|
2
|
+
import * as drizzle_orm0 from "drizzle-orm";
|
|
3
|
+
|
|
4
|
+
//#region src/data-access/manage/scope-helpers.d.ts
|
|
5
|
+
type TenantScopeConfig = {
|
|
6
|
+
tenantId: string;
|
|
7
|
+
};
|
|
8
|
+
type TenantScopedColumns = {
|
|
9
|
+
tenantId: any;
|
|
10
|
+
};
|
|
11
|
+
type ProjectScopedColumns = TenantScopedColumns & {
|
|
12
|
+
projectId: any;
|
|
13
|
+
};
|
|
14
|
+
type AgentScopedColumns = ProjectScopedColumns & {
|
|
15
|
+
agentId: any;
|
|
16
|
+
};
|
|
17
|
+
type SubAgentScopedColumns = AgentScopedColumns & {
|
|
18
|
+
subAgentId: any;
|
|
19
|
+
};
|
|
20
|
+
declare function tenantScopedWhere<T extends TenantScopedColumns>(table: T, scopes: TenantScopeConfig): drizzle_orm0.SQL<unknown>;
|
|
21
|
+
declare function projectScopedWhere<T extends ProjectScopedColumns>(table: T, scopes: ProjectScopeConfig): drizzle_orm0.SQL<unknown> | undefined;
|
|
22
|
+
declare function agentScopedWhere<T extends AgentScopedColumns>(table: T, scopes: AgentScopeConfig): drizzle_orm0.SQL<unknown> | undefined;
|
|
23
|
+
declare function subAgentScopedWhere<T extends SubAgentScopedColumns>(table: T, scopes: SubAgentScopeConfig): drizzle_orm0.SQL<unknown> | undefined;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { agentScopedWhere, projectScopedWhere, subAgentScopedWhere, tenantScopedWhere };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { and, eq } from "drizzle-orm";
|
|
2
|
+
|
|
3
|
+
//#region src/data-access/manage/scope-helpers.ts
|
|
4
|
+
function tenantScopedWhere(table, scopes) {
|
|
5
|
+
return eq(table.tenantId, scopes.tenantId);
|
|
6
|
+
}
|
|
7
|
+
function projectScopedWhere(table, scopes) {
|
|
8
|
+
return and(eq(table.tenantId, scopes.tenantId), eq(table.projectId, scopes.projectId));
|
|
9
|
+
}
|
|
10
|
+
function agentScopedWhere(table, scopes) {
|
|
11
|
+
return and(eq(table.tenantId, scopes.tenantId), eq(table.projectId, scopes.projectId), eq(table.agentId, scopes.agentId));
|
|
12
|
+
}
|
|
13
|
+
function subAgentScopedWhere(table, scopes) {
|
|
14
|
+
return and(eq(table.tenantId, scopes.tenantId), eq(table.projectId, scopes.projectId), eq(table.agentId, scopes.agentId), eq(table.subAgentId, scopes.subAgentId));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { agentScopedWhere, projectScopedWhere, subAgentScopedWhere, tenantScopedWhere };
|