@inkeep/agents-core 0.49.0 → 0.50.1

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 (35) hide show
  1. package/dist/auth/auth-schema.d.ts +105 -105
  2. package/dist/auth/auth-validation-schemas.d.ts +148 -148
  3. package/dist/auth/auth.d.ts +22 -22
  4. package/dist/auth/permissions.d.ts +9 -9
  5. package/dist/client-exports.d.ts +2 -2
  6. package/dist/data-access/manage/agents.d.ts +11 -11
  7. package/dist/data-access/manage/agents.js +8 -6
  8. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  9. package/dist/data-access/manage/artifactComponents.js +3 -3
  10. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  11. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  12. package/dist/data-access/manage/dataComponents.js +2 -2
  13. package/dist/data-access/manage/functionTools.d.ts +8 -8
  14. package/dist/data-access/manage/skills.d.ts +11 -11
  15. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  16. package/dist/data-access/manage/subAgentRelations.d.ts +4 -4
  17. package/dist/data-access/manage/subAgentRelations.js +2 -2
  18. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
  19. package/dist/data-access/manage/subAgents.d.ts +6 -6
  20. package/dist/data-access/manage/tools.d.ts +12 -12
  21. package/dist/data-access/runtime/apiKeys.d.ts +16 -16
  22. package/dist/data-access/runtime/conversations.d.ts +31 -31
  23. package/dist/data-access/runtime/messages.d.ts +18 -18
  24. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +3 -3
  25. package/dist/data-access/runtime/tasks.d.ts +9 -9
  26. package/dist/db/manage/manage-schema.d.ts +445 -445
  27. package/dist/db/runtime/runtime-schema.d.ts +298 -298
  28. package/dist/setup/index.d.ts +2 -0
  29. package/dist/setup/index.js +3 -0
  30. package/dist/setup/setup.d.ts +24 -0
  31. package/dist/setup/setup.js +506 -0
  32. package/dist/validation/dolt-schemas.d.ts +1 -1
  33. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  34. package/dist/validation/schemas.d.ts +1792 -1792
  35. package/package.json +5 -1
@@ -9,11 +9,11 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
9
9
  relationId: string;
10
10
  }) => Promise<{
11
11
  id: string;
12
- createdAt: string;
13
- updatedAt: string;
14
12
  tenantId: string;
15
13
  projectId: string;
16
14
  agentId: string;
15
+ createdAt: string;
16
+ updatedAt: string;
17
17
  headers: Record<string, string> | null;
18
18
  externalAgentId: string;
19
19
  subAgentId: string;
@@ -44,11 +44,11 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
46
  id: string;
47
- createdAt: string;
48
- updatedAt: string;
49
47
  tenantId: string;
50
48
  projectId: string;
51
49
  agentId: string;
50
+ createdAt: string;
51
+ updatedAt: string;
52
52
  headers: Record<string, string> | null;
53
53
  externalAgentId: string;
54
54
  subAgentId: string;
@@ -57,11 +57,11 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
59
  id: string;
60
- createdAt: string;
61
- updatedAt: string;
62
60
  tenantId: string;
63
61
  projectId: string;
64
62
  agentId: string;
63
+ createdAt: string;
64
+ updatedAt: string;
65
65
  headers: Record<string, string> | null;
66
66
  externalAgentId: string;
67
67
  subAgentId: string;
@@ -180,11 +180,11 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
180
180
  };
181
181
  }) => Promise<{
182
182
  id: string;
183
- createdAt: string;
184
- updatedAt: string;
185
183
  tenantId: string;
186
184
  projectId: string;
187
185
  agentId: string;
186
+ createdAt: string;
187
+ updatedAt: string;
188
188
  headers: Record<string, string> | null;
189
189
  externalAgentId: string;
190
190
  subAgentId: string;
@@ -197,11 +197,11 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
197
197
  externalAgentId: string;
198
198
  }) => Promise<{
199
199
  id: string;
200
- createdAt: string;
201
- updatedAt: string;
202
200
  tenantId: string;
203
201
  projectId: string;
204
202
  agentId: string;
203
+ createdAt: string;
204
+ updatedAt: string;
205
205
  headers: Record<string, string> | null;
206
206
  externalAgentId: string;
207
207
  subAgentId: string;
@@ -218,11 +218,11 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
218
218
  };
