@inkeep/agents-core 0.78.4 → 0.79.0
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 +227 -227
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/auth.d.ts +9 -9
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +2 -2
- package/dist/data-access/manage/agents.d.ts +16 -16
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +16 -16
- package/dist/data-access/manage/skills.d.ts +12 -12
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +26 -26
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +12 -12
- package/dist/data-access/manage/tools.d.ts +24 -24
- package/dist/data-access/manage/triggers.d.ts +4 -4
- package/dist/data-access/manage/webhookDestinations.d.ts +2 -1
- package/dist/data-access/runtime/apiKeys.d.ts +20 -20
- package/dist/data-access/runtime/apps.d.ts +17 -17
- package/dist/data-access/runtime/conversations.d.ts +32 -32
- package/dist/data-access/runtime/evalRuns.d.ts +47 -6
- package/dist/data-access/runtime/evalRuns.js +96 -6
- package/dist/data-access/runtime/events.d.ts +5 -5
- package/dist/data-access/runtime/feedback.d.ts +8 -8
- package/dist/data-access/runtime/messages.d.ts +27 -27
- package/dist/data-access/runtime/organizations.d.ts +4 -3
- package/dist/data-access/runtime/organizations.js +5 -4
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +5 -5
- package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +2 -2
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/db/manage/manage-schema.d.ts +525 -506
- package/dist/db/manage/manage-schema.js +2 -1
- package/dist/db/runtime/runtime-schema.d.ts +452 -452
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/shared.d.ts +1 -0
- package/dist/validation/schemas/shared.js +2 -1
- package/dist/validation/schemas/skills.d.ts +46 -45
- package/dist/validation/schemas.d.ts +2314 -2241
- package/dist/validation/schemas.js +6 -2
- package/drizzle/manage/0024_blue_junta.sql +2 -0
- package/drizzle/manage/meta/0024_snapshot.json +4323 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -11,27 +11,27 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
13
|
id: string;
|
|
14
|
-
tenantId: string;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
metadata: MessageMetadata | null;
|
|
17
|
-
properties: Record<string, unknown> | null;
|
|
18
14
|
content: MessageContent;
|
|
19
|
-
|
|
15
|
+
metadata: MessageMetadata | null;
|
|
16
|
+
createdAt: string;
|
|
20
17
|
updatedAt: string;
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
projectId: string;
|
|
19
|
+
tenantId: string;
|
|
20
|
+
properties: Record<string, unknown> | null;
|
|
23
21
|
role: string;
|
|
24
22
|
fromSubAgentId: string | null;
|
|
25
23
|
toSubAgentId: string | null;
|
|
26
24
|
fromExternalAgentId: string | null;
|
|
27
25
|
toExternalAgentId: string | null;
|
|
26
|
+
taskId: string | null;
|
|
27
|
+
a2aTaskId: string | null;
|
|
28
|
+
conversationId: string;
|
|
29
|
+
userProperties: Record<string, unknown> | null;
|
|
28
30
|
fromTeamAgentId: string | null;
|
|
29
31
|
toTeamAgentId: string | null;
|
|
30
32
|
visibility: string;
|
|
31
33
|
messageType: string;
|
|
32
|
-
taskId: string | null;
|
|
33
34
|
parentMessageId: string | null;
|
|
34
|
-
a2aTaskId: string | null;
|
|
35
35
|
a2aSessionId: string | null;
|
|
36
36
|
} | undefined>;
|
|
37
37
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -184,27 +184,27 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
184
184
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
185
185
|
}) => Promise<{
|
|
186
186
|
id: string;
|
|
187
|
-
tenantId: string;
|
|
188
|
-
createdAt: string;
|
|
189
|
-
metadata: MessageMetadata | null;
|
|
190
|
-
properties: Record<string, unknown> | null;
|
|
191
187
|
content: MessageContent;
|
|
192
|
-
|
|
188
|
+
metadata: MessageMetadata | null;
|
|
189
|
+
createdAt: string;
|
|
193
190
|
updatedAt: string;
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
projectId: string;
|
|
192
|
+
tenantId: string;
|
|
193
|
+
properties: Record<string, unknown> | null;
|
|
196
194
|
role: string;
|
|
197
195
|
fromSubAgentId: string | null;
|
|
198
196
|
toSubAgentId: string | null;
|
|
199
197
|
fromExternalAgentId: string | null;
|
|
200
198
|
toExternalAgentId: string | null;
|
|
199
|
+
taskId: string | null;
|
|
200
|
+
a2aTaskId: string | null;
|
|
201
|
+
conversationId: string;
|
|
202
|
+
userProperties: Record<string, unknown> | null;
|
|
201
203
|
fromTeamAgentId: string | null;
|
|
202
204
|
toTeamAgentId: string | null;
|
|
203
205
|
visibility: string;
|
|
204
206
|
messageType: string;
|
|
205
|
-
taskId: string | null;
|
|
206
207
|
parentMessageId: string | null;
|
|
207
|
-
a2aTaskId: string | null;
|
|
208
208
|
a2aSessionId: string | null;
|
|
209
209
|
}>;
|
|
210
210
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -241,27 +241,27 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
241
241
|
messageId: string;
|
|
242
242
|
}) => Promise<{
|
|
243
243
|
id: string;
|
|
244
|
-
tenantId: string;
|
|
245
|
-
createdAt: string;
|
|
246
|
-
metadata: MessageMetadata | null;
|
|
247
|
-
properties: Record<string, unknown> | null;
|
|
248
244
|
content: MessageContent;
|
|
249
|
-
|
|
245
|
+
metadata: MessageMetadata | null;
|
|
246
|
+
createdAt: string;
|
|
250
247
|
updatedAt: string;
|
|
251
|
-
|
|
252
|
-
|
|
248
|
+
projectId: string;
|
|
249
|
+
tenantId: string;
|
|
250
|
+
properties: Record<string, unknown> | null;
|
|
253
251
|
role: string;
|
|
254
252
|
fromSubAgentId: string | null;
|
|
255
253
|
toSubAgentId: string | null;
|
|
256
254
|
fromExternalAgentId: string | null;
|
|
257
255
|
toExternalAgentId: string | null;
|
|
256
|
+
taskId: string | null;
|
|
257
|
+
a2aTaskId: string | null;
|
|
258
|
+
conversationId: string;
|
|
259
|
+
userProperties: Record<string, unknown> | null;
|
|
258
260
|
fromTeamAgentId: string | null;
|
|
259
261
|
toTeamAgentId: string | null;
|
|
260
262
|
visibility: string;
|
|
261
263
|
messageType: string;
|
|
262
|
-
taskId: string | null;
|
|
263
264
|
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
|
|
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
|
|
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) || [];
|
|
@@ -40,7 +40,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|
|
43
|
-
status: "pending" | "
|
|
43
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
44
44
|
scheduledFor: string;
|
|
45
45
|
startedAt: string | null;
|
|
46
46
|
completedAt: string | null;
|
|
@@ -199,7 +199,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
199
199
|
name: string;
|
|
200
200
|
hash: string;
|
|
201
201
|
} | null;
|
|
202
|
-
status: "pending" | "
|
|
202
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
203
203
|
scheduledFor: string;
|
|
204
204
|
startedAt: string | null;
|
|
205
205
|
completedAt: string | null;
|
|
@@ -239,7 +239,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
239
239
|
name: string;
|
|
240
240
|
hash: string;
|
|
241
241
|
} | null;
|
|
242
|
-
status: "pending" | "
|
|
242
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
243
243
|
scheduledFor: string;
|
|
244
244
|
startedAt: string | null;
|
|
245
245
|
completedAt: string | null;
|
|
@@ -292,7 +292,7 @@ declare const listScheduledTriggerInvocationsByTriggerId: (db: AgentsRunDatabase
|
|
|
292
292
|
name: string;
|
|
293
293
|
hash: string;
|
|
294
294
|
} | null;
|
|
295
|
-
status: "pending" | "
|
|
295
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
296
296
|
scheduledFor: string;
|
|
297
297
|
startedAt: string | null;
|
|
298
298
|
completedAt: string | null;
|
|
@@ -320,7 +320,7 @@ declare const listScheduledTriggerInvocationsByDatasetRunId: (db: AgentsRunDatab
|
|
|
320
320
|
name: string;
|
|
321
321
|
hash: string;
|
|
322
322
|
} | null;
|
|
323
|
-
status: "pending" | "
|
|
323
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
324
324
|
scheduledFor: string;
|
|
325
325
|
startedAt: string | null;
|
|
326
326
|
completedAt: string | null;
|
|
@@ -15,10 +15,10 @@ declare const createScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (para
|
|
|
15
15
|
scheduledTriggerId: string;
|
|
16
16
|
userId: string;
|
|
17
17
|
}) => Promise<{
|
|
18
|
-
tenantId: string;
|
|
19
18
|
createdAt: string;
|
|
20
|
-
|
|
19
|
+
tenantId: string;
|
|
21
20
|
userId: string;
|
|
21
|
+
scheduledTriggerId: string;
|
|
22
22
|
}>;
|
|
23
23
|
declare const deleteScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (params: {
|
|
24
24
|
tenantId: string;
|
|
@@ -8,19 +8,19 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
8
8
|
//#region src/data-access/runtime/tasks.d.ts
|
|
9
9
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
10
10
|
id: string;
|
|
11
|
-
tenantId: string;
|
|
12
|
-
createdAt: string;
|
|
13
11
|
metadata: TaskMetadataConfig | null;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
agentId: string;
|
|
17
|
+
subAgentId: string;
|
|
14
18
|
ref: {
|
|
15
19
|
type: "commit" | "tag" | "branch";
|
|
16
20
|
name: string;
|
|
17
21
|
hash: string;
|
|
18
22
|
} | null;
|
|
19
23
|
status: string;
|
|
20
|
-
agentId: string;
|
|
21
|
-
projectId: string;
|
|
22
|
-
subAgentId: string;
|
|
23
|
-
updatedAt: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|