@inkeep/agents-core 0.73.2 → 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.
Files changed (34) hide show
  1. package/dist/auth/permissions.d.ts +9 -9
  2. package/dist/constants/models.d.ts +3 -0
  3. package/dist/constants/models.js +3 -0
  4. package/dist/data-access/manage/agents.d.ts +20 -20
  5. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  6. package/dist/data-access/manage/contextConfigs.d.ts +4 -4
  7. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  8. package/dist/data-access/manage/functionTools.d.ts +8 -8
  9. package/dist/data-access/manage/skills.d.ts +10 -10
  10. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +6 -6
  11. package/dist/data-access/manage/subAgentRelations.d.ts +14 -14
  12. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
  13. package/dist/data-access/manage/subAgents.d.ts +12 -12
  14. package/dist/data-access/manage/tools.d.ts +12 -12
  15. package/dist/data-access/manage/triggers.d.ts +4 -4
  16. package/dist/data-access/runtime/apiKeys.d.ts +16 -16
  17. package/dist/data-access/runtime/apps.d.ts +10 -10
  18. package/dist/data-access/runtime/conversations.d.ts +28 -28
  19. package/dist/data-access/runtime/events.d.ts +3 -3
  20. package/dist/data-access/runtime/feedback.d.ts +2 -2
  21. package/dist/data-access/runtime/messages.d.ts +12 -12
  22. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  23. package/dist/data-access/runtime/tasks.d.ts +5 -5
  24. package/dist/db/manage/manage-client.js +3 -0
  25. package/dist/db/manage/manage-schema.d.ts +483 -483
  26. package/dist/db/runtime/runtime-client.js +2 -0
  27. package/dist/db/runtime/runtime-schema.d.ts +439 -439
  28. package/dist/types/@vercel__functions/index.d.ts +3 -3
  29. package/dist/utils/database-pool.d.ts +8 -0
  30. package/dist/utils/database-pool.js +36 -0
  31. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  32. package/dist/validation/schemas/skills.d.ts +58 -58
  33. package/dist/validation/schemas.d.ts +2084 -2084
  34. package/package.json +2 -2
@@ -10,14 +10,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
10
10
  subAgentId: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
- name: string;
14
13
  createdAt: string;
14
+ name: string;
15
15
  updatedAt: string;
16
- description: string | null;
17
- agentId: string;
18
16
  projectId: string;
19
17
  tenantId: string;
20
- prompt: string | null;
18
+ description: string | null;
21
19
  models: {
22
20
  base?: {
23
21
  model?: string | undefined;
@@ -41,20 +39,20 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
41
39
  stopWhen: {
42
40
  stepCountIs?: number | undefined;
43
41
  } | null;
42
+ agentId: string;
43
+ prompt: string | null;
44
44
  conversationHistoryConfig: ConversationHistoryConfig | null;
45
45
  } | undefined>;
46
46
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
47
47
  scopes: AgentScopeConfig;
48
48
  }) => Promise<{
49
49
  id: string;
50
- name: string;
51
50
  createdAt: string;
51
+ name: string;
52
52
  updatedAt: string;
53
- description: string | null;
54
- agentId: string;
55
53
  projectId: string;
56
54
  tenantId: string;
57
- prompt: string | null;
55
+ description: string | null;
58
56
  models: {
59
57
  base?: {
60
58
  model?: string | undefined;
@@ -78,6 +76,8 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
78
76
  stopWhen: {
79
77
  stepCountIs?: number | undefined;
80
78
  } | null;
79
+ agentId: string;
80
+ prompt: string | null;
81
81
  conversationHistoryConfig: ConversationHistoryConfig | null;
82
82
  }[]>;
83
83
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -128,14 +128,12 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
128
128
  }>;
129
129
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
130
130
  id: string;
131
- name: string;
132
131
  createdAt: string;
132
+ name: string;
133
133
  updatedAt: string;
134
- description: string | null;
135
- agentId: string;
136
134
  projectId: string;
137
135
  tenantId: string;
138
- prompt: string | null;
136
+ description: string | null;
139
137
  models: {
140
138
  base?: {
141
139
  model?: string | undefined;
@@ -159,6 +157,8 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
159
157
  stopWhen: {
160
158
  stepCountIs?: number | undefined;
161
159
  } | null;
160
+ agentId: string;
161
+ prompt: string | null;
162
162
  conversationHistoryConfig: ConversationHistoryConfig | null;
163
163
  }>;
164
164
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -21,18 +21,18 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
21
21
  toolId: string;
22
22
  }) => Promise<{
23
23
  id: string;
24
- name: string;
25
24
  createdAt: string;
25
+ name: string;
26
26
  updatedAt: string;
27
- description: string | null;
28
27
  projectId: string;
29
28
  tenantId: string;
29
+ description: string | null;
30
30
  headers: Record<string, string> | null;
31
+ credentialReferenceId: string | null;
31
32
  config: {
32
33
  type: "mcp";
33
34
  mcp: ToolMcpConfig;
34
35
  };
35
- credentialReferenceId: string | null;
36
36
  credentialScope: string;
37
37
  imageUrl: string | null;
38
38
  capabilities: ToolServerCapabilities | null;
@@ -79,18 +79,18 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
79
79
  }>;
