@inkeep/agents-core 0.45.3 → 0.46.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 (54) hide show
  1. package/dist/auth/auth-schema.d.ts +17 -0
  2. package/dist/auth/auth-schema.js +4 -3
  3. package/dist/auth/auth-validation-schemas.d.ts +180 -146
  4. package/dist/auth/auth.d.ts +56 -22
  5. package/dist/auth/auth.js +15 -1
  6. package/dist/auth/authz/config.d.ts +5 -1
  7. package/dist/auth/authz/config.js +8 -3
  8. package/dist/auth/authz/permissions.js +1 -0
  9. package/dist/auth/init.js +13 -3
  10. package/dist/auth/password-reset-link-store.d.ts +26 -0
  11. package/dist/auth/password-reset-link-store.js +40 -0
  12. package/dist/auth/permissions.d.ts +9 -9
  13. package/dist/auth/spicedb-schema.d.ts +9 -0
  14. package/dist/auth/spicedb-schema.js +24 -0
  15. package/dist/client-exports.d.ts +5 -193
  16. package/dist/client-exports.js +2 -97
  17. package/dist/constants/models.d.ts +2 -0
  18. package/dist/constants/models.js +2 -0
  19. package/dist/constants/signoz-queries.d.ts +2 -0
  20. package/dist/constants/signoz-queries.js +2 -0
  21. package/dist/data-access/index.d.ts +3 -3
  22. package/dist/data-access/index.js +3 -3
  23. package/dist/data-access/manage/agents.d.ts +41 -41
  24. package/dist/data-access/manage/agents.js +4 -4
  25. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  26. package/dist/data-access/manage/contextConfigs.d.ts +4 -4
  27. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  28. package/dist/data-access/manage/functionTools.d.ts +10 -10
  29. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  30. package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
  31. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
  32. package/dist/data-access/manage/subAgents.d.ts +27 -27
  33. package/dist/data-access/manage/tools.d.ts +18 -18
  34. package/dist/data-access/manage/tools.js +1 -1
  35. package/dist/data-access/manage/triggers.d.ts +2 -2
  36. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  37. package/dist/data-access/runtime/conversations.d.ts +24 -24
  38. package/dist/data-access/runtime/messages.d.ts +15 -15
  39. package/dist/data-access/runtime/organizations.d.ts +10 -1
  40. package/dist/data-access/runtime/organizations.js +24 -3
  41. package/dist/data-access/runtime/tasks.d.ts +5 -5
  42. package/dist/db/manage/manage-schema.d.ts +382 -382
  43. package/dist/db/runtime/runtime-schema.d.ts +232 -232
  44. package/dist/index.d.ts +5 -4
  45. package/dist/index.js +8 -7
  46. package/dist/types/index.js +1 -1
  47. package/dist/validation/index.d.ts +2 -2
  48. package/dist/validation/index.js +2 -2
  49. package/dist/validation/schemas.d.ts +1781 -1780
  50. package/dist/validation/schemas.js +3 -2
  51. package/drizzle/runtime/0011_colorful_vivisector.sql +50 -0
  52. package/drizzle/runtime/meta/0011_snapshot.json +3088 -0
  53. package/drizzle/runtime/meta/_journal.json +7 -0
  54. package/package.json +9 -2
@@ -10,17 +10,9 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
10
10
  }) => Promise<{
11
11
  id: string;
12
12
  name: string;
13
- description: string | null;
14
13
  createdAt: string;
15
14
  updatedAt: string;
16
- projectId: string;
17
- tenantId: string;
18
- agentId: string;
19
- stopWhen: {
20
- stepCountIs?: number | undefined;
21
- } | null;
22
- prompt: string | null;
23
- conversationHistoryConfig: ConversationHistoryConfig | null;
15
+ description: string | null;
24
16
  models: {
25
17
  base?: {
26
18
  model?: string | undefined;
@@ -35,23 +27,23 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
35
27
  providerOptions?: Record<string, any> | undefined;
36
28
  } | undefined;
37
29
  } | null;
30
+ stopWhen: {
31
+ stepCountIs?: number | undefined;
32
+ } | null;
33
+ tenantId: string;
34
+ projectId: string;
35
+ prompt: string | null;
36
+ agentId: string;
37
+ conversationHistoryConfig: ConversationHistoryConfig | null;
38
38
  } | undefined>;
39
39
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
40
40
  scopes: AgentScopeConfig;
