@inkeep/agents-core 0.78.5 → 0.79.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 (44) hide show
  1. package/dist/data-access/index.d.ts +2 -1
  2. package/dist/data-access/index.js +2 -1
  3. package/dist/data-access/manage/agents.d.ts +26 -26
  4. package/dist/data-access/manage/artifactComponents.d.ts +2 -2
  5. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  6. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  7. package/dist/data-access/manage/functionTools.d.ts +6 -6
  8. package/dist/data-access/manage/skills.d.ts +4 -4
  9. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  10. package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
  11. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
  12. package/dist/data-access/manage/subAgents.d.ts +6 -6
  13. package/dist/data-access/manage/tools.d.ts +12 -12
  14. package/dist/data-access/manage/triggers.d.ts +3 -3
  15. package/dist/data-access/manage/webhookDestinations.d.ts +2 -1
  16. package/dist/data-access/runtime/apiKeys.d.ts +4 -4
  17. package/dist/data-access/runtime/apps.d.ts +2 -2
  18. package/dist/data-access/runtime/conversations.d.ts +12 -12
  19. package/dist/data-access/runtime/events.d.ts +3 -3
  20. package/dist/data-access/runtime/feedback.d.ts +2 -2
  21. package/dist/data-access/runtime/messages.d.ts +18 -18
  22. package/dist/data-access/runtime/organizations.d.ts +4 -3
  23. package/dist/data-access/runtime/organizations.js +5 -4
  24. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +5 -5
  25. package/dist/data-access/runtime/tasks.d.ts +1 -1
  26. package/dist/data-access/runtime/toolApprovalDecisions.d.ts +37 -0
  27. package/dist/data-access/runtime/toolApprovalDecisions.js +76 -0
  28. package/dist/db/manage/manage-schema.d.ts +420 -401
  29. package/dist/db/manage/manage-schema.js +2 -1
  30. package/dist/db/runtime/runtime-schema.d.ts +562 -414
  31. package/dist/db/runtime/runtime-schema.js +30 -1
  32. package/dist/index.d.ts +3 -2
  33. package/dist/index.js +3 -2
  34. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  35. package/dist/validation/schemas/skills.d.ts +25 -25
  36. package/dist/validation/schemas.d.ts +633 -588
  37. package/dist/validation/schemas.js +6 -2
  38. package/drizzle/manage/0024_blue_junta.sql +2 -0
  39. package/drizzle/manage/meta/0024_snapshot.json +4323 -0
  40. package/drizzle/manage/meta/_journal.json +7 -0
  41. package/drizzle/runtime/0044_productive_bromley.sql +12 -0
  42. package/drizzle/runtime/meta/0044_snapshot.json +6386 -0
  43. package/drizzle/runtime/meta/_journal.json +7 -0
  44. package/package.json +1 -1
@@ -12,9 +12,9 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
+ agentId: string;
15
16
  projectId: string;
16
17
  tenantId: string;
17
- agentId: string;
18
18
  sourceSubAgentId: string;
19
19
  targetSubAgentId: string | null;
20
20
  relationType: string | null;
@@ -47,9 +47,9 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
47
47
  id: string;
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
+ agentId: string;
50
51
  projectId: string;
51
52
  tenantId: string;
52
- agentId: string;
53
53
  sourceSubAgentId: string;
54
54
  targetSubAgentId: string | null;
55
55
  relationType: string | null;
@@ -60,9 +60,9 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
60
60
  id: string;
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
+ agentId: string;
63
64
  projectId: string;
64
65
  tenantId: string;
65
- agentId: string;
66
66
  sourceSubAgentId: string;
67
67
  targetSubAgentId: string | null;
68
68
  relationType: string | null;
@@ -129,9 +129,9 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
129
129
  id: string;
130
130
  createdAt: string;
131
131
  updatedAt: string;
132
+ agentId: string;
132
133
  projectId: string;
133
134
  tenantId: string;
134
- agentId: string;
135
135
  sourceSubAgentId: string;
136
136
  targetSubAgentId: string | null;
137
137
  relationType: string | null;
@@ -148,9 +148,9 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
148
148
  id: string;
149
149
  createdAt: string;
