@inkeep/agents-core 0.55.1 → 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 (29) hide show
  1. package/dist/auth/auth.d.ts +35 -10
  2. package/dist/auth/auth.js +45 -3
  3. package/dist/auth/email-send-status-store.d.ts +10 -0
  4. package/dist/auth/email-send-status-store.js +20 -0
  5. package/dist/auth/permissions.d.ts +9 -9
  6. package/dist/data-access/manage/agents.d.ts +27 -27
  7. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  8. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  9. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  10. package/dist/data-access/manage/functionTools.d.ts +8 -8
  11. package/dist/data-access/manage/skills.d.ts +5 -5
  12. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  13. package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
  14. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  15. package/dist/data-access/manage/subAgents.d.ts +9 -9
  16. package/dist/data-access/manage/tools.d.ts +15 -15
  17. package/dist/data-access/manage/triggers.d.ts +1 -1
  18. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  19. package/dist/data-access/runtime/conversations.d.ts +15 -15
  20. package/dist/data-access/runtime/messages.d.ts +12 -12
  21. package/dist/data-access/runtime/tasks.d.ts +4 -4
  22. package/dist/db/manage/manage-schema.d.ts +2 -2
  23. package/dist/db/runtime/runtime-schema.d.ts +8 -8
  24. package/dist/index.d.ts +2 -1
  25. package/dist/index.js +2 -1
  26. package/dist/validation/dolt-schemas.d.ts +1 -1
  27. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  28. package/dist/validation/schemas.d.ts +356 -356
  29. package/package.json +1 -1
@@ -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;
@@ -1248,25 +1273,25 @@ declare function createAuth(config: BetterAuthConfig): better_auth0.Auth<{
1248
1273
  ac: better_auth_plugins0.AccessControl;
1249
1274
  roles: {
1250
1275
  member: {
1251
- authorize<K_1 extends "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1252
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.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
1279
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1255
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
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 "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1259
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.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
1286
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1262
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
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 "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>[key] | {
1266
- actions: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.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
1293
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins0.AuthorizeResponse;
1269
- statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins0.Statements>;
1294
+ statements: better_auth_plugins0.Subset<"organization" | "member" | "invitation" | "project" | "ac" | "team", better_auth_plugins0.Statements>;
1270
1295
  };
1271
1296
  };
1272
1297
  creatorRole: "admin";
@@ -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 };
@@ -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" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key] | {
9
- actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.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
11
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
12
- statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>;
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 "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key] | {
16
- actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.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
18
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
19
- statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>;
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 "organization" | "member" | "invitation" | "ac" | "project" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>[key] | {
23
- actions: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.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
25
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins35.AuthorizeResponse;
26
- statements: better_auth_plugins35.Subset<"organization" | "member" | "invitation" | "ac" | "project" | "team", better_auth_plugins35.Statements>;
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 };
@@ -14,10 +14,8 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  description: string | null;
17
- projectId: string;
18
17
  tenantId: string;
19
- defaultSubAgentId: string | null;
20
- contextConfigId: string | null;
18
+ projectId: string;
21
19
  models: {
22
20
  base?: {
23
21
  model?: string | undefined;
@@ -32,7 +30,12 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
32
30
  providerOptions?: Record<string, any> | undefined;
33
31
  } | undefined;
34
32
  } | null;
33
+ stopWhen: {
34
+ transferCountIs?: number | undefined;
35
+ } | null;
35
36
  prompt: string | null;
37
+ defaultSubAgentId: string | null;
38
+ contextConfigId: string | null;
36
39
  statusUpdates: {
37
40
  enabled?: boolean | undefined;
38
41
  numEvents?: number | undefined;
@@ -48,9 +51,6 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
48
51
  } | undefined;
49
52
  }[] | undefined;
50
53
  } | null;
51
- stopWhen: {
52
- transferCountIs?: number | undefined;
53
- } | null;
54
54
  } | null>;
55
55
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
56
56
  scopes: AgentScopeConfig;
@@ -60,10 +60,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
60
60
  createdAt: string;
61
61
  updatedAt: string;
62
62
  description: string | null;
63
- projectId: string;
64
63
  tenantId: string;
65
- defaultSubAgentId: string | null;
66
- contextConfigId: string | null;
64
+ projectId: string;
67
65
  models: {
68
66
  base?: {
69
67
  model?: string | undefined;
@@ -78,7 +76,12 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
78
76
  providerOptions?: Record<string, any> | undefined;
79
77
  } | undefined;
80
78
  } | null;
79
+ stopWhen: {
80
+ transferCountIs?: number | undefined;
81
+ } | null;
81
82
  prompt: string | null;
83
+ defaultSubAgentId: string | null;
84
+ contextConfigId: string | null;
82
85
  statusUpdates: {
83
86
  enabled?: boolean | undefined;
84
87
  numEvents?: number | undefined;
@@ -94,18 +97,14 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
94
97
  } | undefined;
95
98
  }[] | undefined;
96
99
  } | null;
