@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.
- package/dist/auth/auth-schema.d.ts +99 -82
- package/dist/auth/auth-schema.js +4 -3
- package/dist/auth/auth-validation-schemas.d.ts +34 -0
- package/dist/auth/auth.d.ts +56 -22
- package/dist/auth/auth.js +15 -1
- package/dist/auth/init.js +2 -2
- package/dist/auth/password-reset-link-store.d.ts +26 -0
- package/dist/auth/password-reset-link-store.js +40 -0
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +4 -4
- package/dist/data-access/index.d.ts +3 -3
- package/dist/data-access/index.js +3 -3
- package/dist/data-access/manage/agents.d.ts +49 -49
- package/dist/data-access/manage/agents.js +4 -4
- package/dist/data-access/manage/artifactComponents.d.ts +14 -14
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +16 -16
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +30 -30
- package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +30 -30
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +20 -20
- package/dist/data-access/runtime/conversations.d.ts +31 -31
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/organizations.d.ts +10 -1
- package/dist/data-access/runtime/organizations.js +24 -3
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/db/manage/manage-schema.d.ts +306 -306
- package/dist/db/runtime/runtime-schema.d.ts +212 -212
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -3
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/schemas.d.ts +1540 -1540
- package/drizzle/runtime/0011_colorful_vivisector.sql +50 -0
- package/drizzle/runtime/meta/0011_snapshot.json +3088 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- 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
|
-
|
|
18
|
+
tenantId: string;
|
|
19
|
+
projectId: string;
|
|
19
20
|
id: string;
|
|
20
|
-
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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
|
-
|
|
87
|
+
tenantId: string;
|
|
88
|
+
projectId: string;
|
|
88
89
|
id: string;
|
|
89
|
-
|
|
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: "
|
|
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: "
|
|
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
|
-
|
|
123
|
+
tenantId: string;
|
|
124
|
+
projectId: string;
|
|
124
125
|
id: string;
|
|
125
|
-
|
|
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: "
|
|
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
|
-
|
|
155
|
+
tenantId: string;
|
|
156
|
+
projectId: string;
|
|
156
157
|
id: string;
|
|
157
|
-
|
|
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: "
|
|
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
|
-
|
|
12
|
+
tenantId: string;
|
|
13
|
+
projectId: string;
|
|
13
14
|
id: string;
|
|
14
|
-
role: string;
|
|
15
15
|
createdAt: string;
|
|
16
16
|
updatedAt: string;
|
|
17
|
-
|
|
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
|
-
|
|
143
|
+
tenantId: string;
|
|
144
|
+
projectId: string;
|
|
144
145
|
id: string;
|
|
145
|
-
role: string;
|
|
146
146
|
createdAt: string;
|
|
147
147
|
updatedAt: string;
|
|
148
|
-
|
|
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
|
-
|
|
196
|
+
tenantId: string;
|
|
197
|
+
projectId: string;
|
|
197
198
|
id: string;
|
|
198
|
-
role: string;
|
|
199
199
|
createdAt: string;
|
|
200
200
|
updatedAt: string;
|
|
201
|
-
|
|
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
|
-
|
|
9
|
+
tenantId: string;
|
|
10
|
+
projectId: string;
|
|
10
11
|
id: string;
|
|
12
|
+
agentId: string;
|
|
11
13
|
createdAt: string;
|
|
12
14
|
updatedAt: string;
|
|
13
|
-
|
|
15
|
+
metadata: TaskMetadataConfig | null;
|
|
14
16
|
ref: {
|
|
15
|
-
type: "
|
|
17
|
+
type: "commit" | "tag" | "branch";
|
|
16
18
|
name: string;
|
|
17
19
|
hash: string;
|
|
18
20
|
} | null;
|
|
19
|
-
|
|
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: "
|
|
39
|
+
type: "commit" | "tag" | "branch";
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|