41
41
  }) => Promise<{
42
42
  id: string;
43
43
  name: string;
44
- description: string | null;
45
44
  createdAt: string;
46
45
  updatedAt: string;
47
- projectId: string;
48
- tenantId: string;
49
- agentId: string;
50
- stopWhen: {
51
- stepCountIs?: number | undefined;
52
- } | null;
53
- prompt: string | null;
54
- conversationHistoryConfig: ConversationHistoryConfig | null;
46
+ description: string | null;
55
47
  models: {
56
48
  base?: {
57
49
  model?: string | undefined;
@@ -66,6 +58,14 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
66
58
  providerOptions?: Record<string, any> | undefined;
67
59
  } | undefined;
68
60
  } | null;
61
+ stopWhen: {
62
+ stepCountIs?: number | undefined;
63
+ } | null;
64
+ tenantId: string;
65
+ projectId: string;
66
+ prompt: string | null;
67
+ agentId: string;
68
+ conversationHistoryConfig: ConversationHistoryConfig | null;
69
69
  }[]>;
70
70
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
71
71
  scopes: AgentScopeConfig;
@@ -110,17 +110,9 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
110
110
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
111
111
  id: string;
112
112
  name: string;
113
- description: string | null;
114
113
  createdAt: string;
115
114
  updatedAt: string;
116
- projectId: string;
117
- tenantId: string;
118
- agentId: string;
119
- stopWhen: {
120
- stepCountIs?: number | undefined;
121
- } | null;
122
- prompt: string | null;
123
- conversationHistoryConfig: ConversationHistoryConfig | null;
115
+ description: string | null;
124
116
  models: {
125
117
  base?: {
126
118
  model?: string | undefined;
@@ -135,6 +127,14 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
135
127
  providerOptions?: Record<string, any> | undefined;
136
128
  } | undefined;
137
129
  } | null;
130
+ stopWhen: {
131
+ stepCountIs?: number | undefined;
132
+ } | null;
133
+ tenantId: string;
134
+ projectId: string;
135
+ prompt: string | null;
136
+ agentId: string;
137
+ conversationHistoryConfig: ConversationHistoryConfig | null;
138
138
  }>;
139
139
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
140
140
  scopes: AgentScopeConfig;