219
219
  }) => Promise<{
220
220
  id: string;
221
- createdAt: string;
222
- updatedAt: string;
223
221
  tenantId: string;
224
222
  projectId: string;
225
223
  agentId: string;
224
+ createdAt: string;
225
+ updatedAt: string;
226
226
  headers: Record<string, string> | null;
227
227
  externalAgentId: string;
228
228
  subAgentId: string;
@@ -210,12 +210,12 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
210
210
  projectId: string;
211
211
  agentId: string;
212
212
  toolId: string;
213
+ subAgentId: string;
213
214
  headers: Record<string, string> | null;
215
+ selectedTools: string[] | null;
214
216
  toolPolicies: Record<string, {
215
217
  needsApproval?: boolean;
216
218
  }> | null;
217
- subAgentId: string;
218
- selectedTools: string[] | null;
219
219
  }>;
220
220
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
221
221
  scopes: AgentScopeConfig;
@@ -254,12 +254,12 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
254
254
  projectId: string;
255
255
  agentId: string;
256
256
  toolId: string;
257
+ subAgentId: string;
257
258
  headers: Record<string, string> | null;
259
+ selectedTools: string[] | null;
258
260
  toolPolicies: Record<string, {
259
261
  needsApproval?: boolean;
260
262
  }> | null;
261
- subAgentId: string;
262
- selectedTools: string[] | null;
263
263
  } | undefined>;
264
264
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
265
265
  scopes: SubAgentScopeConfig;
@@ -124,7 +124,7 @@ const deleteSubAgentRelation = (db) => async (params) => {
124
124
  return (await db.delete(subAgentRelations).where(and(eq(subAgentRelations.tenantId, params.scopes.tenantId), eq(subAgentRelations.projectId, params.scopes.projectId), eq(subAgentRelations.agentId, params.scopes.agentId), eq(subAgentRelations.id, params.relationId))).returning()).length > 0;
125
125
  };
126
126
  const deleteAgentRelationsByAgent = (db) => async (params) => {
127
- return (await db.delete(subAgentRelations).where(and(eq(subAgentRelations.tenantId, params.scopes.tenantId), eq(subAgentRelations.agentId, params.scopes.agentId))).returning()).length > 0;
127
+ return (await db.delete(subAgentRelations).where(and(eq(subAgentRelations.tenantId, params.scopes.tenantId), eq(subAgentRelations.projectId, params.scopes.projectId), eq(subAgentRelations.agentId, params.scopes.agentId))).returning()).length > 0;
128
128
  };
129
129
  const createAgentToolRelation = (db) => async (params) => {
130
130
  const finalRelationId = params.relationId ?? generateId();
@@ -160,7 +160,7 @@ const getAgentToolRelationByAgent = (db) => async (params) => {
160
160
  const page = params.pagination?.page || 1;
161
161
  const limit = Math.min(params.pagination?.limit || 10, 100);
162
162
  const offset = (page - 1) * limit;
163
- const [data, totalResult] = await Promise.all([db.select().from(subAgentToolRelations).where(and(eq(subAgentToolRelations.tenantId, params.scopes.tenantId), eq(subAgentToolRelations.projectId, params.scopes.projectId), eq(subAgentToolRelations.subAgentId, params.scopes.subAgentId))).limit(limit).offset(offset).orderBy(desc(subAgentToolRelations.createdAt)), db.select({ count: count() }).from(subAgentToolRelations).where(and(eq(subAgentToolRelations.tenantId, params.scopes.tenantId), eq(subAgentToolRelations.projectId, params.scopes.projectId), eq(subAgentToolRelations.subAgentId, params.scopes.subAgentId)))]);
163
+ const [data, totalResult] = await Promise.all([db.select().from(subAgentToolRelations).where(and(eq(subAgentToolRelations.tenantId, params.scopes.tenantId), eq(subAgentToolRelations.projectId, params.scopes.projectId), eq(subAgentToolRelations.agentId, params.scopes.agentId), eq(subAgentToolRelations.subAgentId, params.scopes.subAgentId))).limit(limit).offset(offset).orderBy(desc(subAgentToolRelations.createdAt)), db.select({ count: count() }).from(subAgentToolRelations).where(and(eq(subAgentToolRelations.tenantId, params.scopes.tenantId), eq(subAgentToolRelations.projectId, params.scopes.projectId), eq(subAgentToolRelations.agentId, params.scopes.agentId), eq(subAgentToolRelations.subAgentId, params.scopes.subAgentId)))]);
164
164
  const total = totalResult[0]?.count || 0;
165
165
  return {
166
166
  data,
@@ -9,11 +9,11 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
9
9
  relationId: string;
10
10
  }) => Promise<{
11
11
  id: string;
12
- createdAt: string;
13
- updatedAt: string;
14
12
  tenantId: string;
15
13
  projectId: string;
16
14
  agentId: string;
15
+ createdAt: string;
16
+ updatedAt: string;
17
17
  headers: Record<string, string> | null;
18
18
  subAgentId: string;
19
19
  targetAgentId: string;
@@ -44,11 +44,11 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
46
  id: string;
47
- createdAt: string;
48
- updatedAt: string;
49
47
  tenantId: string;
50
48
  projectId: string;
51
49
  agentId: string;
50
+ createdAt: string;
51
+ updatedAt: string;
52
52
  headers: Record<string, string> | null;
53
53
  subAgentId: string;
54
54
  targetAgentId: string;
@@ -57,11 +57,11 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
59
  id: string;
60
- createdAt: string;
61
- updatedAt: string;
62
60
  tenantId: string;
63
61
  projectId: string;
64
62
  agentId: string;
63
+ createdAt: string;
64
+ updatedAt: string;
65
65
  headers: Record<string, string> | null;
66
66
  subAgentId: string;
67
67
  targetAgentId: string;
@@ -210,11 +210,11 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
210
210
  };
211
211
  }) => Promise<{
212
212
  id: string;
213
- createdAt: string;
214
- updatedAt: string;
215
213
  tenantId: string;
216
214
  projectId: string;
217
215
  agentId: string;
216
+ createdAt: string;
217
+ updatedAt: string;
218
218
  headers: Record<string, string> | null;
219
219
  subAgentId: string;
220
220
  targetAgentId: string;
@@ -227,11 +227,11 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
227
227
  targetAgentId: string;
228
228
  }) => Promise<{
229
229
  id: string;
230
- createdAt: string;
231
- updatedAt: string;
232
230
  tenantId: string;
233
231
  projectId: string;
234
232
  agentId: string;
233
+ createdAt: string;
234
+ updatedAt: string;
235
235
  headers: Record<string, string> | null;
236
236
  subAgentId: string;
237
237
  targetAgentId: string;
@@ -248,11 +248,11 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
248
248
  };