150
150
  updatedAt: string;
151
+ agentId: string;
151
152
  projectId: string;
152
153
  tenantId: string;
153
- agentId: string;
154
154
  sourceSubAgentId: string;
155
155
  targetSubAgentId: string | null;
156
156
  relationType: string | null;
@@ -162,9 +162,9 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
162
162
  id: string;
163
163
  createdAt: string;
164
164
  updatedAt: string;
165
+ agentId: string;
165
166
  projectId: string;
166
167
  tenantId: string;
167
- agentId: string;
168
168
  sourceSubAgentId: string;
169
169
  targetSubAgentId: string | null;
170
170
  relationType: string | null;
@@ -207,16 +207,16 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
207
207
  id: string;
208
208
  createdAt: string;
209
209
  updatedAt: string;
210
+ headers: Record<string, string> | null;
211
+ agentId: string;
210
212
  projectId: string;
211
213
  tenantId: string;
212
- agentId: string;
213
- headers: Record<string, string> | null;
214
214
  subAgentId: string;
215
215
  toolId: string;
216
+ selectedTools: string[] | null;
216
217
  toolPolicies: Record<string, {
217
218
  needsApproval?: boolean;
218
219
  }> | null;
219
- selectedTools: string[] | null;
220
220
  }>;
221
221
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
222
222
  scopes: AgentScopeConfig;
@@ -251,16 +251,16 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
251
251
  id: string;
252
252
  createdAt: string;
253
253
  updatedAt: string;
254
+ headers: Record<string, string> | null;
255
+ agentId: string;
254
256
  projectId: string;
255
257
  tenantId: string;
256
- agentId: string;
257
- headers: Record<string, string> | null;
258
258
  subAgentId: string;
259
259
  toolId: string;
260
+ selectedTools: string[] | null;
260
261
  toolPolicies: Record<string, {
261
262
  needsApproval?: boolean;
262
263
  }> | null;
263
- selectedTools: string[] | null;
264
264
  } | undefined>;
265
265
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
266
266
  scopes: SubAgentScopeConfig;
@@ -12,10 +12,10 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
+ headers: Record<string, string> | null;
16
+ agentId: string;
15
17
  projectId: string;
16
18
  tenantId: string;
17
- agentId: string;
18
- headers: Record<string, string> | null;
19
19
  subAgentId: string;
20
20
  targetAgentId: string;
21
21
  } | undefined>;
@@ -47,10 +47,10 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
47
47
  id: string;
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
+ headers: Record<string, string> | null;
51
+ agentId: string;
50
52
  projectId: string;
51
53
  tenantId: string;
52
- agentId: string;
53
- headers: Record<string, string> | null;
54
54
  subAgentId: string;
55
55
  targetAgentId: string;
56
56
  }[]>;
@@ -60,10 +60,10 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
60
60
  id: string;
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
+ headers: Record<string, string> | null;
64
+ agentId: string;
63
65
  projectId: string;
64
66
  tenantId: string;
65
- agentId: string;
66
- headers: Record<string, string> | null;
67
67
  subAgentId: string;
68
68
  targetAgentId: string;
69
69
  }[]>;
@@ -225,10 +225,10 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
225
225
  id: string;
226
226
  createdAt: string;
227
227
  updatedAt: string;
228
+ headers: Record<string, string> | null;
229
+ agentId: string;
228
230
  projectId: string;
229
231
  tenantId: string;
230
- agentId: string;
231
- headers: Record<string, string> | null;
232
232
  subAgentId: string;
233
233
  targetAgentId: string;
234
234
  }>;
@@ -242,10 +242,10 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
242
242
  id: string;
243
243
  createdAt: string;
244
244
  updatedAt: string;
245
+ headers: Record<string, string> | null;
246
+ agentId: string;
245
247
  projectId: string;
246
248
  tenantId: string;
247
- agentId: string;
248
- headers: Record<string, string> | null;
249
249
  subAgentId: string;
250
250
  targetAgentId: string;
251
251
  } | undefined>;
@@ -263,10 +263,10 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
263
263
  id: string;
264
264
  createdAt: string;
265
265
  updatedAt: string;