97
- stopWhen: {
98
- transferCountIs?: number | undefined;
99
- } | null;
100
100
  defaultSubAgent: {
101
101
  id: string;
102
102
  name: string;
103
103
  createdAt: string;
104
104
  updatedAt: string;
105
105
  description: string | null;
106
- agentId: string;
107
- projectId: string;
108
106
  tenantId: string;
107
+ projectId: string;
109
108
  models: {
110
109
  base?: {
111
110
  model?: string | undefined;
@@ -120,10 +119,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
120
119
  providerOptions?: Record<string, any> | undefined;
121
120
  } | undefined;
122
121
  } | null;
123
- prompt: string | null;
124
122
  stopWhen: {
125
123
  stepCountIs?: number | undefined;
126
124
  } | null;
125
+ agentId: string;
126
+ prompt: string | null;
127
127
  conversationHistoryConfig: ConversationHistoryConfig | null;
128
128
  } | null;
129
129
  } | null>;
@@ -135,10 +135,8 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
135
135
  createdAt: string;
136
136
  updatedAt: string;
137
137
  description: string | null;
138
- projectId: string;
139
138
  tenantId: string;
140
- defaultSubAgentId: string | null;
141
- contextConfigId: string | null;
139
+ projectId: string;
142
140
  models: {
143
141
  base?: {
144
142
  model?: string | undefined;
@@ -153,7 +151,12 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
153
151
  providerOptions?: Record<string, any> | undefined;
154
152
  } | undefined;
155
153
  } | null;
154
+ stopWhen: {
155
+ transferCountIs?: number | undefined;
156
+ } | null;
156
157
  prompt: string | null;
158
+ defaultSubAgentId: string | null;
159
+ contextConfigId: string | null;
157
160
  statusUpdates: {
158
161
  enabled?: boolean | undefined;
159
162
  numEvents?: number | undefined;
@@ -169,9 +172,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
169
172
  } | undefined;
170
173
  }[] | undefined;
171
174
  } | null;
172
- stopWhen: {
173
- transferCountIs?: number | undefined;
174
- } | null;
175
175
  }[]>;
176
176
  declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
177
177
  scopes: ProjectScopeConfig;
@@ -251,10 +251,8 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
251
251
  createdAt: string;
252
252
  updatedAt: string;
253
253
  description: string | null;
254
- projectId: string;
255
254
  tenantId: string;
256
- defaultSubAgentId: string | null;
257
- contextConfigId: string | null;
255
+ projectId: string;
258
256
  models: {
259
257
  base?: {
260
258
  model?: string | undefined;
@@ -269,7 +267,12 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
269
267
  providerOptions?: Record<string, any> | undefined;
270
268
  } | undefined;
271
269
  } | null;
270
+ stopWhen: {
271
+ transferCountIs?: number | undefined;
272
+ } | null;
272
273
  prompt: string | null;
274
+ defaultSubAgentId: string | null;
275
+ contextConfigId: string | null;
273
276
  statusUpdates: {
274
277
  enabled?: boolean | undefined;
275
278
  numEvents?: number | undefined;
@@ -285,9 +288,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
285
288
  } | undefined;
286
289
  }[] | undefined;
287
290
  } | null;
288
- stopWhen: {
289
- transferCountIs?: number | undefined;
290
- } | null;
291
291
  }>;
292
292
  declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
293
293
  scopes: AgentScopeConfig;
@@ -14,8 +14,8 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  description: string | null;
17
- projectId: string;
18
17
  tenantId: string;
18
+ projectId: string;
19
19
  props: {
20
20
  [x: string]: unknown;
21
21
  type: "object";
@@ -70,8 +70,8 @@ declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (para
70
70
  createdAt: string;
71
71
  updatedAt: string;
72
72
  description: string | null;
73
- projectId: string;
74
73
  tenantId: string;
74
+ projectId: string;
75
75
  props: {
76
76
  [x: string]: unknown;
77
77
  type: "object";
@@ -143,9 +143,9 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
143
143
  }) => Promise<{
144
144
  id: string;
145
145
  createdAt: string;
146
- agentId: string;
147
- projectId: string;
148
146
  tenantId: string;
147
+ projectId: string;
148
+ agentId: string;
149
149
  subAgentId: string;
150
150
  artifactComponentId: string;
151
151
  }>;
@@ -186,9 +186,9 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
186
186
  }) => Promise<{
187
187
  id: string;
188
188
  createdAt: string;
189
- agentId: string;
190
- projectId: string;
191
189
  tenantId: string;
190
+ projectId: string;
191
+ agentId: string;
192
192
  subAgentId: string;
193
193
  artifactComponentId: string;
194
194
  } | null>;
@@ -12,11 +12,11 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
+ tenantId: string;
16
+ projectId: string;
17
+ agentId: string;
15
18
  headersSchema: unknown;
16
19
  contextVariables: Record<string, ContextFetchDefinition> | null;
17
- agentId: string;
18
- projectId: string;
19
- tenantId: string;
20
20
  } | undefined>;
21
21
  declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
22
22
  scopes: AgentScopeConfig;