80
80
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
81
81
  id: string;
82
- name: string;
83
82
  createdAt: string;
83
+ name: string;
84
84
  updatedAt: string;
85
- description: string | null;
86
85
  projectId: string;
87
86
  tenantId: string;
87
+ description: string | null;
88
88
  headers: Record<string, string> | null;
89
+ credentialReferenceId: string | null;
89
90
  config: {
90
91
  type: "mcp";
91
92
  mcp: ToolMcpConfig;
92
93
  };
93
- credentialReferenceId: string | null;
94
94
  credentialScope: string;
95
95
  imageUrl: string | null;
96
96
  capabilities: ToolServerCapabilities | null;
@@ -138,9 +138,9 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
138
138
  id: string;
139
139
  createdAt: string;
140
140
  updatedAt: string;
141
- agentId: string;
142
141
  projectId: string;
143
142
  tenantId: string;
143
+ agentId: string;
144
144
  subAgentId: string;
145
145
  toolId: string;
146
146
  headers: Record<string, string> | null;
@@ -157,9 +157,9 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
157
157
  id: string;
158
158
  createdAt: string;
159
159
  updatedAt: string;
160
- agentId: string;
161
160
  projectId: string;
162
161
  tenantId: string;
162
+ agentId: string;
163
163
  subAgentId: string;
164
164
  toolId: string;
165
165
  headers: Record<string, string> | null;
@@ -185,9 +185,9 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
185
185
  id: string;
186
186
  createdAt: string;
187
187
  updatedAt: string;
188
- agentId: string;
189
188
  projectId: string;
190
189
  tenantId: string;
190
+ agentId: string;
191
191
  subAgentId: string;
192
192
  toolId: string;
193
193
  headers: Record<string, string> | null;
@@ -203,18 +203,18 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
203
203
  data: ToolInsert;
204
204
  }) => Promise<{
205
205
  id: string;
206
- name: string;
207
206
  createdAt: string;
207
+ name: string;
208
208
  updatedAt: string;
209
- description: string | null;
210
209
  projectId: string;
211
210
  tenantId: string;
211
+ description: string | null;
212
212
  headers: Record<string, string> | null;
213
+ credentialReferenceId: string | null;
213
214
  config: {
214
215
  type: "mcp";
215
216
  mcp: ToolMcpConfig;
216
217
  };
217
- credentialReferenceId: string | null;
218
218
  credentialScope: string;
219
219
  imageUrl: string | null;
220
220
  capabilities: ToolServerCapabilities | null;
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
40
40
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
41
  encoding: "hex" | "base64";
42
42
  signature: {
43
- source: "query" | "body" | "header";
43
+ source: "query" | "header" | "body";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "body" | "header";
49
+ source: "literal" | "header" | "body";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;
@@ -132,10 +132,10 @@ declare const createTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
132
132
  userId: string;
133
133
  }) => Promise<{
134
134
  createdAt: string;
135
- userId: string;
136
- agentId: string;
137
135
  projectId: string;
138
136
  tenantId: string;
137
+ agentId: string;
138
+ userId: string;
139
139
  triggerId: string;
140
140
  }>;
141
141
  declare const deleteTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
@@ -9,48 +9,48 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
9
9
  id: string;
