@inkeep/agents-core 0.73.3 → 0.73.4
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/constants/models.d.ts +3 -0
- package/dist/constants/models.js +3 -0
- package/dist/data-access/manage/agents.d.ts +46 -46
- 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/skills.d.ts +15 -15
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +26 -26
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgents.d.ts +18 -18
- package/dist/data-access/manage/tools.d.ts +27 -27
- package/dist/data-access/manage/triggers.d.ts +6 -6
- package/dist/data-access/runtime/apiKeys.d.ts +20 -20
- package/dist/data-access/runtime/apps.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/events.d.ts +4 -4
- package/dist/data-access/runtime/feedback.d.ts +6 -6
- 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/manage-client.js +3 -0
- package/dist/db/manage/manage-schema.d.ts +487 -487
- package/dist/db/runtime/runtime-client.js +2 -0
- package/dist/db/runtime/runtime-schema.d.ts +445 -445
- package/dist/types/@vercel__functions/index.d.ts +3 -3
- package/dist/utils/database-pool.d.ts +8 -0
- package/dist/utils/database-pool.js +36 -0
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +56 -56
- package/dist/validation/schemas.d.ts +2417 -2417
- package/package.json +2 -2
|
@@ -15,24 +15,24 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
15
15
|
total: number;
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
|
-
tenantId: string;
|
|
19
|
-
projectId: string;
|
|
20
18
|
id: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
updatedAt: string;
|
|
21
|
+
projectId: string;
|
|
22
|
+
tenantId: string;
|
|
21
23
|
metadata: ConversationMetadata | null;
|
|
22
24
|
properties: Record<string, unknown> | null;
|
|
23
25
|
title: string | null;
|
|
24
26
|
agentId: string | null;
|
|
25
|
-
|
|
26
|
-
updatedAt: string;
|
|
27
|
+
userId: string | null;
|
|
27
28
|
ref: {
|
|
28
29
|
type: "commit" | "tag" | "branch";
|
|
29
30
|
name: string;
|
|
30
31
|
hash: string;
|
|
31
32
|
} | null;
|
|
32
|
-
userId: string | null;
|
|
33
|
-
userProperties: Record<string, unknown> | null;
|
|
34
33
|
activeSubAgentId: string;
|
|
35
34
|
lastContextResolution: string | null;
|
|
35
|
+
userProperties: Record<string, unknown> | null;
|
|
36
36
|
}>;
|
|
37
37
|
declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
38
38
|
scopes: ProjectScopeConfig;
|
|
@@ -90,24 +90,24 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
90
90
|
scopes: ProjectScopeConfig;
|
|
91
91
|
conversationId: string;
|
|
92
92
|
}) => Promise<{
|
|
93
|
-
tenantId: string;
|
|
94
|
-
projectId: string;
|
|
95
93
|
id: string;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
updatedAt: string;
|
|
96
|
+
projectId: string;
|
|
97
|
+
tenantId: string;
|
|
96
98
|
metadata: ConversationMetadata | null;
|
|
97
99
|
properties: Record<string, unknown> | null;
|
|
98
100
|
title: string | null;
|
|
99
101
|
agentId: string | null;
|
|
100
|
-
|
|
101
|
-
updatedAt: string;
|
|
102
|
+
userId: string | null;
|
|
102
103
|
ref: {
|
|
103
104
|
type: "commit" | "tag" | "branch";
|
|
104
105
|
name: string;
|
|
105
106
|
hash: string;
|
|
106
107
|
} | null;
|
|
107
|
-
userId: string | null;
|
|
108
|
-
userProperties: Record<string, unknown> | null;
|
|
109
108
|
activeSubAgentId: string;
|
|
110
109
|
lastContextResolution: string | null;
|
|
110
|
+
userProperties: Record<string, unknown> | null;
|
|
111
111
|
} | undefined>;
|
|
112
112
|
declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input: ConversationInsert) => Promise<{
|
|
113
113
|
activeSubAgentId: string;
|
|
@@ -130,24 +130,24 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
130
130
|
userProperties?: Record<string, unknown> | null | undefined;
|
|
131
131
|
properties?: Record<string, unknown> | null | undefined;
|
|
132
132
|
} | {
|
|
133
|
-
tenantId: string;
|
|
134
|
-
projectId: string;
|
|
135
133
|
id: string;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
projectId: string;
|
|
137
|
+
tenantId: string;
|
|
136
138
|
metadata: ConversationMetadata | null;
|
|
137
139
|
properties: Record<string, unknown> | null;
|
|
138
140
|
title: string | null;
|
|
139
141
|
agentId: string | null;
|
|
140
|
-
|
|
141
|
-
updatedAt: string;
|
|
142
|
+
userId: string | null;
|
|
142
143
|
ref: {
|
|
143
144
|
type: "commit" | "tag" | "branch";
|
|
144
145
|
name: string;
|
|
145
146
|
hash: string;
|
|
146
147
|
} | null;
|
|
147
|
-
userId: string | null;
|
|
148
|
-
userProperties: Record<string, unknown> | null;
|
|
149
148
|
activeSubAgentId: string;
|
|
150
149
|
lastContextResolution: string | null;
|
|
150
|
+
userProperties: Record<string, unknown> | null;
|
|
151
151
|
}>;
|
|
152
152
|
/**
|
|
153
153
|
* Get conversation history with filtering and context management
|
|
@@ -164,24 +164,24 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
164
164
|
scopes: ProjectScopeConfig;
|
|
165
165
|
conversationId: string;
|
|
166
166
|
}) => Promise<{
|
|
167
|
-
tenantId: string;
|
|
168
|
-
projectId: string;
|
|
169
167
|
id: string;
|
|
168
|
+
createdAt: string;
|
|
169
|
+
updatedAt: string;
|
|
170
|
+
projectId: string;
|
|
171
|
+
tenantId: string;
|
|
170
172
|
metadata: ConversationMetadata | null;
|
|
171
173
|
properties: Record<string, unknown> | null;
|
|
172
174
|
title: string | null;
|
|
173
175
|
agentId: string | null;
|
|
174
|
-
|
|
175
|
-
updatedAt: string;
|
|
176
|
+
userId: string | null;
|
|
176
177
|
ref: {
|
|
177
178
|
type: "commit" | "tag" | "branch";
|
|
178
179
|
name: string;
|
|
179
180
|
hash: string;
|
|
180
181
|
} | null;
|
|
181
|
-
userId: string | null;
|
|
182
|
-
userProperties: Record<string, unknown> | null;
|
|
183
182
|
activeSubAgentId: string;
|
|
184
183
|
lastContextResolution: string | null;
|
|
184
|
+
userProperties: Record<string, unknown> | null;
|
|
185
185
|
} | undefined>;
|
|
186
186
|
/**
|
|
187
187
|
* Set active agent for a conversation (upsert operation)
|
|
@@ -7,15 +7,15 @@ import { EventInsert } from "../../types/entities.js";
|
|
|
7
7
|
//#region src/data-access/runtime/events.d.ts
|
|
8
8
|
declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert) => Promise<{
|
|
9
9
|
row: {
|
|
10
|
-
tenantId: string;
|
|
11
|
-
projectId: string;
|
|
12
10
|
id: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
projectId: string;
|
|
14
|
+
tenantId: string;
|
|
13
15
|
metadata: Record<string, unknown> | null;
|
|
14
16
|
type: string;
|
|
15
17
|
properties: Record<string, unknown> | null;
|
|
16
18
|
agentId: string | null;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
updatedAt: string;
|
|
19
19
|
conversationId: string | null;
|
|
20
20
|
userProperties: Record<string, unknown> | null;
|
|
21
21
|
messageId: string | null;
|
|
@@ -70,12 +70,12 @@ declare const getFeedbackByIds: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
70
70
|
agentId: string | null;
|
|
71
71
|
}[]>;
|
|
72
72
|
declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: FeedbackInsert) => Promise<{
|
|
73
|
-
tenantId: string;
|
|
74
|
-
projectId: string;
|
|
75
73
|
id: string;
|
|
76
|
-
type: "positive" | "negative";
|
|
77
74
|
createdAt: string;
|
|
78
75
|
updatedAt: string;
|
|
76
|
+
projectId: string;
|
|
77
|
+
tenantId: string;
|
|
78
|
+
type: "positive" | "negative";
|
|
79
79
|
conversationId: string;
|
|
80
80
|
messageId: string | null;
|
|
81
81
|
details: string | null;
|
|
@@ -100,12 +100,12 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
100
100
|
scopes: ProjectScopeConfig;
|
|
101
101
|
feedbackId: string;
|
|
102
102
|
}) => Promise<{
|
|
103
|
-
tenantId: string;
|
|
104
|
-
projectId: string;
|
|
105
103
|
id: string;
|
|
106
|
-
type: "positive" | "negative";
|
|
107
104
|
createdAt: string;
|
|
108
105
|
updatedAt: string;
|
|
106
|
+
projectId: string;
|
|
107
|
+
tenantId: string;
|
|
108
|
+
type: "positive" | "negative";
|
|
109
109
|
conversationId: string;
|
|
110
110
|
messageId: string | null;
|
|
111
111
|
details: string | null;
|
|
@@ -10,14 +10,14 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
13
|
id: string;
|
|
16
|
-
metadata: MessageMetadata | null;
|
|
17
14
|
content: MessageContent;
|
|
18
|
-
properties: Record<string, unknown> | null;
|
|
19
15
|
createdAt: string;
|
|
20
16
|
updatedAt: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
|
+
metadata: MessageMetadata | null;
|
|
20
|
+
properties: Record<string, unknown> | null;
|
|
21
21
|
role: string;
|
|
22
22
|
conversationId: string;
|
|
23
23
|
userProperties: Record<string, unknown> | null;
|
|
@@ -154,14 +154,14 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
154
154
|
scopes: ProjectScopeConfig;
|
|
155
155
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
156
156
|
}) => Promise<{
|
|
157
|
-
tenantId: string;
|
|
158
|
-
projectId: string;
|
|
159
157
|
id: string;
|
|
160
|
-
metadata: MessageMetadata | null;
|
|
161
158
|
content: MessageContent;
|
|
162
|
-
properties: Record<string, unknown> | null;
|
|
163
159
|
createdAt: string;
|
|
164
160
|
updatedAt: string;
|
|
161
|
+
projectId: string;
|
|
162
|
+
tenantId: string;
|
|
163
|
+
metadata: MessageMetadata | null;
|
|
164
|
+
properties: Record<string, unknown> | null;
|
|
165
165
|
role: string;
|
|
166
166
|
conversationId: string;
|
|
167
167
|
userProperties: Record<string, unknown> | null;
|
|
@@ -211,14 +211,14 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
211
211
|
scopes: ProjectScopeConfig;
|
|
212
212
|
messageId: string;
|
|
213
213
|
}) => Promise<{
|
|
214
|
-
tenantId: string;
|
|
215
|
-
projectId: string;
|
|
216
214
|
id: string;
|
|
217
|
-
metadata: MessageMetadata | null;
|
|
218
215
|
content: MessageContent;
|
|
219
|
-
properties: Record<string, unknown> | null;
|
|
220
216
|
createdAt: string;
|
|
221
217
|
updatedAt: string;
|
|
218
|
+
projectId: string;
|
|
219
|
+
tenantId: string;
|
|
220
|
+
metadata: MessageMetadata | null;
|
|
221
|
+
properties: Record<string, unknown> | null;
|
|
222
222
|
role: string;
|
|
223
223
|
conversationId: string;
|
|
224
224
|
userProperties: Record<string, unknown> | null;
|
|
@@ -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;
|
|
@@ -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" | "running" | "completed" | "failed" | "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" | "running" | "completed" | "failed" | "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" | "running" | "completed" | "failed" | "cancelled";
|
|
296
296
|
scheduledFor: string;
|
|
297
297
|
startedAt: string | null;
|
|
298
298
|
completedAt: string | null;
|
|
@@ -15,8 +15,8 @@ declare const createScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (para
|
|
|
15
15
|
scheduledTriggerId: string;
|
|
16
16
|
userId: string;
|
|
17
17
|
}) => Promise<{
|
|
18
|
-
tenantId: string;
|
|
19
18
|
createdAt: string;
|
|
19
|
+
tenantId: string;
|
|
20
20
|
userId: string;
|
|
21
21
|
scheduledTriggerId: string;
|
|
22
22
|
}>;
|
|
@@ -7,20 +7,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
7
7
|
|
|
8
8
|
//#region src/data-access/runtime/tasks.d.ts
|
|
9
9
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
10
|
-
tenantId: string;
|
|
11
|
-
projectId: string;
|
|
12
10
|
id: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
projectId: string;
|
|
14
|
+
tenantId: string;
|
|
13
15
|
metadata: TaskMetadataConfig | null;
|
|
14
16
|
agentId: string;
|
|
15
17
|
subAgentId: string;
|
|
16
|
-
status: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
updatedAt: string;
|
|
19
18
|
ref: {
|
|
20
19
|
type: "commit" | "tag" | "branch";
|
|
21
20
|
name: string;
|
|
22
21
|
hash: string;
|
|
23
22
|
} | null;
|
|
23
|
+
status: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { manage_schema_exports } from "./manage-schema.js";
|
|
2
2
|
import { env, loadEnvironmentFiles } from "../../env.js";
|
|
3
3
|
import { getLogger } from "../../utils/logger.js";
|
|
4
|
+
import { tryAttachDatabasePool } from "../../utils/database-pool.js";
|
|
4
5
|
import { getDatabaseErrorLogContext } from "../../utils/error.js";
|
|
5
6
|
import { createTestManageDatabaseClientNoMigrations } from "./test-manage-client.js";
|
|
6
7
|
import { drizzle } from "drizzle-orm/node-postgres";
|
|
@@ -20,6 +21,7 @@ function createAgentsManageDatabasePool(config) {
|
|
|
20
21
|
connectionTimeoutMillis: 1e4,
|
|
21
22
|
idleTimeoutMillis: 3e4
|
|
22
23
|
});
|
|
24
|
+
tryAttachDatabasePool(pool);
|
|
23
25
|
pool.on("error", (err) => {
|
|
24
26
|
managePoolLogger.error({
|
|
25
27
|
error: err,
|
|
@@ -43,6 +45,7 @@ function createAgentsManageDatabaseClient(config) {
|
|
|
43
45
|
connectionTimeoutMillis: 1e4,
|
|
44
46
|
idleTimeoutMillis: 3e4
|
|
45
47
|
});
|
|
48
|
+
tryAttachDatabasePool(pool);
|
|
46
49
|
pool.on("error", (err) => {
|
|
47
50
|
managePoolLogger.error({
|
|
48
51
|
error: err,
|