@@ -24,11 +24,11 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
24
24
  id: string;
25
25
  createdAt: string;
26
26
  updatedAt: string;
27
+ tenantId: string;
28
+ projectId: string;
29
+ agentId: string;
27
30
  headersSchema: unknown;
28
31
  contextVariables: Record<string, ContextFetchDefinition> | null;
29
- agentId: string;
30
- projectId: string;
31
- tenantId: string;
32
32
  }[]>;
33
33
  declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
34
34
  scopes: AgentScopeConfig;
@@ -46,11 +46,11 @@ declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params:
46
46
  id: string;
47
47
  createdAt: string;
48
48
  updatedAt: string;
49
+ tenantId: string;
50
+ projectId: string;
51
+ agentId: string;
49
52
  headersSchema: unknown;
50
53
  contextVariables: Record<string, ContextFetchDefinition> | null;
51
- agentId: string;
52
- projectId: string;
53
- tenantId: string;
54
54
  }>;
55
55
  declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
56
56
  scopes: AgentScopeConfig;
@@ -86,11 +86,11 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
86
86
  id: string;
87
87
  createdAt: string;
88
88
  updatedAt: string;
89
+ tenantId: string;
90
+ projectId: string;
91
+ agentId: string;
89
92
  headersSchema: unknown;
90
93
  contextVariables: Record<string, ContextFetchDefinition> | null;
91
- agentId: string;
92
- projectId: string;
93
- tenantId: string;
94
94
  }>;
95
95
  //#endregion
96
96
  export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
@@ -67,9 +67,9 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
67
67
  }) => Promise<{
68
68
  id: string;
69
69
  createdAt: string;
70
- agentId: string;
71
- projectId: string;
72
70
  tenantId: string;
71
+ projectId: string;
72
+ agentId: string;
73
73
  subAgentId: string;
74
74
  dataComponentId: string;
75
75
  }>;
@@ -109,9 +109,9 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
109
109
  }) => Promise<{
110
110
  id: string;
111
111
  createdAt: string;
112
- agentId: string;
113
- projectId: string;
114
112
  tenantId: string;
113
+ projectId: string;
114
+ agentId: string;
115
115
  subAgentId: string;
116
116
  dataComponentId: string;
117
117
  } | null>;
@@ -58,9 +58,9 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
58
58
  createdAt: string;
59
59
  updatedAt: string;
60
60
  description: string | null;
61
- agentId: string;
62
- projectId: string;
63
61
  tenantId: string;
62
+ projectId: string;
63
+ agentId: string;
64
64
  functionId: string;
65
65
  }>;
66
66
  /**
@@ -100,9 +100,9 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
100
100
  createdAt: string;
101
101
  updatedAt: string;
102
102
  description: string | null;
103
- agentId: string;
104
- projectId: string;
105
103
  tenantId: string;
104
+ projectId: string;
105
+ agentId: string;
106
106
  functionId: string;
107
107
  }>;
108
108
  declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -164,9 +164,9 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
164
164
  id: string;
165
165
  createdAt: string;
166
166
  updatedAt: string;
167
- agentId: string;
168
- projectId: string;
169
167
  tenantId: string;
168
+ projectId: string;
169
+ agentId: string;
170
170
  subAgentId: string;
171
171
  functionToolId: string;
172
172
  toolPolicies: Record<string, {
@@ -229,9 +229,9 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
229
229
  id: string;
230
230
  createdAt: string;
231
231
  updatedAt: string;
232
- agentId: string;
233
- projectId: string;
234
232
  tenantId: string;
233
+ projectId: string;
234
+ agentId: string;
235
235
  subAgentId: string;
236
236
  functionToolId: string;
237
237
  toolPolicies: Record<string, {
@@ -14,8 +14,8 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
14
14
  updatedAt: string;
15
15
  metadata: Record<string, string> | null;
16
16
  description: string;
17
- projectId: string;
18
17
  tenantId: string;
18
+ projectId: string;
19
19
  content: string;
20
20
  } | null>;
21
21
  declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
@@ -47,8 +47,8 @@ declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInser
47
47
  updatedAt: string;
48
48
  metadata: Record<string, string> | null;
49
49
  description: string;
50
- projectId: string;
51
50
  tenantId: string;
51
+ projectId: string;
52
52
  content: string;
53
53
  }>;
54
54
  declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
@@ -58,8 +58,8 @@ declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInser
58
58
  updatedAt: string;
59
59
  metadata: Record<string, string> | null;
60
60
  description: string;
61
- projectId: string;
62
61
  tenantId: string;
62
+ projectId: string;
63
63
  content: string;
64
64
  }>;
65
65
  declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
@@ -94,9 +94,9 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
94
94
  id: string;
95
95
  createdAt: string;
96
96
  updatedAt: string;
97
- agentId: string;
98
- projectId: string;
99
97
  tenantId: string;
98
+ projectId: string;
99
+ agentId: string;
100
100
  subAgentId: string;
101
101
  skillId: string;
102
102
  index: number;