@inkeep/agents-core 0.55.0 → 0.55.2

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.
Files changed (32) hide show
  1. package/dist/auth/auth-schema.d.ts +85 -85
  2. package/dist/auth/auth-validation-schemas.d.ts +152 -152
  3. package/dist/auth/auth.d.ts +54 -29
  4. package/dist/auth/auth.js +45 -3
  5. package/dist/auth/email-send-status-store.d.ts +10 -0
  6. package/dist/auth/email-send-status-store.js +20 -0
  7. package/dist/auth/permissions.d.ts +13 -13
  8. package/dist/data-access/manage/agents.d.ts +21 -21
  9. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  10. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  11. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  12. package/dist/data-access/manage/functionTools.d.ts +12 -12
  13. package/dist/data-access/manage/skills.d.ts +13 -13
  14. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  15. package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
  16. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  17. package/dist/data-access/manage/subAgents.d.ts +15 -15
  18. package/dist/data-access/manage/tools.d.ts +18 -18
  19. package/dist/data-access/manage/triggers.d.ts +2 -2
  20. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  21. package/dist/data-access/runtime/conversations.d.ts +24 -24
  22. package/dist/data-access/runtime/messages.d.ts +9 -9
  23. package/dist/data-access/runtime/tasks.d.ts +7 -7
  24. package/dist/db/manage/manage-schema.d.ts +4 -4
  25. package/dist/index.d.ts +2 -1
  26. package/dist/index.js +2 -1
  27. package/dist/middleware/inherited-auth.d.ts +2 -2
  28. package/dist/middleware/inherited-auth.js +3 -3
  29. package/dist/utils/error.d.ts +51 -51
  30. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  31. package/dist/validation/schemas.d.ts +1843 -1843
  32. package/package.json +1 -1
@@ -4,7 +4,7 @@ import * as zod0 from "zod";
4
4
  import * as better_auth0 from "better-auth";
5
5
  import { BetterAuthAdvancedOptions } from "better-auth";
6
6
  import * as _better_auth_sso0 from "@better-auth/sso";
7
- import * as better_auth_plugins20 from "better-auth/plugins";
7
+ import * as better_auth_plugins0 from "better-auth/plugins";
8
8
  import { GoogleOptions } from "better-auth/social-providers";
9
9
 
10
10
  //#region src/auth/auth.d.ts
@@ -54,6 +54,29 @@ interface SSOProviderConfig {
54
54
  oidcConfig?: OIDCProviderConfig;
55
55
  samlConfig?: SAMLProviderConfig;
56
56
  }
57
+ interface EmailServiceConfig {
58
+ sendInvitationEmail(data: {
59
+ to: string;
60
+ inviterName: string;
61
+ organizationName: string;
62
+ role: string;
63
+ invitationUrl: string;
64
+ authMethod?: string;
65
+ expiresInDays?: number;
66
+ }): Promise<{
67
+ emailSent: boolean;
68
+ error?: string;
69
+ }>;
70
+ sendPasswordResetEmail(data: {
71
+ to: string;
72
+ resetUrl: string;
73
+ expiresInMinutes?: number;
74
+ }): Promise<{
75
+ emailSent: boolean;
76
+ error?: string;
77
+ }>;
78
+ isConfigured: boolean;
79
+ }
57
80
  interface BetterAuthConfig {
58
81
  baseURL: string;
59
82
  secret: string;
@@ -65,6 +88,7 @@ interface BetterAuthConfig {
65
88
  google?: GoogleOptions;
66
89
  };
67
90
  advanced?: BetterAuthAdvancedOptions;
91
+ emailService?: EmailServiceConfig;
68
92
  }
69
93
  interface UserAuthConfig {
70
94
  ssoProviders?: SSOProviderConfig[];
@@ -90,6 +114,7 @@ interface UserAuthConfig {
90
114
  * - Any *.inkeep.com URL -> .inkeep.com
91
115
  */
92
116
  declare function extractCookieDomain(baseURL: string, explicitDomain?: string): string | undefined;
117
+ declare function hasCredentialAccount(dbClient: AgentsRunDatabaseClient, userId: string): Promise<boolean>;
93
118
  declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
94
119
  baseURL: string;
95
120
  secret: string;
@@ -252,7 +277,7 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
252
277
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
253
278
  }[];
254
279
  };
255
- options: better_auth_plugins20.BearerOptions | undefined;
280
+ options: better_auth_plugins0.BearerOptions | undefined;
256
281
  }, {
257
282
  id: "sso";
258
283
  endpoints: {
@@ -1243,30 +1268,30 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1243
1268
  handler: (inputContext: better_auth0.MiddlewareInputContext<better_auth0.MiddlewareOptions>) => Promise<void>;
1244
1269
  }[];
1245
1270
  };
1246
- }, better_auth_plugins20.DefaultOrganizationPlugin<{
1271
+ }, better_auth_plugins0.DefaultOrganizationPlugin<{
1247
1272
  allowUserToCreateOrganization: true;
1248
- ac: better_auth_plugins20.AccessControl;
1273
+ ac: better_auth_plugins0.AccessControl;
1249
1274
  roles: {
1250
1275
  member: {
1251
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1252
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1276
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1277
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1253
1278
  connector: "OR" | "AND";
1254
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1255
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1279
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1280
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1256
1281
  };
1257
1282
  admin: {
1258
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1259
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1283
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1284
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1260
1285
  connector: "OR" | "AND";
1261
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1262
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1286
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1287
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1263
1288
  };
1264
1289
  owner: {
1265
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key] | {
1266
- actions: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>[key];
1290
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key] | {
1291
+ actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>[key];
1267
1292
  connector: "OR" | "AND";
1268
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins20.AuthorizeResponse;
1269
- statements: better_auth_plugins20.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins20.Statements>;
1293
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1294
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1270
1295
  };
1271
1296
  };
1272
1297
  creatorRole: "admin";
@@ -1277,9 +1302,9 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1277
1302
  id: string;
1278
1303
  role: string;
1279
1304
  email: string;
1280
- organization: better_auth_plugins20.Organization;
1281
- invitation: better_auth_plugins20.Invitation;
1282
- inviter: better_auth_plugins20.Member & {
1305
+ organization: better_auth_plugins0.Organization;
1306
+ invitation: better_auth_plugins0.Invitation;
1307
+ inviter: better_auth_plugins0.Member & {
1283
1308
  user: better_auth0.User;
1284
1309
  };
1285
1310
  }): Promise<void>;
@@ -1314,28 +1339,28 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1314
1339
  user,
1315
1340
  organization: org
1316
1341
  }: {
1317
- invitation: better_auth_plugins20.Invitation & Record<string, any>;
1318
- member: better_auth_plugins20.Member & Record<string, any>;
1342
+ invitation: better_auth_plugins0.Invitation & Record<string, any>;
1343
+ member: better_auth_plugins0.Member & Record<string, any>;
1319
1344
  user: better_auth0.User & Record<string, any>;
1320
- organization: better_auth_plugins20.Organization & Record<string, any>;
1345
+ organization: better_auth_plugins0.Organization & Record<string, any>;
1321
1346
  }) => Promise<void>;
1322
1347
  beforeUpdateMemberRole: ({
1323
1348
  member,
1324
1349
  organization: org,
1325
1350
  newRole
1326
1351
  }: {
1327
- member: better_auth_plugins20.Member & Record<string, any>;
1352
+ member: better_auth_plugins0.Member & Record<string, any>;
1328
1353
  newRole: string;
1329
1354
  user: better_auth0.User & Record<string, any>;
1330
- organization: better_auth_plugins20.Organization & Record<string, any>;
1355
+ organization: better_auth_plugins0.Organization & Record<string, any>;
1331
1356
  }) => Promise<void>;
1332
1357
  beforeRemoveMember: ({
1333
1358
  member,
1334
1359
  organization: org
1335
1360
  }: {
1336
- member: better_auth_plugins20.Member & Record<string, any>;
1361
+ member: better_auth_plugins0.Member & Record<string, any>;
1337
1362
  user: better_auth0.User & Record<string, any>;
1338
- organization: better_auth_plugins20.Organization & Record<string, any>;
1363
+ organization: better_auth_plugins0.Organization & Record<string, any>;
1339
1364
  }) => Promise<void>;
1340
1365
  };
