@inkeep/agents-core 0.65.1 → 0.65.2
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/permissions.d.ts +9 -9
- package/dist/data-access/manage/agents.d.ts +30 -30
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/dataComponents.js +1 -1
- package/dist/data-access/manage/functionTools.d.ts +14 -14
- 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 +18 -18
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +18 -18
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +16 -16
- package/dist/data-access/runtime/conversations.d.ts +20 -20
- package/dist/data-access/runtime/feedback.d.ts +8 -8
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/manage-client.js +15 -3
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-client.js +7 -1
- package/dist/db/runtime/runtime-schema.d.ts +405 -405
- package/dist/dolt/merge.js +7 -9
- package/dist/dolt/ref-scope.js +9 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/utils/error.d.ts +58 -52
- package/dist/utils/error.js +63 -21
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/dist/utils/logger.d.ts +21 -2
- package/dist/utils/logger.js +67 -11
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +49 -49
- package/dist/validation/schemas.d.ts +803 -803
- package/drizzle/runtime/meta/_journal.json +2 -2
- package/package.json +1 -1
|
@@ -58,15 +58,15 @@ declare const listFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
58
58
|
total: number;
|
|
59
59
|
}>;
|
|
60
60
|
declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: FeedbackInsert) => Promise<{
|
|
61
|
-
type: "positive" | "negative";
|
|
62
|
-
id: string;
|
|
63
61
|
tenantId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
id: string;
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
|
-
|
|
67
|
-
details: string | null;
|
|
66
|
+
type: "positive" | "negative";
|
|
68
67
|
conversationId: string;
|
|
69
68
|
messageId: string | null;
|
|
69
|
+
details: string | null;
|
|
70
70
|
}>;
|
|
71
71
|
declare const updateFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
72
72
|
scopes: ProjectScopeConfig;
|
|
@@ -87,15 +87,15 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
87
87
|
scopes: ProjectScopeConfig;
|
|
88
88
|
feedbackId: string;
|
|
89
89
|
}) => Promise<{
|
|
90
|
-
type: "positive" | "negative";
|
|
91
|
-
id: string;
|
|
92
90
|
tenantId: string;
|
|
91
|
+
projectId: string;
|
|
92
|
+
id: string;
|
|
93
93
|
createdAt: string;
|
|
94
94
|
updatedAt: string;
|
|
95
|
-
|
|
96
|
-
details: string | null;
|
|
95
|
+
type: "positive" | "negative";
|
|
97
96
|
conversationId: string;
|
|
98
97
|
messageId: string | null;
|
|
98
|
+
details: string | null;
|
|
99
99
|
}>;
|
|
100
100
|
//#endregion
|
|
101
101
|
export { createFeedback, deleteFeedback, getFeedbackById, listFeedback, listFeedbackByConversation, updateFeedback };
|
|
@@ -10,26 +10,26 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
-
id: string;
|
|
14
13
|
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
id: string;
|
|
15
16
|
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
16
18
|
metadata: MessageMetadata | null;
|
|
17
19
|
content: MessageContent;
|
|
18
|
-
updatedAt: string;
|
|
19
|
-
projectId: string;
|
|
20
20
|
role: string;
|
|
21
|
+
conversationId: string;
|
|
21
22
|
fromSubAgentId: string | null;
|
|
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: {
|
|
@@ -144,26 +144,26 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
144
144
|
scopes: ProjectScopeConfig;
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
|
-
id: string;
|
|
148
147
|
tenantId: string;
|
|
148
|
+
projectId: string;
|
|
149
|
+
id: string;
|
|
149
150
|
createdAt: string;
|
|
151
|
+
updatedAt: string;
|
|
150
152
|
metadata: MessageMetadata | null;
|
|
151
153
|
content: MessageContent;
|
|
152
|
-
updatedAt: string;
|
|
153
|
-
projectId: string;
|
|
154
154
|
role: string;
|
|
155
|
+
conversationId: string;
|
|
155
156
|
fromSubAgentId: string | null;
|
|
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: {
|
|
@@ -197,26 +197,26 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
197
197
|
scopes: ProjectScopeConfig;
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
|
-
id: string;
|
|
201
200
|
tenantId: string;
|
|
201
|
+
projectId: string;
|
|
202
|
+
id: string;
|
|
202
203
|
createdAt: string;
|
|
204
|
+
updatedAt: string;
|
|
203
205
|
metadata: MessageMetadata | null;
|
|
204
206
|
content: MessageContent;
|
|
205
|
-
updatedAt: string;
|
|
206
|
-
projectId: string;
|
|
207
207
|
role: string;
|
|
208
|
+
conversationId: string;
|
|
208
209
|
fromSubAgentId: string | null;
|
|
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: {
|
|
@@ -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;
|
|
@@ -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
|
-
status: string;
|
|
11
|
-
id: string;
|
|
12
10
|
tenantId: string;
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
projectId: string;
|
|
12
|
+
id: string;
|
|
15
13
|
ref: {
|
|
16
14
|
type: "commit" | "tag" | "branch";
|
|
17
15
|
name: string;
|
|
18
16
|
hash: string;
|
|
19
17
|
} | null;
|
|
18
|
+
createdAt: string;
|
|
20
19
|
updatedAt: string;
|
|
21
|
-
|
|
20
|
+
metadata: TaskMetadataConfig | null;
|
|
22
21
|
agentId: string;
|
|
23
22
|
subAgentId: string;
|
|
23
|
+
status: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { manage_schema_exports } from "./manage-schema.js";
|
|
2
2
|
import { env, loadEnvironmentFiles } from "../../env.js";
|
|
3
|
+
import { getLogger } from "../../utils/logger.js";
|
|
4
|
+
import { getDatabaseErrorLogContext } from "../../utils/error.js";
|
|
3
5
|
import { createTestManageDatabaseClientNoMigrations } from "./test-manage-client.js";
|
|
4
6
|
import { drizzle } from "drizzle-orm/node-postgres";
|
|
5
7
|
import { Pool } from "pg";
|
|
6
8
|
|
|
7
9
|
//#region src/db/manage/manage-client.ts
|
|
8
10
|
loadEnvironmentFiles();
|
|
11
|
+
const managePoolLogger = getLogger("manage-db-pool");
|
|
9
12
|
function createAgentsManageDatabasePool(config) {
|
|
10
13
|
const connectionString = config.connectionString || env.INKEEP_AGENTS_MANAGE_DATABASE_URL;
|
|
11
14
|
if (!connectionString) throw new Error("INKEEP_AGENTS_MANAGE_DATABASE_URL environment variable is required. Please set it to your PostgreSQL connection string.");
|
|
@@ -18,7 +21,10 @@ function createAgentsManageDatabasePool(config) {
|
|
|
18
21
|
idleTimeoutMillis: 3e4
|
|
19
22
|
});
|
|
20
23
|
pool.on("error", (err) => {
|
|
21
|
-
|
|
24
|
+
managePoolLogger.error({
|
|
25
|
+
error: err,
|
|
26
|
+
...getDatabaseErrorLogContext(err)
|
|
27
|
+
}, "Unexpected error on agents manage database pool (Doltgres)");
|
|
22
28
|
});
|
|
23
29
|
return pool;
|
|
24
30
|
}
|
|
@@ -38,7 +44,10 @@ function createAgentsManageDatabaseClient(config) {
|
|
|
38
44
|
idleTimeoutMillis: 3e4
|
|
39
45
|
});
|
|
40
46
|
pool.on("error", (err) => {
|
|
41
|
-
|
|
47
|
+
managePoolLogger.error({
|
|
48
|
+
error: err,
|
|
49
|
+
...getDatabaseErrorLogContext(err)
|
|
50
|
+
}, "Unexpected error on agents manage database pool (Doltgres)");
|
|
42
51
|
});
|
|
43
52
|
return drizzle(pool, {
|
|
44
53
|
schema: manage_schema_exports,
|
|
@@ -57,7 +66,10 @@ function createAgentManageDatabaseConnection(config) {
|
|
|
57
66
|
connectionTimeoutMillis: 1e4
|
|
58
67
|
});
|
|
59
68
|
pool.on("error", (err) => {
|
|
60
|
-
|
|
69
|
+
managePoolLogger.error({
|
|
70
|
+
error: err,
|
|
71
|
+
...getDatabaseErrorLogContext(err)
|
|
72
|
+
}, "Unexpected error on agents manage database pool (Doltgres)");
|
|
61
73
|
});
|
|
62
74
|
return pool.connect().then((connection) => {
|
|
63
75
|
const db = drizzle(connection, {
|