@inkeep/agents-core 0.80.7 → 0.81.1

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 (48) hide show
  1. package/dist/auth/auth-config-utils.js +1 -2
  2. package/dist/auth/auth-schema.d.ts +1110 -91
  3. package/dist/auth/auth-schema.js +73 -9
  4. package/dist/auth/auth-validation-schemas.d.ts +137 -137
  5. package/dist/auth/auth.d.ts +862 -251
  6. package/dist/auth/auth.js +13 -3
  7. package/dist/auth/permissions.d.ts +7 -7
  8. package/dist/auth/sso-issuer-discovery.d.ts +2 -1
  9. package/dist/context/TemplateEngine.js +2 -1
  10. package/dist/credential-stores/defaults.js +2 -1
  11. package/dist/credential-stores/memory-store.js +6 -0
  12. package/dist/data-access/manage/agents.d.ts +5 -5
  13. package/dist/data-access/manage/functionTools.d.ts +2 -2
  14. package/dist/data-access/manage/skills.d.ts +1 -1
  15. package/dist/data-access/manage/subAgentRelations.d.ts +2 -2
  16. package/dist/data-access/manage/subAgents.d.ts +3 -3
  17. package/dist/data-access/manage/tools.d.ts +6 -6
  18. package/dist/data-access/manage/triggers.d.ts +1 -1
  19. package/dist/data-access/runtime/apps.d.ts +5 -5
  20. package/dist/data-access/runtime/conversations.d.ts +8 -8
  21. package/dist/data-access/runtime/events.d.ts +1 -1
  22. package/dist/data-access/runtime/feedback.d.ts +2 -2
  23. package/dist/data-access/runtime/messages.d.ts +15 -15
  24. package/dist/db/manage/manage-schema.d.ts +504 -504
  25. package/dist/db/runtime/runtime-schema.d.ts +453 -453
  26. package/dist/db/runtime/runtime-schema.js +5 -2
  27. package/dist/env.d.ts +5 -0
  28. package/dist/env.js +1 -0
  29. package/dist/index.d.ts +3 -3
  30. package/dist/index.js +3 -3
  31. package/dist/utils/env-detection.d.ts +3 -1
  32. package/dist/utils/env-detection.js +7 -1
  33. package/dist/utils/index.d.ts +2 -2
  34. package/dist/utils/index.js +2 -2
  35. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  36. package/dist/validation/event-schemas.d.ts +2 -2
  37. package/dist/validation/event-schemas.js +1 -1
  38. package/dist/validation/schemas/shared.d.ts +2 -2
  39. package/dist/validation/schemas/shared.js +26 -37
  40. package/dist/validation/schemas/skills.d.ts +29 -29
  41. package/dist/validation/schemas.d.ts +1787 -1787
  42. package/dist/validation/schemas.js +2 -2
  43. package/dist/validation/stream-event-schemas.d.ts +10 -10
  44. package/dist/validation/stream-event-schemas.js +5 -5
  45. package/drizzle/runtime/0045_complex_phantom_reporter.sql +95 -0
  46. package/drizzle/runtime/meta/0045_snapshot.json +6800 -0
  47. package/drizzle/runtime/meta/_journal.json +7 -0
  48. package/package.json +9 -8