1341
1366
  }>, {
@@ -1676,8 +1701,8 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1676
1701
  readonly AUTHENTICATION_REQUIRED: "Authentication required";
1677
1702
  };
1678
1703
  options: Partial<{
1679
- expiresIn: better_auth_plugins20.TimeString;
1680
- interval: better_auth_plugins20.TimeString;
1704
+ expiresIn: better_auth_plugins0.TimeString;
1705
+ interval: better_auth_plugins0.TimeString;
1681
1706
  deviceCodeLength: number;
1682
1707
  userCodeLength: number;
1683
1708
  schema: {
@@ -1706,4 +1731,4 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1706
1731
  }>;
1707
1732
  declare const auth: ReturnType<typeof createAuth>;
1708
1733
  //#endregion
1709
- export { BetterAuthConfig, OIDCProviderConfig, SAMLProviderConfig, SSOProviderConfig, UserAuthConfig, auth, createAuth, extractCookieDomain };
1734
+ export { BetterAuthConfig, EmailServiceConfig, OIDCProviderConfig, SAMLProviderConfig, SSOProviderConfig, UserAuthConfig, auth, createAuth, extractCookieDomain, hasCredentialAccount };
package/dist/auth/auth.js CHANGED
@@ -1,11 +1,12 @@
1
- import { member, ssoProvider } from "./auth-schema.js";
1
+ import { account, member, ssoProvider } from "./auth-schema.js";
2
2
  import { OrgRoles } from "./authz/types.js";
3
3
  import { env } from "../env.js";
4
+ import { setEmailSendStatus } from "./email-send-status-store.js";
4
5
  import { setPasswordResetLink } from "./password-reset-link-store.js";
5
6
  import { generateId as generateId$1 } from "../utils/conversations.js";
6
7
  import "../utils/index.js";
7
8
  import { ac, adminRole, memberRole, ownerRole } from "./permissions.js";
8
- import { eq } from "drizzle-orm";
9
+ import { and, eq } from "drizzle-orm";
9
10
  import { betterAuth } from "better-auth";
10
11
  import { sso } from "@better-auth/sso";
11
12
  import { drizzleAdapter } from "better-auth/adapters/drizzle";
@@ -71,6 +72,10 @@ async function registerSSOProvider(dbClient, provider) {
71
72
  console.error(`❌ Failed to register SSO provider '${provider.providerId}':`, error);
72
73
  }
73
74
  }