249
249
  }) => Promise<{
250
250
  id: string;
251
- createdAt: string;
252
- updatedAt: string;
253
251
  tenantId: string;
254
252
  projectId: string;
255
253
  agentId: string;
254
+ createdAt: string;
255
+ updatedAt: string;
256
256
  headers: Record<string, string> | null;
257
257
  subAgentId: string;
258
258
  targetAgentId: string;
@@ -10,8 +10,6 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
10
10
  }) => Promise<{
11
11
  id: string;
12
12
  name: string;
13
- createdAt: string;
14
- updatedAt: string;
15
13
  description: string | null;
16
14
  tenantId: string;
17
15
  projectId: string;
@@ -35,14 +33,14 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
35
33
  stopWhen: {
36
34
  stepCountIs?: number | undefined;
37
35
  } | null;
36
+ createdAt: string;
37
+ updatedAt: string;
38
38
  } | undefined>;
39
39
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
40
40
  scopes: AgentScopeConfig;
41
41
  }) => Promise<{
42
42
  id: string;
43
43
  name: string;
44
- createdAt: string;
45
- updatedAt: string;
46
44
  description: string | null;
47
45
  tenantId: string;
48
46
  projectId: string;
@@ -66,6 +64,8 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
66
64
  stopWhen: {
67
65
  stepCountIs?: number | undefined;
68
66
  } | null;
67
+ createdAt: string;
68
+ updatedAt: string;
69
69
  }[]>;
70
70
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
71
71
  scopes: AgentScopeConfig;
@@ -110,8 +110,6 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
110
110
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
111
111
  id: string;
112
112
  name: string;
113
- createdAt: string;
114
- updatedAt: string;
115
113
  description: string | null;
116
114
  tenantId: string;
117
115
  projectId: string;
@@ -135,6 +133,8 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
135
133
  stopWhen: {
136
134
  stepCountIs?: number | undefined;
137
135
  } | null;
136
+ createdAt: string;
137
+ updatedAt: string;
138
138
  }>;
139
139
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
140
140
  scopes: AgentScopeConfig;
