@inkeep/agents-core 0.0.0-dev-20260206080126 → 0.0.0-dev-20260206203908

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 (40) hide show
  1. package/dist/auth/auth-schema.d.ts +99 -82
  2. package/dist/auth/auth-schema.js +4 -3
  3. package/dist/auth/auth-validation-schemas.d.ts +34 -0
  4. package/dist/auth/auth.d.ts +56 -22
  5. package/dist/auth/auth.js +15 -1
  6. package/dist/auth/init.js +2 -2
  7. package/dist/auth/password-reset-link-store.d.ts +26 -0
  8. package/dist/auth/password-reset-link-store.js +40 -0
  9. package/dist/auth/permissions.d.ts +9 -9
  10. package/dist/client-exports.d.ts +4 -4
  11. package/dist/data-access/index.d.ts +3 -3
  12. package/dist/data-access/index.js +3 -3
  13. package/dist/data-access/manage/agents.d.ts +49 -49
  14. package/dist/data-access/manage/agents.js +4 -4
  15. package/dist/data-access/manage/artifactComponents.d.ts +14 -14
  16. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  17. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  18. package/dist/data-access/manage/functionTools.d.ts +16 -16
  19. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +30 -30
  20. package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
  21. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
  22. package/dist/data-access/manage/subAgents.d.ts +15 -15
  23. package/dist/data-access/manage/tools.d.ts +30 -30
  24. package/dist/data-access/manage/triggers.d.ts +2 -2
  25. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  26. package/dist/data-access/runtime/conversations.d.ts +31 -31
  27. package/dist/data-access/runtime/messages.d.ts +12 -12
  28. package/dist/data-access/runtime/organizations.d.ts +10 -1
  29. package/dist/data-access/runtime/organizations.js +24 -3
  30. package/dist/data-access/runtime/tasks.d.ts +7 -7
  31. package/dist/db/manage/manage-schema.d.ts +306 -306
  32. package/dist/db/runtime/runtime-schema.d.ts +212 -212
  33. package/dist/index.d.ts +4 -3
  34. package/dist/index.js +4 -3
  35. package/dist/validation/dolt-schemas.d.ts +1 -1
  36. package/dist/validation/schemas.d.ts +1540 -1540
  37. package/drizzle/runtime/0011_colorful_vivisector.sql +50 -0
  38. package/drizzle/runtime/meta/0011_snapshot.json +3088 -0
  39. package/drizzle/runtime/meta/_journal.json +7 -0
  40. package/package.json +5 -1
@@ -15,20 +15,20 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
15
15
  total: number;
16
16
  }>;
17
17
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
18
- metadata: ConversationMetadata | null;
18
+ tenantId: string;
19
+ projectId: string;
19
20
  id: string;
20
- userId: string | null;
21
+ title: string | null;
22
+ agentId: string | null;
21
23
  createdAt: string;
22
24
  updatedAt: string;
25
+ userId: string | null;
26
+ metadata: ConversationMetadata | null;
23
27
  ref: {
24
- type: "tag" | "commit" | "branch";
28
+ type: "commit" | "tag" | "branch";
25
29
  name: string;
26
30
  hash: string;
27
31
  } | null;
28
- agentId: string | null;
29
- projectId: string;
30
- tenantId: string;
31
- title: string | null;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
@@ -43,7 +43,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
43
43
  agentId: string | null;
44
44
  activeSubAgentId: string;
45
45
  ref: {
46
- type: "tag" | "commit" | "branch";
46
+ type: "commit" | "tag" | "branch";
47
47
  name: string;
48
48
  hash: string;
49
49
  } | null;
@@ -69,7 +69,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
69
69
  agentId: string | null;
70
70
  activeSubAgentId: string;
71
71
  ref: {
72
- type: "tag" | "commit" | "branch";
72
+ type: "commit" | "tag" | "branch";
73
73
  name: string;
74
74
  hash: string;
75
75
  } | null;
@@ -84,20 +84,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
84
84
  scopes: ProjectScopeConfig;
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
- metadata: ConversationMetadata | null;
87
+ tenantId: string;
88
+ projectId: string;
88
89
  id: string;
89
- userId: string | null;
90
+ title: string | null;
91
+ agentId: string | null;
90
92
  createdAt: string;
91
93
  updatedAt: string;
94
+ userId: string | null;
95
+ metadata: ConversationMetadata | null;
92
96
  ref: {
93
- type: "tag" | "commit" | "branch";
97
+ type: "commit" | "tag" | "branch";
94
98
  name: string;
95
99
  hash: string;
96
100
  } | null;
97
- agentId: string | null;
98
- projectId: string;
99
- tenantId: string;
100
- title: string | null;
101
101
  activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
103
103
  } | undefined>;
@@ -107,7 +107,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
107
107
  tenantId: string;
108
108
  id: string;
109
109
  ref: {
110
- type: "tag" | "commit" | "branch";
110
+ type: "commit" | "tag" | "branch";
111
111
  name: string;
112
112
  hash: string;
113
113
  };
@@ -120,20 +120,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
120
120
  metadata?: ConversationMetadata | null | undefined;
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
- metadata: ConversationMetadata | null;
123
+ tenantId: string;
124
+ projectId: string;
124
125
  id: string;
125
- userId: string | null;
126
+ title: string | null;
127
+ agentId: string | null;
126
128
  createdAt: string;
127
129
  updatedAt: string;
130
+ userId: string | null;
131
+ metadata: ConversationMetadata | null;
128
132
  ref: {
129
- type: "tag" | "commit" | "branch";
133
+ type: "commit" | "tag" | "branch";
130
134
  name: string;
131
135
  hash: string;
132
136
  } | null;
133
- agentId: string | null;
134
- projectId: string;
135
- tenantId: string;
136
- title: string | null;
137
137
  activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
139
139
  }>;
@@ -152,20 +152,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
152
152
  scopes: ProjectScopeConfig;
153
153
  conversationId: string;
154
154
  }) => Promise<{
155
- metadata: ConversationMetadata | null;
155
+ tenantId: string;
156
+ projectId: string;
156
157
  id: string;
157
- userId: string | null;
158
+ title: string | null;
159
+ agentId: string | null;
158
160
  createdAt: string;
159
161
  updatedAt: string;
162
+ userId: string | null;
163
+ metadata: ConversationMetadata | null;
160
164
  ref: {
161
- type: "tag" | "commit" | "branch";
165
+ type: "commit" | "tag" | "branch";
162
166
  name: string;
163
167
  hash: string;
164
168
  } | null;
165
- agentId: string | null;
166
- projectId: string;
167
- tenantId: string;
168
- title: string | null;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
@@ -9,14 +9,14 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
9
9
  scopes: ProjectScopeConfig;
10
10
  messageId: string;
11
11
  }) => Promise<{
12
- metadata: MessageMetadata | null;
12
+ tenantId: string;
13
+ projectId: string;
13
14
  id: string;
14
- role: string;
15
15
  createdAt: string;
16
16
  updatedAt: string;
17
- projectId: string;
18
- tenantId: string;
17
+ metadata: MessageMetadata | null;
19
18
  content: MessageContent;
19
+ role: string;
20
20
  fromSubAgentId: string | null;
21
21
  toSubAgentId: string | null;
22
22
  fromExternalAgentId: string | null;
@@ -140,14 +140,14 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
140
140
  id: string;
141
141
  }[]>;
142
142
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
143
- metadata: MessageMetadata | null;
143
+ tenantId: string;
144
+ projectId: string;
144
145
  id: string;
145
- role: string;
146
146
  createdAt: string;
147
147
  updatedAt: string;
148
- projectId: string;
149
- tenantId: string;
148
+ metadata: MessageMetadata | null;
150
149
  content: MessageContent;
150
+ role: string;
151
151
  fromSubAgentId: string | null;
152
152
  toSubAgentId: string | null;
153
153
  fromExternalAgentId: string | null;
@@ -193,14 +193,14 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
193
193
  scopes: ProjectScopeConfig;
194
194
  messageId: string;
195
195
  }) => Promise<{
196
- metadata: MessageMetadata | null;
196
+ tenantId: string;
197
+ projectId: string;
197
198
  id: string;
198
- role: string;
199
199
  createdAt: string;
200
200
  updatedAt: string;
201
- projectId: string;
202
- tenantId: string;
201
+ metadata: MessageMetadata | null;
203
202
  content: MessageContent;
203
+ role: string;
204
204
  fromSubAgentId: string | null;
205
205
  toSubAgentId: string | null;
206
206
  fromExternalAgentId: 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 };
@@ -6,19 +6,19 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
6
6
 
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
- metadata: TaskMetadataConfig | null;
9
+ tenantId: string;
10
+ projectId: string;
10
11
  id: string;
12
+ agentId: string;
11
13
  createdAt: string;
12
14
  updatedAt: string;
13
- status: string;
15
+ metadata: TaskMetadataConfig | null;
14
16
  ref: {
15
- type: "tag" | "commit" | "branch";
17
+ type: "commit" | "tag" | "branch";
16
18
  name: string;
17
19
  hash: string;
18
20
  } | null;
19
- agentId: string;
20
- projectId: string;
21
- tenantId: string;
21
+ status: string;
22
22
  subAgentId: string;
23
23
  contextId: string;
24
24
  }>;
@@ -36,7 +36,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
36
36
  updatedAt: string;
37
37
  contextId: string;
38
38
  ref: {
39
- type: "tag" | "commit" | "branch";
39
+ type: "commit" | "tag" | "branch";
40
40
  name: string;
41
41
  hash: string;
42
42
  } | null;