@@ -20,12 +20,12 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
20
20
  }) => Promise<{
21
21
  id: string;
22
22
  name: string;
23
- description: string | null;
24
23
  createdAt: string;
25
24
  updatedAt: string;
26
- projectId: string;
27
- tenantId: string;
25
+ description: string | null;
28
26
  headers: Record<string, string> | null;
27
+ tenantId: string;
28
+ projectId: string;
29
29
  config: {
30
30
  type: "mcp";
31
31
  mcp: ToolMcpConfig;
@@ -78,12 +78,12 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
78
78
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
79
79
  id: string;
80
80
  name: string;
81
- description: string | null;
82
81
  createdAt: string;
83
82
  updatedAt: string;
84
- projectId: string;
85
- tenantId: string;
83
+ description: string | null;
86
84
  headers: Record<string, string> | null;
85
+ tenantId: string;
86
+ projectId: string;
87
87
  config: {
88
88
  type: "mcp";
89
89
  mcp: ToolMcpConfig;
@@ -136,15 +136,15 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
136
136
  id: string;
137
137
  createdAt: string;
138
138
  updatedAt: string;
139
- projectId: string;
139
+ headers: Record<string, string> | null;
140
140
  tenantId: string;
141
+ projectId: string;
141
142
  agentId: string;
142
- headers: Record<string, string> | null;
143
143
  toolId: string;
144
- subAgentId: string;
145
144
  toolPolicies: Record<string, {
146
145
  needsApproval?: boolean;
147
146
  }> | null;
147
+ subAgentId: string;
148
148
  selectedTools: string[] | null;
149
149
  }>;
150
150
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -155,15 +155,15 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
155
155
  id: string;
156
156
  createdAt: string;
157
157
  updatedAt: string;
158
- projectId: string;
158
+ headers: Record<string, string> | null;
159
159
  tenantId: string;
160
+ projectId: string;
160
161
  agentId: string;
161
- headers: Record<string, string> | null;
162
162
  toolId: string;
163
- subAgentId: string;
164
163
  toolPolicies: Record<string, {
165
164
  needsApproval?: boolean;
166
165
  }> | null;
166
+ subAgentId: string;
167
167
  selectedTools: string[] | null;
168
168
  }>;
169
169
  /**
@@ -183,15 +183,15 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
183
183
  id: string;
184
184
  createdAt: string;
185
185
  updatedAt: string;
186
- projectId: string;
186
+ headers: Record<string, string> | null;
187
187
  tenantId: string;
188
+ projectId: string;
188
189
  agentId: string;
189
- headers: Record<string, string> | null;
190
190
  toolId: string;
191
- subAgentId: string;
192
191
  toolPolicies: Record<string, {
193
192
  needsApproval?: boolean;
194
193
  }> | null;
194
+ subAgentId: string;
195
195
  selectedTools: string[] | null;
196
196
  }>;
197
197
  /**
@@ -202,12 +202,12 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
202
202
  }) => Promise<{
203
203
  id: string;
204
204
  name: string;
205
- description: string | null;
206
205
  createdAt: string;
207
206
  updatedAt: string;
208
- projectId: string;
209
- tenantId: string;
207
+ description: string | null;
210
208
  headers: Record<string, string> | null;
209
+ tenantId: string;
210
+ projectId: string;
211
211
  config: {
212
212
  type: "mcp";
213
213
  mcp: ToolMcpConfig;
@@ -1,5 +1,5 @@
1
- import { CredentialStoreType, MCPServerType, MCPTransportType } from "../../types/utility.js";
2
1
  import { subAgentToolRelations, tools } from "../../db/manage/manage-schema.js";
2
+ import { CredentialStoreType, MCPServerType, MCPTransportType } from "../../types/utility.js";
3
3
  import { detectAuthenticationRequired } from "../../utils/auth-detection.js";
4
4
  import { env } from "../../env.js";
5
5
  import { getLogger } from "../../utils/logger.js";
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
40
40
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
41
  encoding: "hex" | "base64";
42
42
  signature: {
43
- source: "query" | "header" | "body";
43
+ source: "query" | "body" | "header";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "header" | "body";
49
+ source: "literal" | "body" | "header";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;
@@ -11,10 +11,10 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
11
11
  name: string | null;
12
12
  createdAt: string;
13
13
  updatedAt: string;
14
- projectId: string;
14
+ expiresAt: string | null;
15
15
  tenantId: string;
16
+ projectId: string;
16
17
  agentId: string;
17
- expiresAt: string | null;
18
18
  publicId: string;
19
19
  keyHash: string;
20
20
  keyPrefix: string;
@@ -25,10 +25,10 @@ declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: s
25
25
  name: string | null;
26
26
  createdAt: string;
27
27
  updatedAt: string;
28
- projectId: string;
28
+ expiresAt: string | null;
29
29
  tenantId: string;
30
+ projectId: string;
30
31
  agentId: string;
31
- expiresAt: string | null;
32
32
  publicId: string;
33
33
  keyHash: string;
34
34
  keyPrefix: string;
@@ -42,10 +42,10 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
42
42
  name: string | null;
43
43
  createdAt: string;
44
44
  updatedAt: string;
45
- projectId: string;
45
+ expiresAt: string | null;
46
46
  tenantId: string;
47
+ projectId: string;
47
48
  agentId: string;
48
- expiresAt: string | null;
49
49
  publicId: string;
50
50
  keyHash: string;
51
51
  keyPrefix: string;
@@ -69,10 +69,10 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
69
69
  name: string | null;
70
70
  createdAt: string;
71
71
  updatedAt: string;
72
- projectId: string;
72
+ expiresAt: string | null;
73
73
  tenantId: string;
74
+ projectId: string;
74
75
  agentId: string;
75
- expiresAt: string | null;
76
76
  publicId: string;
77
77
  keyHash: string;
78
78
  keyPrefix: string;
@@ -16,20 +16,20 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
16
16
  }>;
17
17
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
18
18
  id: string;
19
- metadata: ConversationMetadata | null;
20
19
  createdAt: string;
21
20
  updatedAt: string;
22
- projectId: string;
23
- tenantId: string;
24
- userId: string | null;
25
- agentId: string | null;
26
- activeSubAgentId: string;
27
21
  ref: {
28
22
  type: "commit" | "tag" | "branch";
29
23
  name: string;
30
24
  hash: string;
31
25
  } | null;
26
+ userId: string | null;
27
+ metadata: ConversationMetadata | null;
32
28
  title: string | null;
29
+ tenantId: string;
30
+ projectId: string;
31
+ agentId: string | null;
32
+ activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
35
35
  declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -85,20 +85,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
87
  id: string;
88
- metadata: ConversationMetadata | null;
89
88
  createdAt: string;
90
89
  updatedAt: string;
91
- projectId: string;
92
- tenantId: string;
93
- userId: string | null;
94
- agentId: string | null;
95
- activeSubAgentId: string;
96
90
  ref: {
97
91
  type: "commit" | "tag" | "branch";
98
92
  name: string;
99
93
  hash: string;
100
94
  } | null;
95
+ userId: string | null;
96
+ metadata: ConversationMetadata | null;
101
97
  title: string | null;
98
+ tenantId: string;
99
+ projectId: string;
100
+ agentId: string | null;
101
+ activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
103
103
  } | undefined>;
104
104
  declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input: ConversationInsert) => Promise<{
@@ -121,20 +121,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
123
  id: string;
124
- metadata: ConversationMetadata | null;
125
124
  createdAt: string;
126
125
  updatedAt: string;
127
- projectId: string;
128
- tenantId: string;
129
- userId: string | null;
130
- agentId: string | null;
131
- activeSubAgentId: string;
132
126
  ref: {
133
127
  type: "commit" | "tag" | "branch";
134
128
  name: string;
135
129
  hash: string;
136
130
  } | null;
131
+ userId: string | null;
132
+ metadata: ConversationMetadata | null;
137
133
  title: string | null;
134
+ tenantId: string;
135
+ projectId: string;
136
+ agentId: string | null;
137
+ activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
139
139
  }>;
140
140
  /**
@@ -153,20 +153,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
153
153
  conversationId: string;
154
154
  }) => Promise<{
155
155
  id: string;
156
- metadata: ConversationMetadata | null;
157
156
  createdAt: string;
158
157
  updatedAt: string;
159
- projectId: string;
160
- tenantId: string;
161
- userId: string | null;
162
- agentId: string | null;
163
- activeSubAgentId: string;
164
158
  ref: {
165
159
  type: "commit" | "tag" | "branch";
166
160
  name: string;
167
161
  hash: string;
168
162
  } | null;
163
+ userId: string | null;
164
+ metadata: ConversationMetadata | null;
169
165
  title: string | null;
166
+ tenantId: string;
167
+ projectId: string;
168
+ agentId: string | null;
169
+ activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
172
172
  /**
@@ -10,15 +10,13 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  messageId: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
- taskId: string | null;
14
- metadata: MessageMetadata | null;
15
- visibility: string;
16
13
  createdAt: string;
17
14
  updatedAt: string;
18
- projectId: string;
15
+ metadata: MessageMetadata | null;
16
+ role: string;
19
17
  tenantId: string;
18
+ projectId: string;
20
19
  content: MessageContent;
21
- role: string;
22
20
  conversationId: string;
23
21
  fromSubAgentId: string | null;
24
22
  toSubAgentId: string | null;
@@ -26,7 +24,9 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
26
24
  toExternalAgentId: string | null;
27
25
  fromTeamAgentId: string | null;
28
26
  toTeamAgentId: string | null;
27
+ visibility: string;
29
28
  messageType: string;
29
+ taskId: string | null;
30
30
  parentMessageId: string | null;
31
31
  a2aTaskId: string | null;
32
32
  a2aSessionId: string | null;
@@ -141,15 +141,13 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
141
141
  }[]>;
142
142
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
143
143
  id: string;
144
- taskId: string | null;
145
- metadata: MessageMetadata | null;
146
- visibility: string;
147
144
  createdAt: string;
148
145
  updatedAt: string;
149
- projectId: string;
146
+ metadata: MessageMetadata | null;
147
+ role: string;
150
148
  tenantId: string;
149
+ projectId: string;
151
150
  content: MessageContent;
152
- role: string;
153
151
  conversationId: string;
154
152
  fromSubAgentId: string | null;
155
153
  toSubAgentId: string | null;
@@ -157,7 +155,9 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageIn
157
155
  toExternalAgentId: string | null;
158
156
  fromTeamAgentId: string | null;
159
157
  toTeamAgentId: string | null;
158
+ visibility: string;
160
159
  messageType: string;
160
+ taskId: string | null;
161
161
  parentMessageId: string | null;
162
162
  a2aTaskId: string | null;
163
163
  a2aSessionId: string | null;
@@ -194,15 +194,13 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
194
194
  messageId: string;
195
195
  }) => Promise<{
196
196
  id: string;
197
- taskId: string | null;
198
- metadata: MessageMetadata | null;
199
- visibility: string;
200
197
  createdAt: string;
201
198
  updatedAt: string;
202
- projectId: string;
199
+ metadata: MessageMetadata | null;
200
+ role: string;
203
201
  tenantId: string;
202
+ projectId: string;
204
203
  content: MessageContent;
205
- role: string;
206
204
  conversationId: string;
207
205
  fromSubAgentId: string | null;
208
206
  toSubAgentId: string | null;
@@ -210,7 +208,9 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
210
208
  toExternalAgentId: string | null;
211
209
  fromTeamAgentId: string | null;
212
210
  toTeamAgentId: string | null;
211
+ visibility: string;
213
212
  messageType: string;
213
+ taskId: string | null;
214
214
  parentMessageId: string | null;
215
215
  a2aTaskId: string | null;
216
216
  a2aSessionId: string | null;
@@ -48,5 +48,14 @@ declare const upsertOrganization: (db: AgentsRunDatabaseClient) => (data: {
48
48
  }) => Promise<{
49
49
  created: boolean;
50
50
  }>;
51
+ interface UserProviderInfo {
52
+ userId: string;
53
+ providers: string[];
54
+ }
55
+ /**
56
+ * Get authentication providers for a list of users.
57
+ * Returns which providers each user has linked (e.g., 'credential', 'google', 'auth0').
58
+ */
59
+ declare const getUserProvidersFromDb: (db: AgentsRunDatabaseClient) => (userIds: string[]) => Promise<UserProviderInfo[]>;
51
60
  //#endregion
52
- export { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, upsertOrganization };
61
+ export { UserProviderInfo, addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, getUserProvidersFromDb, upsertOrganization };
@@ -1,5 +1,5 @@
1
- import { invitation, member, organization } from "../../auth/auth-schema.js";
2
- import { and, desc, eq, or } from "drizzle-orm";
1
+ import { account, invitation, member, organization } from "../../auth/auth-schema.js";
2
+ import { and, desc, eq, inArray, or } from "drizzle-orm";
3
3
 
4
4
  //#region src/data-access/runtime/organizations.ts
5
5
  /**
@@ -70,6 +70,27 @@ const upsertOrganization = (db) => async (data) => {
70
70
  });
71
71
  return { created: true };
72
72
  };
73
+ /**
74
+ * Get authentication providers for a list of users.
75
+ * Returns which providers each user has linked (e.g., 'credential', 'google', 'auth0').
76
+ */
77
+ const getUserProvidersFromDb = (db) => async (userIds) => {
78
+ if (userIds.length === 0) return [];
79
+ const accounts = await db.select({
80
+ userId: account.userId,
81
+ providerId: account.providerId
82
+ }).from(account).where(inArray(account.userId, userIds));
83
+ const providerMap = /* @__PURE__ */ new Map();
84
+ for (const acc of accounts) {
85
+ const existing = providerMap.get(acc.userId) || [];
86
+ if (!existing.includes(acc.providerId)) existing.push(acc.providerId);
87
+ providerMap.set(acc.userId, existing);
88
+ }
89
+ return userIds.map((userId) => ({
90
+ userId,
91
+ providers: providerMap.get(userId) || []
92
+ }));
93
+ };
73
94
 
74
95
  //#endregion
75
- export { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, upsertOrganization };
96
+ export { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, getUserProvidersFromDb, upsertOrganization };
@@ -7,20 +7,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
9
  id: string;
10
- contextId: string;
11
- metadata: TaskMetadataConfig | null;
12
10
  createdAt: string;
13
11
  updatedAt: string;
14
- projectId: string;
15
- tenantId: string;
16
- agentId: string;
17
12
  ref: {
18
13
  type: "commit" | "tag" | "branch";
19
14
  name: string;
20
15
  hash: string;
21
16
  } | null;
17
+ metadata: TaskMetadataConfig | null;
22
18
  status: string;
19
+ tenantId: string;
20
+ projectId: string;
21
+ agentId: string;
23
22
  subAgentId: string;
23
+ contextId: string;
24
24
  }>;
25
25
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
26
26
  id: string;