@@ -20,11 +20,11 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
20
20
  }) => Promise<{
21
21
  id: string;
22
22
  name: string;
23
- createdAt: string;
24
- updatedAt: string;
25
23
  description: string | null;
26
24
  tenantId: string;
27
25
  projectId: string;
26
+ createdAt: string;
27
+ updatedAt: string;
28
28
  headers: Record<string, string> | null;
29
29
  config: {
30
30
  type: "mcp";
@@ -78,11 +78,11 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
78
78
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
79
79
  id: string;
80
80
  name: string;
81
- createdAt: string;
82
- updatedAt: string;
83
81
  description: string | null;
84
82
  tenantId: string;
85
83
  projectId: string;
84
+ createdAt: string;
85
+ updatedAt: string;
86
86
  headers: Record<string, string> | null;
87
87
  config: {
88
88
  type: "mcp";
@@ -134,11 +134,11 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
134
134
  }> | null;
135
135
  }) => Promise<{
136
136
  id: string;
137
- createdAt: string;
138
- updatedAt: string;
139
137
  tenantId: string;
140
138
  projectId: string;
141
139
  agentId: string;
140
+ createdAt: string;
141
+ updatedAt: string;
142
142
  toolId: string;
143
143
  headers: Record<string, string> | null;
144
144
  toolPolicies: Record<string, {
@@ -153,11 +153,11 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
153
153
  toolId: string;
154
154
  }) => Promise<{
155
155
  id: string;
156
- createdAt: string;
157
- updatedAt: string;
158
156
  tenantId: string;
159
157
  projectId: string;
160
158
  agentId: string;
159
+ createdAt: string;
160
+ updatedAt: string;
161
161
  toolId: string;
162
162
  headers: Record<string, string> | null;
163
163
  toolPolicies: Record<string, {
@@ -181,11 +181,11 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
181
181
  relationId?: string;
182
182
  }) => Promise<{
183
183
  id: string;
184
- createdAt: string;
185
- updatedAt: string;
186
184
  tenantId: string;
187
185
  projectId: string;
188
186
  agentId: string;
187
+ createdAt: string;
188
+ updatedAt: string;
189
189
  toolId: string;
190
190
  headers: Record<string, string> | null;
191
191
  toolPolicies: Record<string, {
@@ -202,11 +202,11 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
202
202
  }) => Promise<{
203
203
  id: string;
204
204
  name: string;
205
- createdAt: string;
206
- updatedAt: string;
207
205
  description: string | null;
208
206
  tenantId: string;
209
207
  projectId: string;
208
+ createdAt: string;
209
+ updatedAt: string;
210
210
  headers: Record<string, string> | null;
211
211
  config: {
212
212
  type: "mcp";
@@ -9,30 +9,30 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
9
9
  }) => Promise<{
10
10
  id: string;
11
11
  name: string | null;
12
- createdAt: string;
13
- updatedAt: string;
14
- expiresAt: string | null;
15
12
  tenantId: string;
16
13
  projectId: string;
17
14
  agentId: string;
18
- lastUsedAt: string | null;
15
+ createdAt: string;
16
+ updatedAt: string;
19
17
  publicId: string;
20
18
  keyHash: string;
21
19
  keyPrefix: string;
20
+ lastUsedAt: string | null;
21
+ expiresAt: string | null;
22
22
  } | undefined>;
23
23
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
24
24
  id: string;
25
25
  name: string | null;
26
- createdAt: string;
27
- updatedAt: string;
28
- expiresAt: string | null;
29
26
  tenantId: string;
30
27
  projectId: string;
31
28
  agentId: string;
32
- lastUsedAt: string | null;
29
+ createdAt: string;
30
+ updatedAt: string;
33
31
  publicId: string;
34
32
  keyHash: string;
35
33
  keyPrefix: string;
34
+ lastUsedAt: string | null;
35
+ expiresAt: string | null;
36
36
  } | undefined>;
37
37
  declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
38
38
  scopes: ProjectScopeConfig;
@@ -40,16 +40,16 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
40
40
  }) => Promise<{
41
41
  id: string;
42
42
  name: string | null;
43
- createdAt: string;
44
- updatedAt: string;
45
- expiresAt: string | null;
46
43
  tenantId: string;
47
44
  projectId: string;
48
45
  agentId: string;
49
- lastUsedAt: string | null;
46
+ createdAt: string;
47
+ updatedAt: string;
50
48
  publicId: string;
51
49
  keyHash: string;
52
50
  keyPrefix: string;
51
+ lastUsedAt: string | null;
52
+ expiresAt: string | null;
53
53
  }[]>;
54
54
  declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
55
55
  scopes: ProjectScopeConfig;
@@ -67,16 +67,16 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
67
67
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
68
68
  id: string;
69
69
  name: string | null;