266
+ headers: Record<string, string> | null;
267
+ agentId: string;
266
268
  projectId: string;
267
269
  tenantId: string;
268
- agentId: string;
269
- headers: Record<string, string> | null;
270
270
  subAgentId: string;
271
271
  targetAgentId: string;
272
272
  }>;
@@ -14,6 +14,8 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  description: string | null;
17
+ prompt: string | null;
18
+ agentId: string;
17
19
  projectId: string;
18
20
  tenantId: string;
19
21
  models: {
@@ -39,8 +41,6 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
39
41
  stopWhen: {
40
42
  stepCountIs?: number | undefined;
41
43
  } | null;
42
- agentId: string;
43
- prompt: string | null;
44
44
  conversationHistoryConfig: ConversationHistoryConfig | null;
45
45
  outputContract: {
46
46
  [x: string]: unknown;
@@ -60,6 +60,8 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
60
60
  createdAt: string;
61
61
  updatedAt: string;
62
62
  description: string | null;
63
+ prompt: string | null;
64
+ agentId: string;
63
65
  projectId: string;
64
66
  tenantId: string;
65
67
  models: {
@@ -85,8 +87,6 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
85
87
  stopWhen: {
86
88
  stepCountIs?: number | undefined;
87
89
  } | null;
88
- agentId: string;
89
- prompt: string | null;
90
90
  conversationHistoryConfig: ConversationHistoryConfig | null;
91
91
  outputContract: {
92
92
  [x: string]: unknown;
@@ -159,6 +159,8 @@ 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
+ agentId: string;
162
164
  projectId: string;
163
165
  tenantId: string;
164
166
  models: {
@@ -184,8 +186,6 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
184
186
  stopWhen: {
185
187
  stepCountIs?: number | undefined;
186
188
  } | null;
187
- agentId: string;
188
- prompt: string | null;
189
189
  conversationHistoryConfig: ConversationHistoryConfig | null;
190
190
  outputContract: {
191
191
  [x: string]: unknown;
@@ -25,9 +25,9 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
25
25
  createdAt: string;
26
26
  updatedAt: string;
27
27
  description: string | null;
28
+ headers: Record<string, string> | null;
28
29
  projectId: string;
29
30
  tenantId: string;
30
- headers: Record<string, string> | null;
31
31
  config: {
32
32
  type: "mcp";
33
33
  mcp: ToolMcpConfig;
@@ -83,9 +83,9 @@ declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInser
83
83
  createdAt: string;
84
84
  updatedAt: string;
85
85
  description: string | null;
86
+ headers: Record<string, string> | null;
86
87
  projectId: string;
87
88
  tenantId: string;
88
- headers: Record<string, string> | null;
89
89
  config: {
90
90
  type: "mcp";
91
91
  mcp: ToolMcpConfig;
@@ -138,16 +138,16 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
138
138
  id: string;
139
139
  createdAt: string;
140
140
  updatedAt: string;
141
+ headers: Record<string, string> | null;
142
+ agentId: string;
141
143
  projectId: string;
142
144
  tenantId: string;
143
- agentId: string;
144
- headers: Record<string, string> | null;
145
145
  subAgentId: string;
146
146
  toolId: string;
147
+ selectedTools: string[] | null;
147
148
  toolPolicies: Record<string, {
148
149
  needsApproval?: boolean;
149
150
  }> | null;
150
- selectedTools: string[] | null;
151
151
  }>;
152
152
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
153
153
  scopes: AgentScopeConfig;
@@ -157,16 +157,16 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
157
157
  id: string;
158
158
  createdAt: string;
159
159
  updatedAt: string;
160
+ headers: Record<string, string> | null;
161
+ agentId: string;
160
162
  projectId: string;
161
163
  tenantId: string;
162
- agentId: string;
163
- headers: Record<string, string> | null;
164
164
  subAgentId: string;
165
165
  toolId: string;
166
+ selectedTools: string[] | null;
166
167
  toolPolicies: Record<string, {
167
168
  needsApproval?: boolean;
168
169
  }> | 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)
@@ -185,16 +185,16 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
185
185
  id: string;
186
186
  createdAt: string;
187
187
  updatedAt: string;
188
+ headers: Record<string, string> | null;
189
+ agentId: string;
188
190
  projectId: string;
189
191
  tenantId: string;
190
- agentId: string;
191
- headers: Record<string, string> | null;
192
192
  subAgentId: string;
193
193
  toolId: string;
194
+ selectedTools: string[] | null;
194
195
  toolPolicies: Record<string, {
195
196
  needsApproval?: boolean;
196
197
  }> | null;
197
- selectedTools: string[] | null;
198
198
  }>;
199
199
  /**
200
200
  * Upsert a tool (create if it doesn't exist, update if it does)
@@ -207,9 +207,9 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
207
207
  createdAt: string;
208
208
  updatedAt: string;
209
209
  description: string | null;
210
+ headers: Record<string, string> | null;
210
211
  projectId: string;
211
212
  tenantId: string;
212
- headers: Record<string, string> | null;
213
213
  config: {
214
214
  type: "mcp";
215
215
  mcp: ToolMcpConfig;
@@ -37,8 +37,8 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
37
37
  authentication: unknown;
38
38
  signingSecretCredentialReferenceId: string | null;
39
39
  signatureVerification: {
40
- algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
- encoding: "hex" | "base64";
40
+ algorithm: "md5" | "sha256" | "sha512" | "sha384" | "sha1";
41
+ encoding: "base64" | "hex";
42
42
  signature: {
43
43
  source: "query" | "body" | "header";
44
44
  key: string;
@@ -133,9 +133,9 @@ declare const createTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
133
133
  }) => Promise<{
134
134
  createdAt: string;
135
135
  userId: string;
136
+ agentId: string;
136
137
  projectId: string;
137
138
  tenantId: string;
138
- agentId: string;
139
139
  triggerId: string;
140
140
  }>;
141
141
  declare const deleteTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
@@ -17,7 +17,8 @@ declare const listWebhookDestinationsPaginated: (db: AgentsManageDatabaseClient)
17
17
  createdAt: string;
18
18
  updatedAt: string;
19
19
  enabled: boolean;
20
- url: string;
20
+ url: string | null;
21
+ slackChannelId: string | null;
21
22
  eventTypes: string[];
22
23
  headers: Record<string, string> | null;
23
24
  name: string;
@@ -13,9 +13,9 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
15
  expiresAt: string | null;
16
+ agentId: string;
16
17
  projectId: string;
17
18
  tenantId: string;
18
- agentId: string;
19
19
  publicId: string;
20
20
  keyHash: string;
21
21
  keyPrefix: string;
@@ -27,9 +27,9 @@ declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: s
27
27
  createdAt: string;
28
28
  updatedAt: string;
29
29
  expiresAt: string | null;
30
+ agentId: string;
30
31
  projectId: string;
31
32
  tenantId: string;
32
- agentId: string;
33
33
  publicId: string;
34
34
  keyHash: string;
35
35
  keyPrefix: string;
@@ -44,9 +44,9 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
44
44
  createdAt: string;
45
45
  updatedAt: string;
46
46
  expiresAt: string | null;
47
+ agentId: string;
47
48
  projectId: string;
48
49
  tenantId: string;
49
- agentId: string;
50
50
  publicId: string;
51
51
  keyHash: string;
52
52
  keyPrefix: string;
@@ -71,9 +71,9 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
71
71
  createdAt: string;
72
72
  updatedAt: string;
73
73
  expiresAt: string | null;
74
+ agentId: string;
74
75
  projectId: string;
75
76
  tenantId: string;
76
- agentId: string;
77
77
  publicId: string;
78
78
  keyHash: string;
79
79
  keyPrefix: string;
@@ -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;
15
16
  projectId: string | null;
16
17
  tenantId: string | null;
17
- prompt: string | null;
18
18
  config: {
19
19
  type: "web_client";
20
20
  webClient: {
@@ -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;
84
85
  projectId: string | null;
85
86
  tenantId: string | null;
86
- prompt: string | null;
87
87
  config: {
88
88
  type: "web_client";
89
89
  webClient: {
@@ -26,14 +26,14 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
26
26
  } | null;
27
27
  userId: string | null;
28
28
  metadata: ConversationMetadata | null;
29
- projectId: string;
30
- tenantId: string;
31
29
  properties: Record<string, unknown> | null;
32
30
  title: string | null;
33
31
  agentId: string | null;
34
- userProperties: Record<string, unknown> | null;
32
+ projectId: string;
33
+ tenantId: string;
35
34
  activeSubAgentId: string;
36
35
  lastContextResolution: string | null;
36
+ userProperties: Record<string, unknown> | null;
37
37
  }>;
38
38
  declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
39
39
  scopes: ProjectScopeConfig;
@@ -101,14 +101,14 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
101
101
  } | null;
102
102
  userId: string | null;
103
103
  metadata: ConversationMetadata | null;
104
- projectId: string;
105
- tenantId: string;
106
104
  properties: Record<string, unknown> | null;
107
105
  title: string | null;
108
106
  agentId: string | null;
109
- userProperties: Record<string, unknown> | null;
107
+ projectId: string;
108
+ tenantId: string;
110
109
  activeSubAgentId: string;
111
110
  lastContextResolution: string | null;
111
+ userProperties: Record<string, unknown> | null;
112
112
  } | undefined>;
113
113
  /**
114
114
  * Batch-fetch conversations by id within a project scope.
@@ -156,14 +156,14 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
156
156
  } | null;
157
157
  userId: string | null;
158
158
  metadata: ConversationMetadata | null;
159
- projectId: string;
160
- tenantId: string;
161
159
  properties: Record<string, unknown> | null;
162
160
  title: string | null;
163
161
  agentId: string | null;
164
- userProperties: Record<string, unknown> | null;
162
+ projectId: string;
163
+ tenantId: string;
165
164
  activeSubAgentId: string;
166
165
  lastContextResolution: string | null;
166
+ userProperties: Record<string, unknown> | null;
167
167
  }>;
168
168
  /**
169
169
  * Extract text content from message content object
@@ -194,14 +194,14 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
194
194
  } | null;
195
195
  userId: string | null;
196
196
  metadata: ConversationMetadata | null;
197
- projectId: string;
198
- tenantId: string;
199
197
  properties: Record<string, unknown> | null;
200
198
  title: string | null;
201
199
  agentId: string | null;
202
- userProperties: Record<string, unknown> | null;
200
+ projectId: string;
201
+ tenantId: string;
203
202
  activeSubAgentId: string;
204
203
  lastContextResolution: string | null;
204
+ userProperties: Record<string, unknown> | null;
205
205
  } | undefined>;
206
206
  /**
207
207
  * Set active agent for a conversation (upsert operation)
@@ -12,12 +12,12 @@ declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert
12
12
  createdAt: string;
13
13
  updatedAt: string;
14
14
  metadata: Record<string, unknown> | null;
15
- projectId: string;
16
- tenantId: string;
17
15
  properties: Record<string, unknown> | null;
18
16
  agentId: string | null;
19
- conversationId: string | null;
17
+ projectId: string;
18
+ tenantId: string;
20
19
  userProperties: Record<string, unknown> | null;
20
+ conversationId: string | null;
21
21
  messageId: string | null;
22
22
  serverMetadata: {
23
23
  [k: string]: unknown;
@@ -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;
80
79
  conversationId: string;
81
80
  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;
110
109
  conversationId: string;
111
110
  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
- content: MessageContent;
18
+ properties: Record<string, unknown> | null;
19
19
  projectId: string;
20
20
  tenantId: string;
21
- properties: Record<string, unknown> | null;
21
+ content: MessageContent;
22
+ userProperties: Record<string, unknown> | null;
23
+ conversationId: string;
22
24
  fromSubAgentId: string | null;
23
25
  toSubAgentId: string | null;
24
26
  fromExternalAgentId: string | null;
25
27
  toExternalAgentId: string | null;
26
- taskId: string | null;
27
- a2aTaskId: string | null;
28
- conversationId: string;
29
- userProperties: Record<string, unknown> | null;
30
28
  fromTeamAgentId: string | null;
31
29
  toTeamAgentId: string | null;
32
30
  visibility: string;
33
31
  messageType: string;
32
+ taskId: string | null;
34
33
  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
- content: MessageContent;
191
+ properties: Record<string, unknown> | null;
192
192
  projectId: string;
193
193
  tenantId: string;
194
- properties: Record<string, unknown> | null;
194
+ content: MessageContent;
195
+ userProperties: Record<string, unknown> | null;
196
+ conversationId: string;
195
197
  fromSubAgentId: string | null;
196
198
  toSubAgentId: string | null;
197
199
  fromExternalAgentId: string | null;
198
200
  toExternalAgentId: string | null;
199
- taskId: string | null;
200
- a2aTaskId: string | null;
201
- conversationId: string;
202
- userProperties: Record<string, unknown> | null;
203
201
  fromTeamAgentId: string | null;
204
202
  toTeamAgentId: string | null;
205
203
  visibility: string;
206
204
  messageType: string;
205
+ taskId: string | null;
207
206
  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
- content: MessageContent;
248
+ properties: Record<string, unknown> | null;
249
249
  projectId: string;
250
250
  tenantId: string;
251
- properties: Record<string, unknown> | null;
251
+ content: MessageContent;
252
+ userProperties: Record<string, unknown> | null;
253
+ conversationId: string;
252
254
  fromSubAgentId: string | null;
253
255
  toSubAgentId: string | null;
254
256
  fromExternalAgentId: string | null;
255
257
  toExternalAgentId: string | null;
256
- taskId: string | null;
257
- a2aTaskId: string | null;
258
- conversationId: string;
259
- userProperties: Record<string, unknown> | null;
260
258
  fromTeamAgentId: string | null;
261
259
  toTeamAgentId: string | null;
262
260
  visibility: string;
263
261
  messageType: string;
262
+ taskId: string | null;
264
263
  parentMessageId: string | null;
264
+ a2aTaskId: string | null;
265
265
  a2aSessionId: string | null;
266
266
  }>;
267
267
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -56,10 +56,11 @@ interface UserProviderInfo {
56
56
  providers: string[];
57
57
  }
58
58
  /**
59
- * Get authentication providers for a list of users.
60
- * Returns which providers each user has linked (e.g., 'credential', 'google').
59
+ * Get authentication providers for a list of users WITHIN an organization.
60
+ * Returns which providers each member has linked (e.g., 'credential', 'google').
61
+ * Results are scoped to members of `organizationId`; users outside it return no providers.
61
62
  */
62
- declare const getUserProvidersFromDb: (db: AgentsRunDatabaseClient) => (userIds: string[]) => Promise<UserProviderInfo[]>;
63
+ declare const getUserProvidersFromDb: (db: AgentsRunDatabaseClient) => (userIds: string[], organizationId: string) => Promise<UserProviderInfo[]>;
63
64
  declare const getAllowedAuthMethods: (db: AgentsRunDatabaseClient) => (organizationId: string) => Promise<AllowedAuthMethod[]>;
64
65
  /**
65
66
  * Create an invitation directly in db.
@@ -78,15 +78,16 @@ const upsertOrganization = (db) => async (data) => {
78
78
  return { created: true };
79
79
  };
80
80
  /**
81
- * Get authentication providers for a list of users.
82
- * Returns which providers each user has linked (e.g., 'credential', 'google').
81
+ * Get authentication providers for a list of users WITHIN an organization.
82
+ * Returns which providers each member has linked (e.g., 'credential', 'google').
83
+ * Results are scoped to members of `organizationId`; users outside it return no providers.
83
84
  */
84
- const getUserProvidersFromDb = (db) => async (userIds) => {
85
+ const getUserProvidersFromDb = (db) => async (userIds, organizationId) => {
85
86
  if (userIds.length === 0) return [];
86
87
  const accounts = await db.select({
87
88
  userId: account.userId,
88
89
  providerId: account.providerId
89
- }).from(account).where(inArray(account.userId, userIds));
90
+ }).from(account).innerJoin(member, and(eq(member.userId, account.userId), eq(member.organizationId, organizationId))).where(inArray(account.userId, userIds));
90
91
  const providerMap = /* @__PURE__ */ new Map();
91
92
  for (const acc of accounts) {
92
93
  const existing = providerMap.get(acc.userId) || [];