@inkeep/agents-core 0.0.0-dev-20260406151446 → 0.0.0-dev-20260406161920
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 +108 -108
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/permissions.d.ts +9 -9
- 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 +21 -21
- package/dist/data-access/manage/artifactComponents.d.ts +6 -6
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +6 -6
- package/dist/data-access/manage/projectLifecycle.d.ts +6 -6
- package/dist/data-access/manage/projectLifecycle.js +42 -21
- package/dist/data-access/manage/skills.d.ts +10 -10
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +18 -18
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +8 -8
- package/dist/data-access/runtime/cascade-delete.d.ts +2 -3
- package/dist/data-access/runtime/cascade-delete.js +10 -10
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/dolt-safe-jsonb.d.ts +2 -2
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +395 -395
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +37 -37
- package/dist/validation/schemas.d.ts +1910 -1910
- package/package.json +1 -1
|
@@ -8,13 +8,13 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
8
8
|
type: AppType;
|
|
9
9
|
id: string;
|
|
10
10
|
name: string;
|
|
11
|
+
description: string | null;
|
|
11
12
|
createdAt: string;
|
|
12
13
|
updatedAt: string;
|
|
13
|
-
description: string | null;
|
|
14
|
-
projectId: string | null;
|
|
15
14
|
tenantId: string | null;
|
|
16
15
|
enabled: boolean;
|
|
17
16
|
prompt: string | null;
|
|
17
|
+
projectId: string | null;
|
|
18
18
|
config: {
|
|
19
19
|
type: "web_client";
|
|
20
20
|
webClient: {
|
|
@@ -32,9 +32,9 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
32
32
|
type: "api";
|
|
33
33
|
api: Record<string, never>;
|
|
34
34
|
};
|
|
35
|
-
lastUsedAt: string | null;
|
|
36
|
-
defaultProjectId: string | null;
|
|
37
35
|
defaultAgentId: string | null;
|
|
36
|
+
defaultProjectId: string | null;
|
|
37
|
+
lastUsedAt: string | null;
|
|
38
38
|
} | undefined>;
|
|
39
39
|
declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
|
|
40
40
|
declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -64,13 +64,13 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
64
64
|
type: AppType;
|
|
65
65
|
id: string;
|
|
66
66
|
name: string;
|
|
67
|
+
description: string | null;
|
|
67
68
|
createdAt: string;
|
|
68
69
|
updatedAt: string;
|
|
69
|
-
description: string | null;
|
|
70
|
-
projectId: string | null;
|
|
71
70
|
tenantId: string | null;
|
|
72
71
|
enabled: boolean;
|
|
73
72
|
prompt: string | null;
|
|
73
|
+
projectId: string | null;
|
|
74
74
|
config: {
|
|
75
75
|
type: "web_client";
|
|
76
76
|
webClient: {
|
|
@@ -88,9 +88,9 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
88
88
|
type: "api";
|
|
89
89
|
api: Record<string, never>;
|
|
90
90
|
};
|
|
91
|
-
lastUsedAt: string | null;
|
|
92
|
-
defaultProjectId: string | null;
|
|
93
91
|
defaultAgentId: string | null;
|
|
92
|
+
defaultProjectId: string | null;
|
|
93
|
+
lastUsedAt: string | null;
|
|
94
94
|
}>;
|
|
95
95
|
declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
96
96
|
scopes: TenantScopeConfig;
|
|
@@ -34,8 +34,8 @@ declare const cascadeDeleteByBranch: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
34
34
|
ref: string;
|
|
35
35
|
}) => Promise<CascadeDeleteResult>;
|
|
36
36
|
/**
|
|
37
|
-
* Delete all runtime entities for a project
|
|
38
|
-
* Used when deleting a project
|
|
37
|
+
* Delete all runtime entities for a project across all branches.
|
|
38
|
+
* Used when deleting a project entirely.
|
|
39
39
|
* PostgreSQL cascades handle: messages, taskRelations, ledgerArtifacts
|
|
40
40
|
*
|
|
41
41
|
* @param db - Runtime database client
|
|
@@ -43,7 +43,6 @@ declare const cascadeDeleteByBranch: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
43
43
|
*/
|
|
44
44
|
declare const cascadeDeleteByProject: (db: AgentsRunDatabaseClient) => (params: {
|
|
45
45
|
scopes: ProjectScopeConfig;
|
|
46
|
-
fullBranchName: string;
|
|
47
46
|
}) => Promise<CascadeDeleteResult>;
|
|
48
47
|
/**
|
|
49
48
|
* Delete all runtime entities for a specific agent on a specific branch.
|
|
@@ -40,22 +40,22 @@ const cascadeDeleteByBranch = (db) => async (params) => {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
|
-
* Delete all runtime entities for a project
|
|
44
|
-
* Used when deleting a project
|
|
43
|
+
* Delete all runtime entities for a project across all branches.
|
|
44
|
+
* Used when deleting a project entirely.
|
|
45
45
|
* PostgreSQL cascades handle: messages, taskRelations, ledgerArtifacts
|
|
46
46
|
*
|
|
47
47
|
* @param db - Runtime database client
|
|
48
48
|
* @returns Function that performs the cascade delete
|
|
49
49
|
*/
|
|
50
50
|
const cascadeDeleteByProject = (db) => async (params) => {
|
|
51
|
-
const { scopes
|
|
52
|
-
const contextCacheResult = await db.delete(contextCache).where(
|
|
53
|
-
const conversationsResult = await db.delete(conversations).where(
|
|
54
|
-
const tasksResult = await db.delete(tasks).where(
|
|
55
|
-
const triggerInvocationsResult = await db.delete(triggerInvocations).where(and(eq(triggerInvocations.tenantId, scopes.tenantId), eq(triggerInvocations.projectId, scopes.projectId)
|
|
56
|
-
const scheduledTriggerInvocationsResult = await db.delete(scheduledTriggerInvocations).where(and(eq(scheduledTriggerInvocations.tenantId, scopes.tenantId), eq(scheduledTriggerInvocations.projectId, scopes.projectId)
|
|
57
|
-
const datasetRunsResult = await db.delete(datasetRun).where(and(eq(datasetRun.tenantId, scopes.tenantId), eq(datasetRun.projectId, scopes.projectId)
|
|
58
|
-
const evaluationRunsResult = await db.delete(evaluationRun).where(and(eq(evaluationRun.tenantId, scopes.tenantId), eq(evaluationRun.projectId, scopes.projectId)
|
|
51
|
+
const { scopes } = params;
|
|
52
|
+
const contextCacheResult = await db.delete(contextCache).where(projectScopedWhere(contextCache, scopes)).returning();
|
|
53
|
+
const conversationsResult = await db.delete(conversations).where(projectScopedWhere(conversations, scopes)).returning();
|
|
54
|
+
const tasksResult = await db.delete(tasks).where(projectScopedWhere(tasks, scopes)).returning();
|
|
55
|
+
const triggerInvocationsResult = await db.delete(triggerInvocations).where(and(eq(triggerInvocations.tenantId, scopes.tenantId), eq(triggerInvocations.projectId, scopes.projectId))).returning();
|
|
56
|
+
const scheduledTriggerInvocationsResult = await db.delete(scheduledTriggerInvocations).where(and(eq(scheduledTriggerInvocations.tenantId, scopes.tenantId), eq(scheduledTriggerInvocations.projectId, scopes.projectId))).returning();
|
|
57
|
+
const datasetRunsResult = await db.delete(datasetRun).where(and(eq(datasetRun.tenantId, scopes.tenantId), eq(datasetRun.projectId, scopes.projectId))).returning();
|
|
58
|
+
const evaluationRunsResult = await db.delete(evaluationRun).where(and(eq(evaluationRun.tenantId, scopes.tenantId), eq(evaluationRun.projectId, scopes.projectId))).returning();
|
|
59
59
|
const apiKeysResult = await db.delete(apiKeys).where(projectScopedWhere(apiKeys, scopes)).returning();
|
|
60
60
|
await cascadeDeleteGitHubAccessByProject(db)({
|
|
61
61
|
tenantId: scopes.tenantId,
|
|
@@ -16,19 +16,19 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
18
|
id: string;
|
|
19
|
-
createdAt: string;
|
|
20
|
-
updatedAt: string;
|
|
21
19
|
ref: {
|
|
22
20
|
type: "commit" | "tag" | "branch";
|
|
23
21
|
name: string;
|
|
24
22
|
hash: string;
|
|
25
23
|
} | null;
|
|
26
|
-
userId: string | null;
|
|
27
|
-
metadata: ConversationMetadata | null;
|
|
28
|
-
projectId: string;
|
|
29
|
-
tenantId: string;
|
|
30
24
|
title: string | null;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
tenantId: string;
|
|
28
|
+
projectId: string;
|
|
31
29
|
agentId: string | null;
|
|
30
|
+
userId: string | null;
|
|
31
|
+
metadata: ConversationMetadata | null;
|
|
32
32
|
activeSubAgentId: string;
|
|
33
33
|
lastContextResolution: string | null;
|
|
34
34
|
}>;
|
|
@@ -85,19 +85,19 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
85
85
|
conversationId: string;
|
|
86
86
|
}) => Promise<{
|
|
87
87
|
id: string;
|
|
88
|
-
createdAt: string;
|
|
89
|
-
updatedAt: string;
|
|
90
88
|
ref: {
|
|
91
89
|
type: "commit" | "tag" | "branch";
|
|
92
90
|
name: string;
|
|
93
91
|
hash: string;
|
|
94
92
|
} | null;
|
|
95
|
-
userId: string | null;
|
|
96
|
-
metadata: ConversationMetadata | null;
|
|
97
|
-
projectId: string;
|
|
98
|
-
tenantId: string;
|
|
99
93
|
title: string | null;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
updatedAt: string;
|
|
96
|
+
tenantId: string;
|
|
97
|
+
projectId: string;
|
|
100
98
|
agentId: string | null;
|
|
99
|
+
userId: string | null;
|
|
100
|
+
metadata: ConversationMetadata | null;
|
|
101
101
|
activeSubAgentId: string;
|
|
102
102
|
lastContextResolution: string | null;
|
|
103
103
|
} | undefined>;
|
|
@@ -121,19 +121,19 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
121
121
|
contextConfigId?: string | undefined;
|
|
122
122
|
} | {
|
|
123
123
|
id: string;
|
|
124
|
-
createdAt: string;
|
|
125
|
-
updatedAt: string;
|
|
126
124
|
ref: {
|
|
127
125
|
type: "commit" | "tag" | "branch";
|
|
128
126
|
name: string;
|
|
129
127
|
hash: string;
|
|
130
128
|
} | null;
|
|
131
|
-
userId: string | null;
|
|
132
|
-
metadata: ConversationMetadata | null;
|
|
133
|
-
projectId: string;
|
|
134
|
-
tenantId: string;
|
|
135
129
|
title: string | null;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
updatedAt: string;
|
|
132
|
+
tenantId: string;
|
|
133
|
+
projectId: string;
|
|
136
134
|
agentId: string | null;
|
|
135
|
+
userId: string | null;
|
|
136
|
+
metadata: ConversationMetadata | null;
|
|
137
137
|
activeSubAgentId: string;
|
|
138
138
|
lastContextResolution: string | null;
|
|
139
139
|
}>;
|
|
@@ -153,19 +153,19 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
153
153
|
conversationId: string;
|
|
154
154
|
}) => Promise<{
|
|
155
155
|
id: string;
|
|
156
|
-
createdAt: string;
|
|
157
|
-
updatedAt: string;
|
|
158
156
|
ref: {
|
|
159
157
|
type: "commit" | "tag" | "branch";
|
|
160
158
|
name: string;
|
|
161
159
|
hash: string;
|
|
162
160
|
} | null;
|
|
163
|
-
userId: string | null;
|
|
164
|
-
metadata: ConversationMetadata | null;
|
|
165
|
-
projectId: string;
|
|
166
|
-
tenantId: string;
|
|
167
161
|
title: string | null;
|
|
162
|
+
createdAt: string;
|
|
163
|
+
updatedAt: string;
|
|
164
|
+
tenantId: string;
|
|
165
|
+
projectId: string;
|
|
168
166
|
agentId: string | null;
|
|
167
|
+
userId: string | null;
|
|
168
|
+
metadata: ConversationMetadata | null;
|
|
169
169
|
activeSubAgentId: string;
|
|
170
170
|
lastContextResolution: string | null;
|
|
171
171
|
} | undefined>;
|
|
@@ -13,12 +13,12 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
13
13
|
id: string;
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
|
-
metadata: MessageMetadata | null;
|
|
17
|
-
role: string;
|
|
18
|
-
content: MessageContent;
|
|
19
|
-
projectId: string;
|
|
20
16
|
tenantId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
content: MessageContent;
|
|
19
|
+
metadata: MessageMetadata | null;
|
|
21
20
|
conversationId: string;
|
|
21
|
+
role: string;
|
|
22
22
|
fromSubAgentId: string | null;
|
|
23
23
|
toSubAgentId: string | null;
|
|
24
24
|
fromExternalAgentId: string | null;
|
|
@@ -147,12 +147,12 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
147
147
|
id: string;
|
|
148
148
|
createdAt: string;
|
|
149
149
|
updatedAt: string;
|
|
150
|
-
metadata: MessageMetadata | null;
|
|
151
|
-
role: string;
|
|
152
|
-
content: MessageContent;
|
|
153
|
-
projectId: string;
|
|
154
150
|
tenantId: string;
|
|
151
|
+
projectId: string;
|
|
152
|
+
content: MessageContent;
|
|
153
|
+
metadata: MessageMetadata | null;
|
|
155
154
|
conversationId: string;
|
|
155
|
+
role: string;
|
|
156
156
|
fromSubAgentId: string | null;
|
|
157
157
|
toSubAgentId: string | null;
|
|
158
158
|
fromExternalAgentId: string | null;
|
|
@@ -200,12 +200,12 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
200
200
|
id: string;
|
|
201
201
|
createdAt: string;
|
|
202
202
|
updatedAt: string;
|
|
203
|
-
metadata: MessageMetadata | null;
|
|
204
|
-
role: string;
|
|
205
|
-
content: MessageContent;
|
|
206
|
-
projectId: string;
|
|
207
203
|
tenantId: string;
|
|
204
|
+
projectId: string;
|
|
205
|
+
content: MessageContent;
|
|
206
|
+
metadata: MessageMetadata | null;
|
|
208
207
|
conversationId: string;
|
|
208
|
+
role: string;
|
|
209
209
|
fromSubAgentId: string | null;
|
|
210
210
|
toSubAgentId: string | null;
|
|
211
211
|
fromExternalAgentId: string | null;
|
|
@@ -40,7 +40,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|
|
43
|
-
status: "
|
|
43
|
+
status: "running" | "completed" | "failed" | "pending" | "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: "
|
|
202
|
+
status: "running" | "completed" | "failed" | "pending" | "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: "
|
|
242
|
+
status: "running" | "completed" | "failed" | "pending" | "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: "
|
|
295
|
+
status: "running" | "completed" | "failed" | "pending" | "cancelled";
|
|
296
296
|
scheduledFor: string;
|
|
297
297
|
startedAt: string | null;
|
|
298
298
|
completedAt: string | null;
|
|
@@ -16,8 +16,8 @@ declare const createScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (para
|
|
|
16
16
|
userId: string;
|
|
17
17
|
}) => Promise<{
|
|
18
18
|
createdAt: string;
|
|
19
|
-
userId: string;
|
|
20
19
|
tenantId: string;
|
|
20
|
+
userId: string;
|
|
21
21
|
scheduledTriggerId: string;
|
|
22
22
|
}>;
|
|
23
23
|
declare const deleteScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -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
|
-
createdAt: string;
|
|
12
|
-
updatedAt: string;
|
|
13
11
|
ref: {
|
|
14
12
|
type: "commit" | "tag" | "branch";
|
|
15
13
|
name: string;
|
|
16
14
|
hash: string;
|
|
17
15
|
} | null;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
projectId: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
21
18
|
tenantId: string;
|
|
19
|
+
projectId: string;
|
|
22
20
|
agentId: string;
|
|
21
|
+
metadata: TaskMetadataConfig | null;
|
|
23
22
|
subAgentId: string;
|
|
23
|
+
status: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
2
2
|
|
|
3
3
|
//#region src/db/manage/dolt-safe-jsonb.d.ts
|
|
4
4
|
declare function encodeBackslashes(value: unknown): unknown;
|
|
@@ -7,6 +7,6 @@ declare function decodeBackslashes(value: unknown): unknown;
|
|
|
7
7
|
* Drop-in replacement for drizzle-orm's `jsonb()`.
|
|
8
8
|
* Encodes backslashes on write and decodes on read to work around the Doltgres bug.
|
|
9
9
|
*/
|
|
10
|
-
declare function jsonb(name: string): ReturnType<typeof
|
|
10
|
+
declare function jsonb(name: string): ReturnType<typeof drizzle_orm_pg_core0.jsonb>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { decodeBackslashes, encodeBackslashes, jsonb };
|