70
- createdAt: string;
71
- updatedAt: string;
72
- expiresAt: string | null;
73
70
  tenantId: string;
74
71
  projectId: string;
75
72
  agentId: string;
76
- lastUsedAt: string | null;
73
+ createdAt: string;
74
+ updatedAt: string;
77
75
  publicId: string;
78
76
  keyHash: string;
79
77
  keyPrefix: string;
78
+ lastUsedAt: string | null;
79
+ expiresAt: string | null;
80
80
  }>;
81
81
  declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
82
82
  scopes: ProjectScopeConfig;
@@ -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
+ tenantId: string;
20
+ projectId: string;
21
+ agentId: string | null;
22
+ title: string | null;
19
23
  createdAt: string;
20
24
  updatedAt: string;
25
+ metadata: ConversationMetadata | null;
26
+ userId: string | null;
21
27
  ref: {
22
- type: "tag" | "commit" | "branch";
28
+ type: "commit" | "tag" | "branch";
23
29
  name: string;
24
30
  hash: string;
25
31
  } | null;
26
- userId: string | null;
27
- metadata: ConversationMetadata | null;
28
- tenantId: string;
29
- projectId: string;
30
- agentId: string | null;
31
- title: string | null;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
@@ -43,7 +43,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
43
43
  agentId: string | null;
44
44
  activeSubAgentId: string;
45
45
  ref: {
46
- type: "tag" | "commit" | "branch";
46
+ type: "commit" | "tag" | "branch";
47
47
  name: string;
48
48
  hash: string;
49
49
  } | null;
@@ -69,7 +69,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
69
69
  agentId: string | null;
70
70
  activeSubAgentId: string;
71
71
  ref: {
72
- type: "tag" | "commit" | "branch";
72
+ type: "commit" | "tag" | "branch";
73
73
  name: string;
74
74
  hash: string;
75
75
  } | null;
@@ -85,19 +85,19 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
85
85
  conversationId: string;
86
86
  }) => Promise<{
87
87
  id: string;
88
+ tenantId: string;
89
+ projectId: string;
90
+ agentId: string | null;
91
+ title: string | null;
88
92
  createdAt: string;
89
93
  updatedAt: string;
94
+ metadata: ConversationMetadata | null;
95
+ userId: string | null;
90
96
  ref: {
91
- type: "tag" | "commit" | "branch";
97
+ type: "commit" | "tag" | "branch";
92
98
  name: string;
93
99
  hash: string;
94
100
  } | null;
95
- userId: string | null;
96
- metadata: ConversationMetadata | null;
97
- tenantId: string;
98
- projectId: string;
99
- agentId: string | null;
100
- title: string | null;
101
101
  activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
103
103
  } | undefined>;
@@ -107,7 +107,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
107
107
  tenantId: string;
108
108
  id: string;
109
109
  ref: {
110
- type: "tag" | "commit" | "branch";
110
+ type: "commit" | "tag" | "branch";
111
111
  name: string;
112
112
  hash: string;
113
113
  };
@@ -121,19 +121,19 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
121
121
  contextConfigId?: string | undefined;
122
122
  } | {
123
123
  id: string;
124
+ tenantId: string;
125
+ projectId: string;
126
+ agentId: string | null;
127
+ title: string | null;
124
128
  createdAt: string;
125
129
  updatedAt: string;
130
+ metadata: ConversationMetadata | null;
131
+ userId: string | null;
126
132
  ref: {
127
- type: "tag" | "commit" | "branch";
133
+ type: "commit" | "tag" | "branch";
128
134
  name: string;
129
135
  hash: string;
130
136
  } | null;
131
- userId: string | null;
132
- metadata: ConversationMetadata | null;
133
- tenantId: string;
134
- projectId: string;
135
- agentId: string | null;
136
- title: string | 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
+ tenantId: string;
157
+ projectId: string;
158
+ agentId: string | null;
159
+ title: string | null;
156
160
  createdAt: string;
157
161
  updatedAt: string;
162
+ metadata: ConversationMetadata | null;
163
+ userId: string | null;
158
164
  ref: {
159
- type: "tag" | "commit" | "branch";
165
+ type: "commit" | "tag" | "branch";
160
166
  name: string;
161
167
  hash: string;
162
168
  } | null;
163
- userId: string | null;
164
- metadata: ConversationMetadata | null;
165
- tenantId: string;
166
- projectId: string;
167
- agentId: string | null;
168
- title: string | null;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
@@ -10,25 +10,25 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  messageId: string;
11
11
  }) => Promise<{
12
12
  id: string;
13
+ tenantId: string;
14
+ projectId: string;
13
15
  createdAt: string;
14
16
  updatedAt: string;
15
17
  metadata: MessageMetadata | null;
16
- role: string;
17
- tenantId: string;
18
- projectId: string;
19
18
  content: MessageContent;
20
- conversationId: string;
21
19
  fromSubAgentId: string | null;
22
20
  toSubAgentId: string | null;
23
21
  fromExternalAgentId: string | null;
24
22
  toExternalAgentId: string | null;
23
+ taskId: string | null;
24
+ a2aTaskId: string | null;
25
+ conversationId: string;
26
+ role: string;
25
27
  fromTeamAgentId: string | null;
26
28
  toTeamAgentId: string | null;
27
29
  visibility: string;
28
30
  messageType: string;
29
- taskId: string | null;
30
31
  parentMessageId: string | null;
31
- a2aTaskId: string | null;
32
32
  a2aSessionId: string | null;
33
33
  } | undefined>;