10
10
  }) => Promise<{
11
11
  id: string;
12
- name: string | null;
13
12
  createdAt: string;
13
+ name: string | null;
14
14
  updatedAt: string;
15
- expiresAt: string | null;
16
- agentId: string;
17
15
  projectId: string;
18
16
  tenantId: string;
17
+ agentId: string;
18
+ expiresAt: string | null;
19
+ lastUsedAt: string | null;
19
20
  publicId: string;
20
21
  keyHash: string;
21
22
  keyPrefix: string;
22
- lastUsedAt: string | null;
23
23
  } | undefined>;
24
24
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
25
25
  id: string;
26
- name: string | null;
27
26
  createdAt: string;
27
+ name: string | null;
28
28
  updatedAt: string;
29
- expiresAt: string | null;
30
- agentId: string;
31
29
  projectId: string;
32
30
  tenantId: string;
31
+ agentId: string;
32
+ expiresAt: string | null;
33
+ lastUsedAt: string | null;
33
34
  publicId: string;
34
35
  keyHash: string;
35
36
  keyPrefix: string;
36
- lastUsedAt: string | null;
37
37
  } | undefined>;
38
38
  declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
39
39
  scopes: ProjectScopeConfig;
40
40
  agentId?: string;
41
41
  }) => Promise<{
42
42
  id: string;
43
- name: string | null;
44
43
  createdAt: string;
44
+ name: string | null;
45
45
  updatedAt: string;
46
- expiresAt: string | null;
47
- agentId: string;
48
46
  projectId: string;
49
47
  tenantId: string;
48
+ agentId: string;
49
+ expiresAt: string | null;
50
+ lastUsedAt: string | null;
50
51
  publicId: string;
51
52
  keyHash: string;
52
53
  keyPrefix: string;
53
- lastUsedAt: string | null;
54
54
  }[]>;
55
55
  declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
56
56
  scopes: ProjectScopeConfig;
@@ -67,17 +67,17 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
67
67
  }>;
68
68
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
69
69
  id: string;
70
- name: string | null;
71
70
  createdAt: string;
71
+ name: string | null;
72
72
  updatedAt: string;
73
- expiresAt: string | null;
74
- agentId: string;
75
73
  projectId: string;
76
74
  tenantId: string;
75
+ agentId: string;
76
+ expiresAt: string | null;
77
+ lastUsedAt: string | null;
77
78
  publicId: string;
78
79
  keyHash: string;
79
80
  keyPrefix: string;
80
- lastUsedAt: string | null;
81
81
  }>;
82
82
  declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
83
83
  scopes: ProjectScopeConfig;
@@ -6,13 +6,13 @@ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
6
6
  //#region src/data-access/runtime/apps.d.ts
7
7
  declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
8
8
  id: string;
9
- name: string;
10
9
  createdAt: string;
10
+ name: string;
11
11
  updatedAt: string;
12
- type: AppType;
13
- description: string | null;
14
12
  projectId: string | null;
15
13
  tenantId: string | null;
14
+ description: string | null;
15
+ type: AppType;
16
16
  enabled: boolean;
17
17
  prompt: string | null;
18
18
  config: {
@@ -45,9 +45,9 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
45
45
  }[] | undefined;
46
46
  };
47
47
  };
48
- lastUsedAt: string | null;
49
- defaultProjectId: string | null;
50
48
  defaultAgentId: string | null;
49
+ defaultProjectId: string | null;
50
+ lastUsedAt: string | null;
51
51
  } | undefined>;
52
52
  declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
53
53
  declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
@@ -75,13 +75,13 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
75
75
  }>;
76
76
  declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
77
77
  id: string;
78
- name: string;
79
78
  createdAt: string;
79
+ name: string;
80
80
  updatedAt: string;
81
- type: AppType;
82
- description: string | null;
83
81
  projectId: string | null;
84
82
  tenantId: string | null;
83
+ description: string | null;
84
+ type: AppType;
85
85
  enabled: boolean;
86
86
  prompt: string | null;
87
87
  config: {
@@ -114,9 +114,9 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
114
114
  }[] | undefined;
115
115
  };
116
116
  };
