@inkeep/agents-core 0.0.0-dev-20260331193203 → 0.0.0-dev-20260331194528
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/api-client/eval-api-client.d.ts +2 -12
- package/dist/api-client/eval-api-client.js +0 -15
- package/dist/api-client/index.d.ts +2 -2
- package/dist/auth/auth-schema.d.ts +108 -108
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- 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 +36 -36
- package/dist/data-access/manage/artifactComponents.d.ts +6 -6
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/evalConfig.d.ts +48 -2
- package/dist/data-access/manage/evalConfig.js +61 -3
- package/dist/data-access/manage/functionTools.d.ts +8 -8
- package/dist/data-access/manage/skills.d.ts +6 -6
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgentRelations.d.ts +14 -14
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgents.d.ts +12 -12
- package/dist/data-access/manage/tools.d.ts +9 -9
- package/dist/data-access/runtime/apiKeys.d.ts +8 -8
- package/dist/data-access/runtime/apps.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +32 -32
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +50 -5
- package/dist/data-access/runtime/scheduledTriggerInvocations.js +34 -1
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/db/manage/manage-schema.d.ts +723 -473
- package/dist/db/manage/manage-schema.js +153 -7
- package/dist/db/runtime/runtime-schema.d.ts +376 -376
- package/dist/dolt/backfill-skill-files.d.ts +41 -0
- package/dist/dolt/backfill-skill-files.js +209 -0
- package/dist/dolt/run-sql-file-on-all-branches.d.ts +29 -0
- package/dist/dolt/run-sql-file-on-all-branches.js +177 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +5 -5
- package/dist/types/entities.d.ts +8 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +4 -4
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas/skills.d.ts +36 -36
- package/dist/validation/schemas.d.ts +2714 -2572
- package/dist/validation/schemas.js +13 -15
- package/drizzle/manage/0017_brief_doctor_strange.sql +29 -0
- package/drizzle/manage/meta/0017_snapshot.json +3748 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/package.json +3 -1
|
@@ -11,6 +11,7 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
13
|
id: string;
|
|
14
|
+
conversationId: string;
|
|
14
15
|
createdAt: string;
|
|
15
16
|
updatedAt: string;
|
|
16
17
|
projectId: string;
|
|
@@ -22,14 +23,13 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
22
23
|
toSubAgentId: string | null;
|
|
23
24
|
fromExternalAgentId: string | null;
|
|
24
25
|
toExternalAgentId: string | null;
|
|
25
|
-
taskId: string | null;
|
|
26
|
-
a2aTaskId: string | null;
|
|
27
|
-
conversationId: string;
|
|
28
26
|
fromTeamAgentId: string | null;
|
|
29
27
|
toTeamAgentId: string | null;
|
|
30
28
|
visibility: string;
|
|
31
29
|
messageType: string;
|
|
30
|
+
taskId: string | null;
|
|
32
31
|
parentMessageId: string | null;
|
|
32
|
+
a2aTaskId: string | null;
|
|
33
33
|
a2aSessionId: string | null;
|
|
34
34
|
} | undefined>;
|
|
35
35
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -145,6 +145,7 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
147
|
id: string;
|
|
148
|
+
conversationId: string;
|
|
148
149
|
createdAt: string;
|
|
149
150
|
updatedAt: string;
|
|
150
151
|
projectId: string;
|
|
@@ -156,14 +157,13 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
156
157
|
toSubAgentId: string | null;
|
|
157
158
|
fromExternalAgentId: string | null;
|
|
158
159
|
toExternalAgentId: string | null;
|
|
159
|
-
taskId: string | null;
|
|
160
|
-
a2aTaskId: string | null;
|
|
161
|
-
conversationId: string;
|
|
162
160
|
fromTeamAgentId: string | null;
|
|
163
161
|
toTeamAgentId: string | null;
|
|
164
162
|
visibility: string;
|
|
165
163
|
messageType: string;
|
|
164
|
+
taskId: string | null;
|
|
166
165
|
parentMessageId: string | null;
|
|
166
|
+
a2aTaskId: string | null;
|
|
167
167
|
a2aSessionId: string | null;
|
|
168
168
|
}>;
|
|
169
169
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -198,6 +198,7 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
200
|
id: string;
|
|
201
|
+
conversationId: string;
|
|
201
202
|
createdAt: string;
|
|
202
203
|
updatedAt: string;
|
|
203
204
|
projectId: string;
|
|
@@ -209,14 +210,13 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
209
210
|
toSubAgentId: string | null;
|
|
210
211
|
fromExternalAgentId: string | null;
|
|
211
212
|
toExternalAgentId: string | null;
|
|
212
|
-
taskId: string | null;
|
|
213
|
-
a2aTaskId: string | null;
|
|
214
|
-
conversationId: string;
|
|
215
213
|
fromTeamAgentId: string | null;
|
|
216
214
|
toTeamAgentId: string | null;
|
|
217
215
|
visibility: string;
|
|
218
216
|
messageType: string;
|
|
217
|
+
taskId: string | null;
|
|
219
218
|
parentMessageId: string | null;
|
|
219
|
+
a2aTaskId: string | null;
|
|
220
220
|
a2aSessionId: string | null;
|
|
221
221
|
}>;
|
|
222
222
|
declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
1
|
+
import { AgentScopeConfig, ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
2
|
import { PaginationConfig } from "../../types/utility.js";
|
|
3
3
|
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
4
4
|
import { ScheduledTriggerInvocationStatus } from "../../validation/schemas.js";
|
|
@@ -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" | "running" | "completed" | "failed" | "cancelled";
|
|
44
44
|
scheduledFor: string;
|
|
45
45
|
startedAt: string | null;
|
|
46
46
|
completedAt: string | null;
|
|
@@ -194,7 +194,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
194
194
|
name: string;
|
|
195
195
|
hash: string;
|
|
196
196
|
} | null;
|
|
197
|
-
status: "pending" | "
|
|
197
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
198
198
|
scheduledFor: string;
|
|
199
199
|
startedAt: string | null;
|
|
200
200
|
completedAt: string | null;
|
|
@@ -233,7 +233,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
233
233
|
name: string;
|
|
234
234
|
hash: string;
|
|
235
235
|
} | null;
|
|
236
|
-
status: "pending" | "
|
|
236
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
237
237
|
scheduledFor: string;
|
|
238
238
|
startedAt: string | null;
|
|
239
239
|
completedAt: string | null;
|
|
@@ -254,5 +254,50 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
254
254
|
pages: number;
|
|
255
255
|
};
|
|
256
256
|
}>;
|
|
257
|
+
/**
|
|
258
|
+
* Get status summary for all invocations with a given scheduledTriggerId.
|
|
259
|
+
* Used for dataset run status aggregation where scheduledTriggerId = datasetRunId.
|
|
260
|
+
*/
|
|
261
|
+
declare const getScheduledTriggerInvocationStatusSummary: (db: AgentsRunDatabaseClient) => (params: {
|
|
262
|
+
scopes: ProjectScopeConfig;
|
|
263
|
+
scheduledTriggerId: string;
|
|
264
|
+
}) => Promise<{
|
|
265
|
+
pending: number;
|
|
266
|
+
running: number;
|
|
267
|
+
completed: number;
|
|
268
|
+
failed: number;
|
|
269
|
+
cancelled: number;
|
|
270
|
+
}>;
|
|
271
|
+
/**
|
|
272
|
+
* List invocations by scheduledTriggerId without agentId filter (project-scoped).
|
|
273
|
+
* Used for dataset run items listing where scheduledTriggerId = datasetRunId.
|
|
274
|
+
*/
|
|
275
|
+
declare const listScheduledTriggerInvocationsByTriggerId: (db: AgentsRunDatabaseClient) => (params: {
|
|
276
|
+
scopes: ProjectScopeConfig;
|
|
277
|
+
scheduledTriggerId: string;
|
|
278
|
+
filters?: {
|
|
279
|
+
status?: string;
|
|
280
|
+
};
|
|
281
|
+
}) => Promise<{
|
|
282
|
+
scheduledTriggerId: string;
|
|
283
|
+
ref: {
|
|
284
|
+
type: "commit" | "tag" | "branch";
|
|
285
|
+
name: string;
|
|
286
|
+
hash: string;
|
|
287
|
+
} | null;
|
|
288
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
289
|
+
scheduledFor: string;
|
|
290
|
+
startedAt: string | null;
|
|
291
|
+
completedAt: string | null;
|
|
292
|
+
resolvedPayload: Record<string, unknown> | null;
|
|
293
|
+
conversationIds: string[] | null;
|
|
294
|
+
attemptNumber: number;
|
|
295
|
+
idempotencyKey: string;
|
|
296
|
+
createdAt: string;
|
|
297
|
+
agentId: string;
|
|
298
|
+
projectId: string;
|
|
299
|
+
tenantId: string;
|
|
300
|
+
id: string;
|
|
301
|
+
}[]>;
|
|
257
302
|
//#endregion
|
|
258
|
-
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|
|
303
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerInvocationStatusSummary, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsByTriggerId, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|
|
@@ -223,6 +223,39 @@ const listProjectScheduledTriggerInvocationsPaginated = (db) => async (params) =
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
+
/**
|
|
227
|
+
* Get status summary for all invocations with a given scheduledTriggerId.
|
|
228
|
+
* Used for dataset run status aggregation where scheduledTriggerId = datasetRunId.
|
|
229
|
+
*/
|
|
230
|
+
const getScheduledTriggerInvocationStatusSummary = (db) => async (params) => {
|
|
231
|
+
return (await db.select({
|
|
232
|
+
status: scheduledTriggerInvocations.status,
|
|
233
|
+
cnt: count()
|
|
234
|
+
}).from(scheduledTriggerInvocations).where(and(eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId), eq(scheduledTriggerInvocations.projectId, params.scopes.projectId), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId))).groupBy(scheduledTriggerInvocations.status)).reduce((acc, { status, cnt }) => {
|
|
235
|
+
const key = status;
|
|
236
|
+
if (key in acc) acc[key] += Number(cnt);
|
|
237
|
+
return acc;
|
|
238
|
+
}, {
|
|
239
|
+
pending: 0,
|
|
240
|
+
running: 0,
|
|
241
|
+
completed: 0,
|
|
242
|
+
failed: 0,
|
|
243
|
+
cancelled: 0
|
|
244
|
+
});
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* List invocations by scheduledTriggerId without agentId filter (project-scoped).
|
|
248
|
+
* Used for dataset run items listing where scheduledTriggerId = datasetRunId.
|
|
249
|
+
*/
|
|
250
|
+
const listScheduledTriggerInvocationsByTriggerId = (db) => async (params) => {
|
|
251
|
+
const conditions = [
|
|
252
|
+
eq(scheduledTriggerInvocations.tenantId, params.scopes.tenantId),
|
|
253
|
+
eq(scheduledTriggerInvocations.projectId, params.scopes.projectId),
|
|
254
|
+
eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId)
|
|
255
|
+
];
|
|
256
|
+
if (params.filters?.status) conditions.push(eq(scheduledTriggerInvocations.status, params.filters.status));
|
|
257
|
+
return await db.select().from(scheduledTriggerInvocations).where(and(...conditions)).orderBy(asc(scheduledTriggerInvocations.createdAt));
|
|
258
|
+
};
|
|
226
259
|
|
|
227
260
|
//#endregion
|
|
228
|
-
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|
|
261
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerInvocationStatusSummary, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsByTriggerId, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|
|
@@ -8,18 +8,18 @@ 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
|
+
ref: {
|
|
12
|
+
type: "commit" | "tag" | "branch";
|
|
13
|
+
name: string;
|
|
14
|
+
hash: string;
|
|
15
|
+
} | null;
|
|
11
16
|
createdAt: string;
|
|
12
17
|
updatedAt: string;
|
|
13
|
-
agentId: string;
|
|
14
18
|
projectId: string;
|
|
15
19
|
tenantId: string;
|
|
20
|
+
agentId: string;
|
|
16
21
|
metadata: TaskMetadataConfig | null;
|
|
17
22
|
subAgentId: string;
|
|
18
|
-
ref: {
|
|
19
|
-
type: "commit" | "tag" | "branch";
|
|
20
|
-
name: string;
|
|
21
|
-
hash: string;
|
|
22
|
-
} | null;
|
|
23
23
|
status: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|