34
34
  declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
@@ -141,25 +141,25 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
141
141
  }[]>;
142
142
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
143
143
  id: string;
144
+ tenantId: string;
145
+ projectId: string;
144
146
  createdAt: string;
145
147
  updatedAt: string;
146
148
  metadata: MessageMetadata | null;
147
- role: string;
148
- tenantId: string;
149
- projectId: string;
150
149
  content: MessageContent;
151
- conversationId: string;
152
150
  fromSubAgentId: string | null;
153
151
  toSubAgentId: string | null;
154
152
  fromExternalAgentId: string | null;
155
153
  toExternalAgentId: string | null;
154
+ taskId: string | null;
155
+ a2aTaskId: string | null;
156
+ conversationId: string;
157
+ role: string;
156
158
  fromTeamAgentId: string | null;
157
159
  toTeamAgentId: string | null;
158
160
  visibility: string;
159
161
  messageType: string;
160
- taskId: string | null;
161
162
  parentMessageId: string | null;
162
- a2aTaskId: string | null;
163
163
  a2aSessionId: string | null;
164
164
  }>;
165
165
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -194,25 +194,25 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
194
194
  messageId: string;
195
195
  }) => Promise<{
196
196
  id: string;
197
+ tenantId: string;
198
+ projectId: string;
197
199
  createdAt: string;
198
200
  updatedAt: string;
199
201
  metadata: MessageMetadata | null;
200
- role: string;
201
- tenantId: string;
202
- projectId: string;
203
202
  content: MessageContent;
204
- conversationId: string;
205
203
  fromSubAgentId: string | null;
206
204
  toSubAgentId: string | null;
207
205
  fromExternalAgentId: string | null;
208
206
  toExternalAgentId: string | null;
207
+ taskId: string | null;
208
+ a2aTaskId: string | null;
209
+ conversationId: string;
210
+ role: string;
209
211
  fromTeamAgentId: string | null;
210
212
  toTeamAgentId: string | null;
211
213
  visibility: string;
212
214
  messageType: string;
213
- taskId: string | null;
214
215
  parentMessageId: string | null;
215
- a2aTaskId: string | null;
216
216
  a2aSessionId: string | null;
217
217
  }>;
218
218
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -34,7 +34,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
34
34
  }) => Promise<{
35
35
  data: {
36
36
  scheduledTriggerId: string;
37
- status: "pending" | "running" | "completed" | "failed" | "cancelled";
37
+ status: "pending" | "failed" | "running" | "completed" | "cancelled";
38
38
  scheduledFor: string;
39
39
  startedAt: string | null;
40
40
  completedAt: string | null;
@@ -174,7 +174,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
174
174
  }) => Promise<{
175
175
  data: {
176
176
  scheduledTriggerId: string;
177
- status: "pending" | "running" | "completed" | "failed" | "cancelled";
177
+ status: "pending" | "failed" | "running" | "completed" | "cancelled";
178
178
  scheduledFor: string;
179
179
  startedAt: string | null;
180
180
  completedAt: string | null;
@@ -208,7 +208,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
208
208
  }) => Promise<{
209
209
  data: {
210
210
  scheduledTriggerId: string;
211
- status: "pending" | "running" | "completed" | "failed" | "cancelled";
211
+ status: "pending" | "failed" | "running" | "completed" | "cancelled";
212
212
  scheduledFor: string;
213
213
  startedAt: string | null;
214
214
  completedAt: string | null;