75
+ async function hasCredentialAccount(dbClient, userId) {
76
+ const [row] = await dbClient.select({ id: account.id }).from(account).where(and(eq(account.userId, userId), eq(account.providerId, "credential"))).limit(1);
77
+ return !!row;
78
+ }
74
79
  function createAuth(config) {
75
80
  const cookieDomain = extractCookieDomain(config.baseURL, config.cookieDomain);
76
81
  const isSecure = config.baseURL.startsWith("https://");
@@ -86,11 +91,20 @@ function createAuth(config) {
86
91
  autoSignIn: true,
87
92
  resetPasswordTokenExpiresIn: 1800,
88
93
  sendResetPassword: async ({ user, url, token }) => {
94
+ if (!await hasCredentialAccount(config.dbClient, user.id)) return;
89
95
  setPasswordResetLink({
90
96
  email: user.email,
91
97
  url,
92
98
  token
93
99
  });
100
+ if (config.emailService?.isConfigured) try {
101
+ await config.emailService.sendPasswordResetEmail({
102
+ to: user.email,
103
+ resetUrl: url
104
+ });
105
+ } catch (err) {
106
+ console.error("[email] Failed to send password reset email:", err);
107
+ }
94
108
  }
95
109
  },
96
110
  account: { accountLinking: {
@@ -169,6 +183,34 @@ function createAuth(config) {
169
183
  organization: data.organization.name,
170
184
  invitationId: data.id
171
185
  });
186
+ if (config.emailService?.isConfigured) try {
187
+ const invitationUrl = `${env.INKEEP_AGENTS_MANAGE_UI_URL || "http://localhost:3000"}/accept-invitation/${data.id}?email=${encodeURIComponent(data.email)}`;
188
+ const result = await config.emailService.sendInvitationEmail({
189
+ to: data.email,
190
+ inviterName: data.inviter.user.name || data.inviter.user.email,
191
+ organizationName: data.organization.name,
192
+ role: data.role,
193
+ invitationUrl,
194
+ authMethod: data.invitation?.authMethod
195
+ });
196
+ setEmailSendStatus(data.id, {
197
+ emailSent: result.emailSent,
198
+ error: result.error,
199
+ organizationId: data.organization.id
200
+ });
201
+ } catch (err) {
202
+ const message = err instanceof Error ? err.message : String(err);
203
+ console.error(`[email] Failed to send invitation email to ${data.email}:`, message);
204
+ setEmailSendStatus(data.id, {
205
+ emailSent: false,
206
+ error: message,
207
+ organizationId: data.organization.id
208
+ });
209
+ }
210
+ else setEmailSendStatus(data.id, {
211
+ emailSent: false,
212
+ organizationId: data.organization.id
213
+ });
172
214
  },
173
215
  schema: {
174
216
  invitation: { additionalFields: { authMethod: {
@@ -266,4 +308,4 @@ function createAuth(config) {
266
308
  const auth = null;
267
309
 
268
310
  //#endregion
269
- export { auth, createAuth, extractCookieDomain };
311
+ export { auth, createAuth, extractCookieDomain, hasCredentialAccount };
@@ -0,0 +1,10 @@
1
+ //#region src/auth/email-send-status-store.d.ts
2
+ type EmailSendStatus = {
3
+ emailSent: boolean;
4
+ error?: string;
5
+ organizationId?: string;
6
+ };
7
+ declare function setEmailSendStatus(id: string, status: EmailSendStatus, ttlMs?: number): void;
8
+ declare function getEmailSendStatus(id: string): EmailSendStatus | null;
9
+ //#endregion
10
+ export { getEmailSendStatus, setEmailSendStatus };
@@ -0,0 +1,20 @@
1
+ //#region src/auth/email-send-status-store.ts
2
+ const DEFAULT_TTL_MS = 300 * 1e3;
3
+ const store = /* @__PURE__ */ new Map();
4
+ const timers = /* @__PURE__ */ new Map();
5
+ function setEmailSendStatus(id, status, ttlMs = DEFAULT_TTL_MS) {
6
+ const existingTimer = timers.get(id);
7
+ if (existingTimer) clearTimeout(existingTimer);
8
+ store.set(id, status);
9
+ const timer = setTimeout(() => {
10
+ store.delete(id);
11
+ timers.delete(id);
12
+ }, ttlMs);
13
+ timers.set(id, timer);
14
+ }
15
+ function getEmailSendStatus(id) {
16
+ return store.get(id) ?? null;
17
+ }
18
+
19
+ //#endregion
20
+ export { getEmailSendStatus, setEmailSendStatus };
@@ -1,29 +1,29 @@
1
- import * as better_auth_plugins0 from "better-auth/plugins";
1
+ import * as better_auth_plugins35 from "better-auth/plugins";
2
2
  import { AccessControl } from "better-auth/plugins/access";
3
3
  import { organizationClient } from "better-auth/client/plugins";
4
4
 
5
5
  //#region src/auth/permissions.d.ts
6
6
  declare const ac: AccessControl;
7
7
  declare const memberRole: {
8
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
9
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
8
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>[key] | {
9
+ actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>[key];
10
10
  connector: "OR" | "AND";
11
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
12
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
11
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
12
+ statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>;
13
13
  };
14
14
  declare const adminRole: {
15
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
16
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
15
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>[key] | {
16
+ actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>[key];
17
17
  connector: "OR" | "AND";
18
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
19
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
18
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
19
+ statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>;
20
20
  };
21
21
  declare const ownerRole: {
22
- authorize<K_1 extends "project" | "organization" | "team" | "member" | "ac" | "invitation">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key] | {
23
- actions: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>[key];
22
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "ac" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>[key] | {
23
+ actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>[key];
24
24
  connector: "OR" | "AND";
25
- } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
26
- statements: better_auth_plugins0.Subset<"project" | "organization" | "team" | "member" | "ac" | "invitation", better_auth_plugins0.Statements>;
25
+ } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
26
+ statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins35.Statements>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -11,11 +11,11 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
11
11
  }) => Promise<{
12
12
  id: string;
13
13
  name: string;
14
+ createdAt: string;
15
+ updatedAt: string;
14
16
  description: string | null;
15
- defaultSubAgentId: string | null;
16
17
  tenantId: string;
17
18
  projectId: string;
18
- prompt: string | null;
19
19
  models: {
20
20
  base?: {
21
21
  model?: string | undefined;
@@ -33,8 +33,8 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
33
33
  stopWhen: {
34
34
  transferCountIs?: number | undefined;
35
35
  } | null;
36
- createdAt: string;
37
- updatedAt: string;
36
+ prompt: string | null;
37
+ defaultSubAgentId: string | null;
38
38
  contextConfigId: string | null;
39
39
  statusUpdates: {
40
40
  enabled?: boolean | undefined;
@@ -57,11 +57,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
57
57
  }) => Promise<{
58
58
  id: string;
59
59
  name: string;
60
+ createdAt: string;
61
+ updatedAt: string;
60
62
  description: string | null;
61
- defaultSubAgentId: string | null;
62
63
  tenantId: string;
63
64
  projectId: string;
64
- prompt: string | null;
65
65
  models: {
66
66
  base?: {
67
67
  model?: string | undefined;
@@ -79,8 +79,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
79
79
  stopWhen: {
80
80
  transferCountIs?: number | undefined;
81
81
  } | null;
82
- createdAt: string;
83
- updatedAt: string;
82
+ prompt: string | null;
83
+ defaultSubAgentId: string | null;
84
84
  contextConfigId: string | null;
85
85
  statusUpdates: {
86
86
  enabled?: boolean | undefined;
@@ -100,12 +100,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
100
100
  defaultSubAgent: {
101
101
  id: string;
102
102
  name: string;
103
+ createdAt: string;
104
+ updatedAt: string;
103
105
  description: string | null;
104
106
  tenantId: string;
105
107
  projectId: string;
106
- agentId: string;
107
- prompt: string | null;
108
- conversationHistoryConfig: ConversationHistoryConfig | null;
109
108
  models: {
110
109
  base?: {
111
110
  model?: string | undefined;
@@ -123,8 +122,9 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
123
122
  stopWhen: {
124
123
  stepCountIs?: number | undefined;
125
124
  } | null;
126
- createdAt: string;
127
- updatedAt: string;
125
+ agentId: string;
126
+ prompt: string | null;
127
+ conversationHistoryConfig: ConversationHistoryConfig | null;
128
128
  } | null;
129
129
  } | null>;
130
130
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
@@ -132,11 +132,11 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
132
132
  }) => Promise<{
133
133
  id: string;
134
134
  name: string;
135
+ createdAt: string;
136
+ updatedAt: string;
135
137
  description: string | null;
136
- defaultSubAgentId: string | null;
137
138
  tenantId: string;
138
139
  projectId: string;
139
- prompt: string | null;
140
140
  models: {
141
141
  base?: {
142
142
  model?: string | undefined;
@@ -154,8 +154,8 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
154
154
  stopWhen: {
155
155
  transferCountIs?: number | undefined;
156
156
  } | null;
157
- createdAt: string;
158
- updatedAt: string;
157
+ prompt: string | null;
158
+ defaultSubAgentId: string | null;
159
159
  contextConfigId: string | null;
160
160
  statusUpdates: {
161
161
  enabled?: boolean | undefined;
@@ -248,11 +248,11 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
248
248
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
249
249
  id: string;
250
250
  name: string;
251
+ createdAt: string;
252
+ updatedAt: string;
251
253
  description: string | null;
252
- defaultSubAgentId: string | null;
253
254
  tenantId: string;
254
255
  projectId: string;
255
- prompt: string | null;
256
256
  models: {
257
257
  base?: {
258
258
  model?: string | undefined;
@@ -270,8 +270,8 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
270
270
  stopWhen: {
271
271
  transferCountIs?: number | undefined;
272
272
  } | null;
273
- createdAt: string;
274
- updatedAt: string;
273
+ prompt: string | null;
274
+ defaultSubAgentId: string | null;
275
275
  contextConfigId: string | null;
276
276
  statusUpdates: {
277
277
  enabled?: boolean | undefined;
@@ -11,11 +11,11 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
11
11
  }) => Promise<{
12
12
  id: string;
13
13
  name: string;
14
+ createdAt: string;
15
+ updatedAt: string;
14
16
  description: string | null;
15
17
  tenantId: string;
16
18
  projectId: string;
17
- createdAt: string;
18
- updatedAt: string;
19
19
  props: {
20
20
  [x: string]: unknown;
21
21
  type: "object";
@@ -67,11 +67,11 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
67
67
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
68
68
  id: string;
69
69
  name: string;
70
+ createdAt: string;
71
+ updatedAt: string;
70
72
  description: string | null;
71
73
  tenantId: string;
72
74
  projectId: string;
73
- createdAt: string;
74
- updatedAt: string;
75
75
  props: {
76
76
  [x: string]: unknown;
77
77
  type: "object";
@@ -142,10 +142,10 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
142
142
  artifactComponentId: string;
143
143
  }) => Promise<{
144
144
  id: string;
145
+ createdAt: string;
145
146
  tenantId: string;
146
147
  projectId: string;
147
148
  agentId: string;
148
- createdAt: string;
149
149
  subAgentId: string;
150
150
  artifactComponentId: string;
151
151
  }>;
@@ -185,10 +185,10 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
185
185
  artifactComponentId: string;
186
186
  }) => Promise<{
187
187
  id: string;
188
+ createdAt: string;
188
189
  tenantId: string;
189
190
  projectId: string;
190
191
  agentId: string;
191
- createdAt: string;
192
192
  subAgentId: string;
193
193
  artifactComponentId: string;
194
194
  } | null>;
@@ -10,11 +10,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
10
10
  id: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
+ createdAt: string;
14
+ updatedAt: string;
13
15
  tenantId: string;
14
16
  projectId: string;
15
17
  agentId: string;
16
- createdAt: string;
17
- updatedAt: string;
18
18
  headersSchema: unknown;
19
19
  contextVariables: Record<string, ContextFetchDefinition> | null;
20
20
  } | undefined>;
@@ -22,11 +22,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
22
22
  scopes: AgentScopeConfig;
23
23
  }) => Promise<{
24
24
  id: string;
25
+ createdAt: string;
26
+ updatedAt: string;
25
27
  tenantId: string;
26
28
  projectId: string;
27
29
  agentId: string;
28
- createdAt: string;
29
- updatedAt: string;
30
30
  headersSchema: unknown;
31
31
  contextVariables: Record<string, ContextFetchDefinition> | null;
32
32
  }[]>;
@@ -44,11 +44,11 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
44
44
  }>;
45
45
  declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
46
46
  id: string;
47
+ createdAt: string;
48
+ updatedAt: string;
47
49
  tenantId: string;
48
50
  projectId: string;
49
51
  agentId: string;
50
- createdAt: string;
51
- updatedAt: string;
52
52
  headersSchema: unknown;
53
53
  contextVariables: Record<string, ContextFetchDefinition> | null;
54
54
  }>;
@@ -84,11 +84,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
84
84
  data: ContextConfigInsert;
85
85
  }) => Promise<{
86
86
  id: string;
87
+ createdAt: string;
88
+ updatedAt: string;
87
89
  tenantId: string;
88
90
  projectId: string;
89
91
  agentId: string;
90
- createdAt: string;
91
- updatedAt: string;
92
92
  headersSchema: unknown;
93
93
  contextVariables: Record<string, ContextFetchDefinition> | null;
94
94
  }>;
@@ -66,10 +66,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
66
66
  dataComponentId: string;
67
67
  }) => Promise<{
68
68
  id: string;
69
+ createdAt: string;
69
70
  tenantId: string;
70
71
  projectId: string;
71
72
  agentId: string;
72
- createdAt: string;
73
73
  subAgentId: string;
74
74
  dataComponentId: string;
75
75
  }>;
@@ -108,10 +108,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
108
108
  dataComponentId: string;
109
109
  }) => Promise<{
110
110
  id: string;
111
+ createdAt: string;
111
112
  tenantId: string;
112
113
  projectId: string;
113
114
  agentId: string;
114
- createdAt: string;
115
115
  subAgentId: string;
116
116
  dataComponentId: string;
117
117
  } | null>;