117
- lastUsedAt: string | null;
118
- defaultProjectId: string | null;
119
117
  defaultAgentId: string | null;
118
+ defaultProjectId: string | null;
119
+ lastUsedAt: string | null;
120
120
  }>;
121
121
  declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
122
122
  scopes: TenantScopeConfig;
@@ -18,18 +18,18 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
18
18
  id: string;
19
19
  createdAt: string;
20
20
  updatedAt: string;
21
+ projectId: string;
22
+ tenantId: string;
23
+ metadata: ConversationMetadata | null;
24
+ properties: Record<string, unknown> | null;
25
+ title: string | null;
26
+ agentId: string | null;
27
+ userId: string | null;
21
28
  ref: {
22
29
  type: "commit" | "tag" | "branch";
23
30
  name: string;
24
31
  hash: string;
25
32
  } | null;
26
- userId: string | null;
27
- metadata: ConversationMetadata | null;
28
- properties: Record<string, unknown> | null;
29
- title: string | null;
30
- agentId: string | null;
31
- projectId: string;
32
- tenantId: string;
33
33
  activeSubAgentId: string;
34
34
  lastContextResolution: string | null;
35
35
  userProperties: Record<string, unknown> | null;
@@ -93,18 +93,18 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
93
93
  id: string;
94
94
  createdAt: string;
95
95
  updatedAt: string;
96
+ projectId: string;
97
+ tenantId: string;
98
+ metadata: ConversationMetadata | null;
99
+ properties: Record<string, unknown> | null;
100
+ title: string | null;
101
+ agentId: string | null;
102
+ userId: string | null;
96
103
  ref: {
97
104
  type: "commit" | "tag" | "branch";
98
105
  name: string;
99
106
  hash: string;
100
107
  } | null;
101
- userId: string | null;
102
- metadata: ConversationMetadata | null;
103
- properties: Record<string, unknown> | null;
104
- title: string | null;
105
- agentId: string | null;
106
- projectId: string;
107
- tenantId: string;
108
108
  activeSubAgentId: string;
109
109
  lastContextResolution: string | null;
110
110
  userProperties: Record<string, unknown> | null;
@@ -133,18 +133,18 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
133
133
  id: string;
134
134
  createdAt: string;
135
135
  updatedAt: string;
136
+ projectId: string;
137
+ tenantId: string;
138
+ metadata: ConversationMetadata | null;
139
+ properties: Record<string, unknown> | null;
140
+ title: string | null;
141
+ agentId: string | null;
142
+ userId: string | null;
136
143
  ref: {
137
144
  type: "commit" | "tag" | "branch";
138
145
  name: string;
139
146
  hash: string;
140
147
  } | null;
141
- userId: string | null;
142
- metadata: ConversationMetadata | null;
143
- properties: Record<string, unknown> | null;
144
- title: string | null;
145
- agentId: string | null;
146
- projectId: string;
147
- tenantId: string;
148
148
  activeSubAgentId: string;
149
149
  lastContextResolution: string | null;
150
150
  userProperties: Record<string, unknown> | null;
@@ -167,18 +167,18 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
167
167
  id: string;
168
168
  createdAt: string;
169
169
  updatedAt: string;
170
+ projectId: string;
171
+ tenantId: string;
172
+ metadata: ConversationMetadata | null;
173
+ properties: Record<string, unknown> | null;
174
+ title: string | null;
175
+ agentId: string | null;
176
+ userId: string | null;
170
177
  ref: {
171
178
  type: "commit" | "tag" | "branch";
172
179
  name: string;
173
180
  hash: string;
174
181
  } | null;
175
- userId: string | null;
176
- metadata: ConversationMetadata | null;
177
- properties: Record<string, unknown> | null;
178
- title: string | null;
179
- agentId: string | null;
180
- projectId: string;
181
- tenantId: string;
182
182
  activeSubAgentId: string;
183
183
  lastContextResolution: string | null;
184
184
  userProperties: Record<string, unknown> | null;
@@ -10,12 +10,12 @@ declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert
10
10
  id: string;
11
11
  createdAt: string;
12
12
  updatedAt: string;
13
- type: string;
13
+ projectId: string;
14
+ tenantId: string;
14
15
  metadata: Record<string, unknown> | null;
