@inkeep/agents-core 0.0.0-dev-20260407022655 → 0.0.0-dev-20260407031430

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.
Files changed (43) hide show
  1. package/dist/auth/auth-schema.d.ts +108 -108
  2. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  3. package/dist/auth/auth.d.ts +6 -6
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/data-access/manage/agents.d.ts +37 -37
  6. package/dist/data-access/manage/artifactComponents.d.ts +14 -14
  7. package/dist/data-access/manage/contextConfigs.d.ts +16 -16
  8. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  9. package/dist/data-access/manage/dataComponents.js +1 -1
  10. package/dist/data-access/manage/functionTools.d.ts +14 -14
  11. package/dist/data-access/manage/skills.d.ts +11 -11
  12. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  13. package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
  14. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  15. package/dist/data-access/manage/subAgents.d.ts +15 -15
  16. package/dist/data-access/manage/tools.d.ts +21 -21
  17. package/dist/data-access/manage/triggers.d.ts +2 -2
  18. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  19. package/dist/data-access/runtime/apps.d.ts +10 -10
  20. package/dist/data-access/runtime/conversations.d.ts +16 -16
  21. package/dist/data-access/runtime/feedback.d.ts +8 -8
  22. package/dist/data-access/runtime/messages.d.ts +15 -15
  23. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
  24. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  25. package/dist/data-access/runtime/tasks.d.ts +5 -5
  26. package/dist/db/manage/dolt-safe-jsonb.d.ts +2 -2
  27. package/dist/db/manage/manage-client.js +15 -3
  28. package/dist/db/manage/manage-schema.d.ts +449 -449
  29. package/dist/db/runtime/runtime-client.js +7 -1
  30. package/dist/db/runtime/runtime-schema.d.ts +407 -407
  31. package/dist/dolt/merge.js +7 -9
  32. package/dist/dolt/ref-scope.js +8 -2
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.js +2 -2
  35. package/dist/utils/error.d.ts +58 -52
  36. package/dist/utils/error.js +54 -17
  37. package/dist/utils/index.d.ts +2 -2
  38. package/dist/utils/index.js +2 -2
  39. package/dist/utils/logger.js +5 -1
  40. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  41. package/dist/validation/schemas/skills.d.ts +44 -44
  42. package/dist/validation/schemas.d.ts +2080 -2080
  43. package/package.json +1 -1
@@ -15,7 +15,11 @@ 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;
18
20
  id: string;