package/dist/auth/auth.js CHANGED
@@ -37,11 +37,18 @@ function createAuth(config) {
37
37
  return {
38
38
  ...adapter,
39
39
  create: (params) => {
40
- if (params.model === "organization" && params.data.id && !params.forceAllowId) return adapter.create({
40
+ if (params.model !== "organization" || params.forceAllowId) return adapter.create(params);
41
+ const data = params.data;
42
+ const id = data.id ?? data.slug;
43
+ if (!id) return adapter.create(params);
44
+ return adapter.create({
41
45
  ...params,
46
+ data: {
47
+ ...params.data,
48
+ id
49
+ },
42
50
  forceAllowId: true
43
51
  });
44
- return adapter.create(params);
45
52
  }
46
53
  };
47
54
  }),
@@ -51,6 +58,7 @@ function createAuth(config) {
51
58
  maxPasswordLength: 256,
52
59
  requireEmailVerification: false,
53
60
  autoSignIn: true,
61
+ revokeSessionsOnPasswordReset: true,
54
62
  resetPasswordTokenExpiresIn: 1800,
55
63
  sendResetPassword: async ({ user, url, token }) => {
56
64
  if (!await hasCredentialAccount(config.dbClient, user.id)) return;
@@ -157,11 +165,13 @@ function createAuth(config) {
157
165
  ],
158
166
  allowDynamicClientRegistration: true,
159
167
  allowUnauthenticatedClientRegistration: true,
160
- validAudiences: [
168
+ resources: [
161
169
  config.baseURL,
162
170
  `${config.baseURL}/`,
163
171
  `${config.baseURL}/mcp`
164
172
  ],
173
+ enforcePerClientResources: false,
174
+ clientRegistrationDefaultApplicationType: "infer",
165
175
  customAccessTokenClaims: async ({ user }) => {
166
176
  if (!user) return {};
167
177
  const org = await getInitialOrganization(config.dbClient, user.id);
@@ -1,32 +1,32 @@
1
- import * as better_auth_plugins7 from "better-auth/plugins";
1
+ import * as better_auth_plugins9 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
- declare const memberRole: better_auth_plugins7.Role<better_auth_plugins7.ExactRoleStatements<{
7
+ declare const memberRole: better_auth_plugins9.Role<better_auth_plugins9.ExactRoleStatements<{
8
8
  readonly organization: readonly [];
9
9
  readonly member: readonly [];
10
10
  readonly invitation: readonly [];
11
11
  readonly team: readonly [];
12
12
  readonly ac: readonly ["read"];
13
13
  readonly project: ["read"];
14
- }>, better_auth_plugins7.Statements>;
15
- declare const adminRole: better_auth_plugins7.Role<better_auth_plugins7.ExactRoleStatements<{
14
+ }>, better_auth_plugins9.Statements>;
15
+ declare const adminRole: better_auth_plugins9.Role<better_auth_plugins9.ExactRoleStatements<{
16
16
  readonly organization: readonly ["update"];
17
17
  readonly invitation: readonly ["create", "cancel"];
18
18
  readonly member: readonly ["create", "update", "delete"];
19
19
  readonly team: readonly ["create", "update", "delete"];
20
20
  readonly ac: readonly ["create", "read", "update", "delete"];
21
21
  readonly project: ["create", "read", "update", "delete"];
22
- }>, better_auth_plugins7.Statements>;
23
- declare const ownerRole: better_auth_plugins7.Role<better_auth_plugins7.ExactRoleStatements<{
22
+ }>, better_auth_plugins9.Statements>;
23
+ declare const ownerRole: better_auth_plugins9.Role<better_auth_plugins9.ExactRoleStatements<{
24
24
  readonly organization: readonly ["update", "delete"];
25
25
  readonly member: readonly ["create", "update", "delete"];
26
26
  readonly invitation: readonly ["create", "cancel"];
27
27
  readonly team: readonly ["create", "update", "delete"];
28
28
  readonly ac: readonly ["create", "read", "update", "delete"];
29
29
  readonly project: ["create", "read", "update", "delete"];
30
- }>, better_auth_plugins7.Statements>;
30
+ }>, better_auth_plugins9.Statements>;
31
31
  //#endregion
32
32
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -1,4 +1,5 @@
1
1
  import { AgentsRunDatabaseClient } from "../db/runtime/runtime-client.js";
2
+ import { discoverOIDCConfig } from "@better-auth/sso";
2
3
 
3
4
  //#region src/auth/sso-issuer-discovery.d.ts
4
5
  type OidcEndpointPatch = {
@@ -7,7 +8,7 @@ type OidcEndpointPatch = {
7
8
  tokenEndpoint: string;
8
9
  jwksEndpoint: string;
9
10
  userInfoEndpoint?: string;
10
- tokenEndpointAuthentication?: 'client_secret_basic' | 'client_secret_post';
11
+ tokenEndpointAuthentication?: NonNullable<Awaited<ReturnType<typeof discoverOIDCConfig>>['tokenEndpointAuthentication']>;
11
12
  };
12
13
  type RediscoveryContext = {
13
14
  path: string;
@@ -1,5 +1,6 @@
1
1
  import { normalizeJMESPath, searchJMESPath } from "../utils/jmespath-utils.js";
2
2
  import { getLogger } from "../utils/logger.js";
3
+ import { getTemplateEnvironmentVariables } from "../utils/env-detection.js";
3
4
 
4
5
  //#region src/context/TemplateEngine.ts
5
6
  const logger = getLogger("template-engine");
@@ -113,7 +114,7 @@ var TemplateEngine = class TemplateEngine {
113
114
  static processBuiltinVariable(variable) {
114
115
  if (variable.startsWith("$env.")) {
115
116
  const envVar = variable.substring(5);
116
- return process.env[envVar] || "";
117
+ return getTemplateEnvironmentVariables()[envVar] || "";
117
118
  }
118
119
  logger.warn({ variable }, "Unknown built-in variable");
119
120
  return "";
@@ -1,4 +1,5 @@
1
1
  import { DEFAULT_COMPOSIO_STORE_ID, DEFAULT_NANGO_STORE_ID } from "./default-constants.js";
2
+ import { isEnvironmentCredentialAccessEnabled } from "../utils/env-detection.js";
2
3
  import { ComposioCredentialStore } from "./composio-store.js";
3
4
  import { createKeyChainStore } from "./keychain-store.js";
4
5
  import { InMemoryCredentialStore } from "./memory-store.js";
@@ -10,7 +11,7 @@ import { createNangoCredentialStore } from "./nango-store.js";
10
11
  */
11
12
  function createDefaultCredentialStores() {
12
13
  const stores = [];
13
- stores.push(new InMemoryCredentialStore("memory-default"));
14
+ if (isEnvironmentCredentialAccessEnabled()) stores.push(new InMemoryCredentialStore("memory-default"));
14
15
  if (process.env.NANGO_SECRET_KEY) stores.push(createNangoCredentialStore(DEFAULT_NANGO_STORE_ID, {
15
16
  apiUrl: process.env.NANGO_SERVER_URL || "https://api.nango.dev",
16
17
  secretKey: process.env.NANGO_SECRET_KEY
@@ -1,4 +1,5 @@
1
1
  import { CredentialStoreType } from "../types/utility.js";
2
+ import { isEnvironmentCredentialAccessEnabled } from "../utils/env-detection.js";
2
3
 
3
4
  //#region src/credential-stores/memory-store.ts
4
5
  /**
@@ -21,6 +22,7 @@ var InMemoryCredentialStore = class {
21
22
  * @returns The credential value or null if not found
22
23
  */
23
24
  async get(key) {
25
+ if (!isEnvironmentCredentialAccessEnabled()) return null;
24
26
  const credential = this.credentials.get(key);
25
27
  if (!credential) {
26
28
  const envValue = process.env[key];
@@ -61,6 +63,10 @@ var InMemoryCredentialStore = class {
61
63
  * Check if the credential store is available and functional
62
64
  */
63
65
  async checkAvailability() {
66
+ if (!isEnvironmentCredentialAccessEnabled()) return {
67
+ available: false,
68
+ reason: "Memory credential stores require INKEEP_ENABLE_ENVIRONMENT_CREDENTIALS=true"
69
+ };
64
70
  return { available: true };
65
71
  }
66
72
  };
@@ -15,7 +15,6 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
15
15
  createdAt: string;
16
16
  updatedAt: string;
17
17
  description: string | null;
18
- prompt: string | null;
19
18
  projectId: string;
20
19
  tenantId: string;
21
20
  models: {
@@ -41,6 +40,7 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
41
40
  stopWhen: {
42
41
  transferCountIs?: number | undefined;
43
42
  } | null;
43
+ prompt: string | null;
44
44
  defaultSubAgentId: string | null;
45
45
  contextConfigId: string | null;
46
46
  statusUpdates: {
@@ -68,7 +68,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
68
68
  createdAt: string;
69
69
  updatedAt: string;
70
70
  description: string | null;
71
- prompt: string | null;
72
71
  projectId: string;
73
72
  tenantId: string;
74
73
  models: {
@@ -94,6 +93,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
94
93
  stopWhen: {
95
94
  transferCountIs?: number | undefined;
96
95
  } | null;
96
+ prompt: string | null;
97
97
  defaultSubAgentId: string | null;
98
98
  contextConfigId: string | null;
99
99
  statusUpdates: {
@@ -118,7 +118,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
118
118
  createdAt: string;
119
119
  updatedAt: string;
120
120
  description: string | null;
121
- prompt: string | null;
122
121
  projectId: string;
123
122
  tenantId: string;
124
123
  models: {
@@ -145,6 +144,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
145
144
  stepCountIs?: number | undefined;
146
145
  } | null;
147
146
  agentId: string;
147
+ prompt: string | null;
148
148
  conversationHistoryConfig: ConversationHistoryConfig | null;
149
149
  outputContract: {
150
150
  [x: string]: unknown;
@@ -165,7 +165,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
165
165
  createdAt: string;
166
166
  updatedAt: string;
167
167
  description: string | null;
168
- prompt: string | null;
169
168
  projectId: string;
170
169
  tenantId: string;
171
170
  models: {
@@ -191,6 +190,7 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
191
190
  stopWhen: {
192
191
  transferCountIs?: number | undefined;
193
192
  } | null;
193
+ prompt: string | null;
194
194
  defaultSubAgentId: string | null;
195
195
  contextConfigId: string | null;
196
196
  statusUpdates: {
@@ -295,7 +295,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
295
295
  createdAt: string;
296
296
  updatedAt: string;
297
297
  description: string | null;
298
- prompt: string | null;
299
298
  projectId: string;
300
299
  tenantId: string;
301
300
  models: {
@@ -321,6 +320,7 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
321
320
  stopWhen: {
322
321
  transferCountIs?: number | undefined;
323
322
  } | null;
323
+ prompt: string | null;
324
324
  defaultSubAgentId: string | null;
325
325
  contextConfigId: string | null;
326
326
  statusUpdates: {
@@ -164,10 +164,10 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
164
164
  tenantId: string;
165
165
  agentId: string;
166
166
  subAgentId: string;
167
+ functionToolId: string;
167
168
  toolPolicies: Record<string, {
168
169
  needsApproval?: boolean;
169
170
  }> | null;
170
- functionToolId: string;
171
171
  }>;
172
172
  /**
173
173
  * Update an agent-function tool relation
@@ -229,10 +229,10 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
229
229
  tenantId: string;
230
230
  agentId: string;
231
231
  subAgentId: string;
232
+ functionToolId: string;
232
233
  toolPolicies: Record<string, {
233
234
  needsApproval?: boolean;
234
235
  }> | null;
235
- functionToolId: string;
236
236
  }>;
237
237
  //#endregion
238
238
  export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
@@ -142,13 +142,13 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
142
142
  id: string;
143
143
  createdAt: string;
144
144
  updatedAt: string;
145
- skillId: string;
146
145
  projectId: string;
147
146
  tenantId: string;
148
147
  agentId: string;
149
148
  subAgentId: string;
150
149
  index: number;
151
150
  alwaysLoaded: boolean;
151
+ skillId: string;
152
152
  }>;
153
153
  declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
154
154
  scopes: AgentScopeConfig;
@@ -213,10 +213,10 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
213
213
  agentId: string;
214
214
  subAgentId: string;
215
215
  toolId: string;
216
- selectedTools: string[] | null;
217
216
  toolPolicies: Record<string, {
218
217
  needsApproval?: boolean;
219
218
  }> | null;
219
+ selectedTools: string[] | null;
220
220
  }>;
221
221
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
222
222
  scopes: AgentScopeConfig;
@@ -257,10 +257,10 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
257
257
  agentId: string;
258
258
  subAgentId: string;
259
259
  toolId: string;
260
- selectedTools: string[] | null;
261
260
  toolPolicies: Record<string, {
262
261
  needsApproval?: boolean;
263
262
  }> | null;
263
+ selectedTools: string[] | null;
264
264
  } | undefined>;
265
265
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
266
266
  scopes: SubAgentScopeConfig;
@@ -14,7 +14,6 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  description: string | null;
17
- prompt: string | null;
18
17
  projectId: string;
19
18
  tenantId: string;
20
19
  models: {
@@ -41,6 +40,7 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
41
40
  stepCountIs?: number | undefined;
42
41
  } | null;
43
42
  agentId: string;
43
+ prompt: string | null;
44
44
  conversationHistoryConfig: ConversationHistoryConfig | null;
45
45
  outputContract: {
46
46
  [x: string]: unknown;
@@ -60,7 +60,6 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
60
60
  createdAt: string;
61
61
  updatedAt: string;
62
62
  description: string | null;
63
- prompt: string | null;
64
63
  projectId: string;
65
64
  tenantId: string;
66
65
  models: {
@@ -87,6 +86,7 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
87
86
  stepCountIs?: number | undefined;
88
87
  } | null;
89
88
  agentId: string;
89
+ prompt: string | null;
90
90
  conversationHistoryConfig: ConversationHistoryConfig | null;
91
91
  outputContract: {
92
92
  [x: string]: unknown;
@@ -159,7 +159,6 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
159
159
  createdAt: string;
160
160
  updatedAt: string;
161
161
  description: string | null;
162
- prompt: string | null;
163
162
  projectId: string;
164
163
  tenantId: string;
165
164
  models: {
@@ -186,6 +185,7 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
186
185
  stepCountIs?: number | undefined;
187
186
  } | null;
188
187
  agentId: string;
188
+ prompt: string | null;
189
189
  conversationHistoryConfig: ConversationHistoryConfig | null;
190
190
  outputContract: {
191
191
  [x: string]: unknown;
@@ -28,11 +28,11 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
28
28
  headers: Record<string, string> | null;
29
29
  projectId: string;
30
30
  tenantId: string;
31
- credentialReferenceId: string | null;
32
31
  config: {
33
32
  type: "mcp";
34
33
  mcp: ToolMcpConfig;
35
34
  };
35
+ credentialReferenceId: string | null;
36
36
  credentialScope: string;
37
37
  imageUrl: string | null;
38
38
  capabilities: ToolServerCapabilities | null;
@@ -86,11 +86,11 @@ declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInser
86
86
  headers: Record<string, string> | null;
87
87
  projectId: string;
88
88
  tenantId: string;
89
- credentialReferenceId: string | null;
90
89
  config: {
91
90
  type: "mcp";
92
91
  mcp: ToolMcpConfig;
93
92
  };
93
+ credentialReferenceId: string | null;
94
94
  credentialScope: string;
95
95
  imageUrl: string | null;
96
96
  capabilities: ToolServerCapabilities | null;
@@ -144,10 +144,10 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
144
144
  agentId: string;
145
145
  subAgentId: string;
146
146
  toolId: string;
147
- selectedTools: string[] | null;
148
147
  toolPolicies: Record<string, {
149
148
  needsApproval?: boolean;
150
149
  }> | null;
150
+ selectedTools: string[] | null;
151
151
  }>;
152
152
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
153
153
  scopes: AgentScopeConfig;
@@ -163,10 +163,10 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
163
163
  agentId: string;
164
164
  subAgentId: string;
165
165
  toolId: string;
166
- selectedTools: string[] | null;
167
166
  toolPolicies: Record<string, {
168
167
  needsApproval?: boolean;
169
168
  }> | null;
169
+ selectedTools: string[] | null;
170
170
  }>;
171
171
  /**
172
172
  * Upsert agent-tool relation (create if it doesn't exist, update if it does)
@@ -191,10 +191,10 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
191
191
  agentId: string;
192
192
  subAgentId: string;
193
193
  toolId: string;
194
- selectedTools: string[] | null;
195
194
  toolPolicies: Record<string, {
196
195
  needsApproval?: boolean;
197
196
  }> | null;
197
+ selectedTools: string[] | null;
198
198
  }>;
199
199
  /**
200
200
  * Upsert a tool (create if it doesn't exist, update if it does)
@@ -210,11 +210,11 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
210
210
  headers: Record<string, string> | null;
211
211
  projectId: string;
212
212
  tenantId: string;
213
- credentialReferenceId: string | null;
214
213
  config: {
215
214
  type: "mcp";
216
215
  mcp: ToolMcpConfig;
217
216
  };
217
+ credentialReferenceId: string | null;
218
218
  credentialScope: string;
219
219
  imageUrl: string | null;
220
220
  capabilities: ToolServerCapabilities | null;
@@ -46,7 +46,7 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "body" | "header";
49
+ source: "body" | "header" | "literal";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;
@@ -12,9 +12,9 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
12
12
  updatedAt: string;
13
13
  description: string | null;
14
14
  enabled: boolean;
15
- prompt: string | null;
16
15
  projectId: string | null;
17
16
  tenantId: string | null;
17
+ prompt: string | null;
18
18
  config: {
19
19
  type: "web_client";
20
20
  webClient: {
@@ -22,7 +22,7 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
22
22
  publicKeys: {
23
23
  kid: string;
24
24
  publicKey: string;
25
- algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
25
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
26
26
  addedAt: string;
27
27
  }[];
28
28
  allowAnonymous: boolean;
@@ -81,9 +81,9 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
81
81
  updatedAt: string;
82
82
  description: string | null;
83
83
  enabled: boolean;
84
- prompt: string | null;
85
84
  projectId: string | null;
86
85
  tenantId: string | null;
86
+ prompt: string | null;
87
87
  config: {
88
88
  type: "web_client";
89
89
  webClient: {
@@ -91,7 +91,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
91
91
  publicKeys: {
92
92
  kid: string;
93
93
  publicKey: string;
94
- algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
94
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
95
95
  addedAt: string;
96
96
  }[];
97
97
  allowAnonymous: boolean;
@@ -174,7 +174,7 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
174
174
  publicKeys: {
175
175
  kid: string;
176
176
  publicKey: string;
177
- algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
177
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
178
178
  addedAt: string;
179
179
  }[];
180
180
  allowAnonymous: boolean;
@@ -26,10 +26,10 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
26
26
  } | null;
27
27
  userId: string | null;
28
28
  metadata: ConversationMetadata | null;
29
- properties: Record<string, unknown> | null;
30
- title: string | null;
31
29
  projectId: string;
32
30
  tenantId: string;
31
+ properties: Record<string, unknown> | null;
32
+ title: string | null;
33
33
  agentId: string | null;
34
34
  userProperties: Record<string, unknown> | null;
35
35
  activeSubAgentId: string;
@@ -101,10 +101,10 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
101
101
  } | null;
102
102
  userId: string | null;
103
103
  metadata: ConversationMetadata | null;
104
- properties: Record<string, unknown> | null;
105
- title: string | null;
106
104
  projectId: string;
107
105
  tenantId: string;
106
+ properties: Record<string, unknown> | null;
107
+ title: string | null;
108
108
  agentId: string | null;
109
109
  userProperties: Record<string, unknown> | null;
110
110
  activeSubAgentId: string;
@@ -156,10 +156,10 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
156
156
  } | null;
157
157
  userId: string | null;
158
158
  metadata: ConversationMetadata | null;
159
- properties: Record<string, unknown> | null;
160
- title: string | null;
161
159
  projectId: string;
162
160
  tenantId: string;
161
+ properties: Record<string, unknown> | null;
162
+ title: string | null;
163
163
  agentId: string | null;
164
164
  userProperties: Record<string, unknown> | null;
165
165
  activeSubAgentId: string;
@@ -194,10 +194,10 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
194
194
  } | null;
195
195
  userId: string | null;
196
196
  metadata: ConversationMetadata | null;
197
- properties: Record<string, unknown> | null;
198
- title: string | null;
199
197
  projectId: string;
200
198
  tenantId: string;
199
+ properties: Record<string, unknown> | null;
200
+ title: string | null;
201
201
  agentId: string | null;
202
202
  userProperties: Record<string, unknown> | null;
203
203
  activeSubAgentId: string;
@@ -12,9 +12,9 @@ declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert
12
12
  createdAt: string;
13
13
  updatedAt: string;
14
14
  metadata: Record<string, unknown> | null;
15
- properties: Record<string, unknown> | null;
16
15
  projectId: string;
17
16
  tenantId: string;
17
+ properties: Record<string, unknown> | null;
18
18
  agentId: string | null;
19
19
  conversationId: string | null;
20
20
  userProperties: Record<string, unknown> | null;
@@ -76,9 +76,9 @@ declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: Feedback
76
76
  updatedAt: string;
77
77
  projectId: string;
78
78
  tenantId: string;
79
+ details: string | null;
79
80
  conversationId: string;
80
81
  messageId: string | null;
81
- details: string | null;
82
82
  }>;
83
83
  declare const createFeedbackBulk: (db: AgentsRunDatabaseClient) => (items: FeedbackInsert[]) => Promise<(typeof feedback.$inferSelect)[]>;
84
84
  declare const updateFeedback: (db: AgentsRunDatabaseClient) => (params: {
@@ -106,9 +106,9 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
106
106
  updatedAt: string;
107
107
  projectId: string;
108
108
  tenantId: string;
109
+ details: string | null;
109
110
  conversationId: string;
110
111
  messageId: string | null;
111
- details: string | null;
112
112
  }>;
113
113
  //#endregion
114
114
  export { createFeedback, createFeedbackBulk, deleteFeedback, getFeedbackById, getFeedbackByIds, listFeedback, listFeedbackByConversation, updateFeedback };
@@ -15,23 +15,23 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
15
15
  updatedAt: string;
16
16
  metadata: MessageMetadata | null;
17
17
  role: string;
18
- properties: Record<string, unknown> | null;
19
18
  content: MessageContent;
20
19
  projectId: string;
21
20
  tenantId: string;
22
- conversationId: string;
23
- userProperties: Record<string, unknown> | null;
21
+ properties: Record<string, unknown> | null;
24
22
  fromSubAgentId: string | null;
25
23
  toSubAgentId: string | null;
26
24
  fromExternalAgentId: string | null;
27
25
  toExternalAgentId: string | null;
26
+ taskId: string | null;
27
+ a2aTaskId: string | null;
28
+ conversationId: string;
29
+ userProperties: Record<string, unknown> | null;
28
30
  fromTeamAgentId: string | null;
29
31
  toTeamAgentId: string | null;
30
32
  visibility: string;
31
33
  messageType: string;
32
- taskId: string | null;
33
34
  parentMessageId: string | null;
34
- a2aTaskId: string | null;
35
35
  a2aSessionId: string | null;
36
36
  } | undefined>;
37
37
  declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
@@ -188,23 +188,23 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
188
188
  updatedAt: string;
189
189
  metadata: MessageMetadata | null;
190
190
  role: string;
191
- properties: Record<string, unknown> | null;
192
191
  content: MessageContent;
193
192
  projectId: string;
194
193
  tenantId: string;
195
- conversationId: string;
196
- userProperties: Record<string, unknown> | null;
194
+ properties: Record<string, unknown> | null;
197
195
  fromSubAgentId: string | null;
198
196
  toSubAgentId: string | null;
199
197
  fromExternalAgentId: string | null;
200
198
  toExternalAgentId: string | null;
199
+ taskId: string | null;
200
+ a2aTaskId: string | null;
201
+ conversationId: string;
202
+ userProperties: Record<string, unknown> | null;
201
203
  fromTeamAgentId: string | null;
202
204
  toTeamAgentId: string | null;
203
205
  visibility: string;
204
206
  messageType: string;
205
- taskId: string | null;
206
207
  parentMessageId: string | null;
207
- a2aTaskId: string | null;
208
208
  a2aSessionId: string | null;
209
209
  }>;
210
210
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -245,23 +245,23 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
245
245
  updatedAt: string;
246
246
  metadata: MessageMetadata | null;
247
247
  role: string;
248
- properties: Record<string, unknown> | null;
249
248
  content: MessageContent;
250
249
  projectId: string;
251
250
  tenantId: string;
252
- conversationId: string;
253
- userProperties: Record<string, unknown> | null;
251
+ properties: Record<string, unknown> | null;
254
252
  fromSubAgentId: string | null;
255
253
  toSubAgentId: string | null;
256
254
  fromExternalAgentId: string | null;
257
255
  toExternalAgentId: string | null;
256
+ taskId: string | null;
257
+ a2aTaskId: string | null;
258
+ conversationId: string;
259
+ userProperties: Record<string, unknown> | null;
258
260
  fromTeamAgentId: string | null;
259
261
  toTeamAgentId: string | null;
260
262
  visibility: string;
261
263
  messageType: string;
262
- taskId: string | null;
263
264
  parentMessageId: string | null;
264
- a2aTaskId: string | null;
265
265
  a2aSessionId: string | null;
266
266
  }>;
267
267
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {