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

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 (39) 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 +52 -18
  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 +1 -1
  11. package/dist/constants/models.d.ts +2 -0
  12. package/dist/constants/models.js +2 -0
  13. package/dist/data-access/index.d.ts +3 -3
  14. package/dist/data-access/index.js +3 -3
  15. package/dist/data-access/manage/agents.d.ts +9 -9
  16. package/dist/data-access/manage/agents.js +4 -4
  17. package/dist/data-access/manage/artifactComponents.d.ts +2 -2
  18. package/dist/data-access/manage/functionTools.d.ts +4 -4
  19. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  20. package/dist/data-access/manage/subAgentRelations.d.ts +4 -4
  21. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
  22. package/dist/data-access/manage/subAgents.d.ts +3 -3
  23. package/dist/data-access/manage/tools.d.ts +12 -12
  24. package/dist/data-access/manage/triggers.d.ts +2 -2
  25. package/dist/data-access/runtime/apiKeys.d.ts +4 -4
  26. package/dist/data-access/runtime/conversations.d.ts +8 -8
  27. package/dist/data-access/runtime/messages.d.ts +6 -6
  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 +2 -2
  31. package/dist/db/manage/manage-schema.d.ts +306 -306
  32. package/dist/db/runtime/runtime-schema.d.ts +204 -204
  33. package/dist/index.d.ts +4 -3
  34. package/dist/index.js +4 -3
  35. package/dist/validation/schemas.d.ts +1340 -1340
  36. package/drizzle/runtime/0011_colorful_vivisector.sql +50 -0
  37. package/drizzle/runtime/meta/0011_snapshot.json +3088 -0
  38. package/drizzle/runtime/meta/_journal.json +7 -0
  39. package/package.json +5 -1
@@ -9,11 +9,11 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
9
9
  scopes: ProjectScopeConfig;
10
10
  messageId: string;
11
11
  }) => Promise<{
12
- metadata: MessageMetadata | null;
13
12
  id: string;
14
- role: string;
15
13
  createdAt: string;
16
14
  updatedAt: string;
15
+ metadata: MessageMetadata | null;
16
+ role: string;
17
17
  projectId: string;
18
18
  tenantId: string;
19
19
  content: MessageContent;
@@ -140,11 +140,11 @@ 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;
144
143
  id: string;
145
- role: string;
146
144
  createdAt: string;
147
145
  updatedAt: string;
146
+ metadata: MessageMetadata | null;
147
+ role: string;
148
148
  projectId: string;
149
149
  tenantId: string;
150
150
  content: MessageContent;
@@ -193,11 +193,11 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
193
193
  scopes: ProjectScopeConfig;
194
194
  messageId: string;
195
195
  }) => Promise<{
196
- metadata: MessageMetadata | null;
197
196
  id: string;
198
- role: string;
199
197
  createdAt: string;
200
198
  updatedAt: string;
199
+ metadata: MessageMetadata | null;
200
+ role: string;
201
201
  projectId: string;
202
202
  tenantId: string;
203
203
  content: MessageContent;
@@ -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,16 +6,16 @@ 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;
10
9
  id: string;
11
10
  createdAt: string;
12
11
  updatedAt: string;
13
- status: string;
14
12
  ref: {
15
13
  type: "tag" | "commit" | "branch";
16
14
  name: string;
17
15
  hash: string;
18
16
  } | null;
17
+ metadata: TaskMetadataConfig | null;
18
+ status: string;
19
19
  agentId: string;
20
20
  projectId: string;
21
21
  tenantId: string;