21
+ metadata: ConversationMetadata | null;
22
+ title: string | null;
19
23
  ref: {
20
24
  type: "commit" | "tag" | "branch";
21
25
  name: string;
@@ -24,10 +28,6 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
24
28
  createdAt: string;
25
29
  updatedAt: string;
26
30
  agentId: string | null;
27
- projectId: string;
28
- tenantId: string;
29
- title: string | null;
30
- metadata: ConversationMetadata | null;
31
31
  userId: string | null;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
@@ -84,7 +84,11 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
84
84
  scopes: ProjectScopeConfig;
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
+ tenantId: string;
88
+ projectId: string;
87
89
  id: string;
90
+ metadata: ConversationMetadata | null;
91
+ title: string | null;
88
92
  ref: {
89
93
  type: "commit" | "tag" | "branch";
90
94
  name: string;
@@ -93,10 +97,6 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
93
97
  createdAt: string;
94
98
  updatedAt: string;
95
99
  agentId: string | null;
96
- projectId: string;
97
- tenantId: string;
98
- title: string | null;
99
- metadata: ConversationMetadata | null;
100
100
  userId: string | null;
101
101
  activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
@@ -120,7 +120,11 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
120
120
  metadata?: ConversationMetadata | null | undefined;
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
+ tenantId: string;
124
+ projectId: string;
123
125
  id: string;
126
+ metadata: ConversationMetadata | null;
127
+ title: string | null;
124
128
  ref: {
125
129
  type: "commit" | "tag" | "branch";
126
130
  name: string;
@@ -129,10 +133,6 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
129
133
  createdAt: string;
130
134
  updatedAt: string;
131
135
  agentId: string | null;
132
- projectId: string;
133
- tenantId: string;
134
- title: string | null;
135
- metadata: ConversationMetadata | null;
136
136
  userId: string | null;
137
137
  activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
@@ -152,7 +152,11 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
152
152
  scopes: ProjectScopeConfig;
153
153
  conversationId: string;
154
154
  }) => Promise<{
155
+ tenantId: string;
156
+ projectId: string;
155
157
  id: string;
158
+ metadata: ConversationMetadata | null;
159
+ title: string | null;
156
160
  ref: {
157
161
  type: "commit" | "tag" | "branch";
158
162
  name: string;
@@ -161,10 +165,6 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
161
165
  createdAt: string;
162
166
  updatedAt: string;
163
167
  agentId: string | null;
164
- projectId: string;
165
- tenantId: string;
166
- title: string | null;
167
- metadata: ConversationMetadata | null;
168
168
  userId: string | null;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
@@ -58,13 +58,13 @@ declare const listFeedback: (db: AgentsRunDatabaseClient) => (params: {
58
58
  total: number;
59
59
  }>;
60
60
  declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: FeedbackInsert) => Promise<{
61
- id: string;
62
- createdAt: string;
63
- updatedAt: string;
64
- projectId: string;
65
61
  tenantId: string;
62
+ projectId: string;
63
+ id: string;
66
64
  type: "positive" | "negative";
67
65
  details: string | null;
66
+ createdAt: string;
67
+ updatedAt: string;
68
68
  conversationId: string;
69
69
  messageId: string | null;
70
70
  }>;
@@ -87,13 +87,13 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
87
87
  scopes: ProjectScopeConfig;
88
88
  feedbackId: string;
89
89
  }) => Promise<{
90
- id: string;
91
- createdAt: string;
92
- updatedAt: string;
93
- projectId: string;
94
90
  tenantId: string;
91
+ projectId: string;
92
+ id: string;
95
93
  type: "positive" | "negative";
96
94
  details: string | null;
95
+ createdAt: string;
96
+ updatedAt: string;
97
97
  conversationId: string;
98
98
  messageId: string | null;
99
99
  }>;
@@ -10,21 +10,21 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  scopes: ProjectScopeConfig;
11
11
  messageId: string;
12
12
  }) => Promise<{
13
- id: string;
14
- createdAt: string;
15
- updatedAt: string;
16
- projectId: string;
17
13
  tenantId: string;
14
+ projectId: string;
15
+ id: string;
18
16
  metadata: MessageMetadata | null;
19
17
  content: MessageContent;
20
- role: string;
21
18
  fromSubAgentId: string | null;
22
19
  toSubAgentId: string | null;
23
20
  fromExternalAgentId: string | null;
24
21
  toExternalAgentId: string | null;
25
22
  taskId: string | null;
26
23
  a2aTaskId: string | null;
24
+ createdAt: string;
25
+ updatedAt: string;
27
26
  conversationId: string;
27
+ role: string;
28
28
  fromTeamAgentId: string | null;
29
29
  toTeamAgentId: string | null;
30
30
  visibility: string;
@@ -144,21 +144,21 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
144
144
  scopes: ProjectScopeConfig;
145
145
  data: Omit<MessageInsert, "tenantId" | "projectId">;
146
146
  }) => Promise<{
147
- id: string;
148
- createdAt: string;
149
- updatedAt: string;
150
- projectId: string;
151
147
  tenantId: string;
148
+ projectId: string;
149
+ id: string;
152
150
  metadata: MessageMetadata | null;
153
151
  content: MessageContent;
154
- role: string;
155
152
  fromSubAgentId: string | null;
156
153
  toSubAgentId: string | null;
157
154
  fromExternalAgentId: string | null;
158
155
  toExternalAgentId: string | null;
159
156
  taskId: string | null;
160
157
  a2aTaskId: string | null;
158
+ createdAt: string;
159
+ updatedAt: string;
161
160
  conversationId: string;
161
+ role: string;
162
162
  fromTeamAgentId: string | null;
163
163
  toTeamAgentId: string | null;
164
164
  visibility: string;
@@ -197,21 +197,21 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
197
197
  scopes: ProjectScopeConfig;
198
198
  messageId: string;
199
199
  }) => Promise<{
200
- id: string;
201
- createdAt: string;
202
- updatedAt: string;
203
- projectId: string;
204
200
  tenantId: string;
201
+ projectId: string;
202
+ id: string;
205
203
  metadata: MessageMetadata | null;
206
204
  content: MessageContent;
207
- role: string;
208
205
  fromSubAgentId: string | null;
209
206
  toSubAgentId: string | null;
210
207
  fromExternalAgentId: string | null;
211
208
  toExternalAgentId: string | null;
212
209
  taskId: string | null;
213
210
  a2aTaskId: string | null;
211
+ createdAt: string;
212
+ updatedAt: string;
214
213
  conversationId: string;
214
+ role: string;
215
215
  fromTeamAgentId: string | null;
216
216
  toTeamAgentId: string | null;
217
217
  visibility: string;
@@ -40,7 +40,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
40
40
  name: string;
41
41
  hash: string;
42
42
  } | null;
43
- status: "pending" | "running" | "completed" | "failed" | "cancelled";
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" | "running" | "completed" | "failed" | "cancelled";
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" | "running" | "completed" | "failed" | "cancelled";
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" | "running" | "completed" | "failed" | "cancelled";
295
+ status: "pending" | "failed" | "running" | "completed" | "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
- createdAt: string;
19
18
  tenantId: string;
19
+ createdAt: string;
20
20
  userId: string;
21
21
  scheduledTriggerId: string;
22
22
  }>;
@@ -7,7 +7,12 @@ 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;
10
12
  id: string;
13
+ metadata: TaskMetadataConfig | null;
14
+ status: string;
15
+ subAgentId: string;
11
16
  ref: {
12
17
  type: "commit" | "tag" | "branch";
13
18
  name: string;
@@ -16,11 +21,6 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
16
21
  createdAt: string;
17
22
  updatedAt: string;
18
23
  agentId: string;
19
- projectId: string;
20
- tenantId: string;
21
- metadata: TaskMetadataConfig | null;
22
- status: string;
23
- subAgentId: string;
24
24
  contextId: string;
25
25
  }>;
26
26
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
@@ -1,4 +1,4 @@
1
- import * as drizzle_orm_pg_core588 from "drizzle-orm/pg-core";
1
+ import * as drizzle_orm_pg_core1257 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 drizzle_orm_pg_core588.jsonb>;
10
+ declare function jsonb(name: string): ReturnType<typeof drizzle_orm_pg_core1257.jsonb>;
11
11
  //#endregion
12
12
  export { decodeBackslashes, encodeBackslashes, jsonb };
@@ -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
- console.error("Unexpected PostgreSQL pool error:", err);
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
- console.error("Unexpected PostgreSQL pool error:", err);
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
- console.error("Unexpected PostgreSQL pool error:", err);
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, {