16
+ type: string;
15
17
  properties: Record<string, unknown> | null;
16
18
  agentId: string | null;
17
- projectId: string;
18
- tenantId: string;
19
19
  conversationId: string | null;
20
20
  userProperties: Record<string, unknown> | null;
21
21
  messageId: string | null;
@@ -73,9 +73,9 @@ declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: Feedback
73
73
  id: string;
74
74
  createdAt: string;
75
75
  updatedAt: string;
76
- type: "positive" | "negative";
77
76
  projectId: string;
78
77
  tenantId: string;
78
+ type: "positive" | "negative";
79
79
  conversationId: string;
80
80
  messageId: string | null;
81
81
  details: string | null;
@@ -103,9 +103,9 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
103
103
  id: string;
104
104
  createdAt: string;
105
105
  updatedAt: string;
106
- type: "positive" | "negative";
107
106
  projectId: string;
108
107
  tenantId: string;
108
+ type: "positive" | "negative";
109
109
  conversationId: string;
110
110
  messageId: string | null;
111
111
  details: string | null;
@@ -11,14 +11,14 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
11
11
  messageId: string;
12
12
  }) => Promise<{
13
13
  id: string;
14
+ content: MessageContent;
14
15
  createdAt: string;
15
16
  updatedAt: string;
16
- metadata: MessageMetadata | null;
17
- role: string;
18
- properties: Record<string, unknown> | null;
19
17
  projectId: string;
20
18
  tenantId: string;
21
- content: MessageContent;
19
+ metadata: MessageMetadata | null;
20
+ properties: Record<string, unknown> | null;
21
+ role: string;
22
22
  conversationId: string;
23
23
  userProperties: Record<string, unknown> | null;
24
24
  fromSubAgentId: string | null;
@@ -155,14 +155,14 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
155
155
  data: Omit<MessageInsert, "tenantId" | "projectId">;
156
156
  }) => Promise<{
157
157
  id: string;
158
+ content: MessageContent;
158
159
  createdAt: string;
159
160
  updatedAt: string;
160
- metadata: MessageMetadata | null;
161
- role: string;
162
- properties: Record<string, unknown> | null;
163
161
  projectId: string;
164
162
  tenantId: string;
165
- content: MessageContent;
163
+ metadata: MessageMetadata | null;
164
+ properties: Record<string, unknown> | null;
165
+ role: string;
166
166
  conversationId: string;
167
167
  userProperties: Record<string, unknown> | null;
168
168
  fromSubAgentId: string | null;
@@ -212,14 +212,14 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
212
212
  messageId: string;
213
213
  }) => Promise<{
214
214
  id: string;
215
+ content: MessageContent;
215
216
  createdAt: string;
216
217
  updatedAt: string;
217
- metadata: MessageMetadata | null;
218
- role: string;
219
- properties: Record<string, unknown> | null;
220
218
  projectId: string;
221
219
  tenantId: string;
222
- content: MessageContent;
220
+ metadata: MessageMetadata | null;
221
+ properties: Record<string, unknown> | null;
222
+ role: string;
223
223
  conversationId: string;
224
224
  userProperties: Record<string, unknown> | null;
225
225
  fromSubAgentId: string | null;
@@ -16,9 +16,9 @@ declare const createScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (para
16
16
  userId: string;
17
17
  }) => Promise<{
18
18
  createdAt: string;
19
+ tenantId: string;
19
20
  userId: string;
20
21
  scheduledTriggerId: string;
21
- tenantId: string;
22
22
  }>;
23
23
  declare const deleteScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (params: {
24
24
  tenantId: string;
@@ -10,17 +10,17 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
10
10
  id: string;
11
11
  createdAt: string;
12
12
  updatedAt: string;
13
+ projectId: string;
14
+ tenantId: string;
15
+ metadata: TaskMetadataConfig | null;
16
+ agentId: string;
17
+ subAgentId: string;
13
18
  ref: {
14
19
  type: "commit" | "tag" | "branch";
15
20
  name: string;
16
21
  hash: string;
17
22
  } | null;
18
- metadata: TaskMetadataConfig | null;
19
23
  status: string;
20
- agentId: string;
21
- projectId: string;
22
- tenantId: string;
23
- subAgentId: 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,