@inkeep/agents-core 0.64.2 → 0.64.6

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 (58) hide show
  1. package/dist/auth/auth-schema.d.ts +86 -86
  2. package/dist/auth/auth-validation-schemas.d.ts +137 -137
  3. package/dist/auth/init.js +2 -2
  4. package/dist/constants/otel-attributes.d.ts +5 -0
  5. package/dist/constants/otel-attributes.js +7 -2
  6. package/dist/constants/signoz-queries.d.ts +1 -0
  7. package/dist/constants/signoz-queries.js +2 -1
  8. package/dist/data-access/index.d.ts +2 -1
  9. package/dist/data-access/index.js +2 -1
  10. package/dist/data-access/manage/agents.d.ts +32 -32
  11. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  12. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  13. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  14. package/dist/data-access/manage/functionTools.d.ts +10 -10
  15. package/dist/data-access/manage/skills.d.ts +5 -5
  16. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  17. package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
  18. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
  19. package/dist/data-access/manage/subAgents.d.ts +12 -12
  20. package/dist/data-access/manage/tools.d.ts +21 -21
  21. package/dist/data-access/manage/tools.js +1 -1
  22. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  23. package/dist/data-access/runtime/apps.d.ts +4 -4
  24. package/dist/data-access/runtime/conversations.d.ts +12 -12
  25. package/dist/data-access/runtime/messages.d.ts +3 -3
  26. package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
  27. package/dist/data-access/runtime/streamChunks.d.ts +29 -0
  28. package/dist/data-access/runtime/streamChunks.js +65 -0
  29. package/dist/data-access/runtime/tasks.d.ts +3 -3
  30. package/dist/db/manage/dolt-safe-jsonb.d.ts +12 -0
  31. package/dist/db/manage/dolt-safe-jsonb.js +61 -0
  32. package/dist/db/manage/manage-schema.d.ts +388 -388
  33. package/dist/db/manage/manage-schema.js +40 -39
  34. package/dist/db/runtime/runtime-schema.d.ts +136 -4
  35. package/dist/db/runtime/runtime-schema.js +20 -1
  36. package/dist/dolt/ref-helpers.js +15 -1
  37. package/dist/dolt/ref-scope.js +29 -1
  38. package/dist/index.d.ts +5 -4
  39. package/dist/index.js +5 -4
  40. package/dist/setup/setup.d.ts +3 -1
  41. package/dist/setup/setup.js +14 -10
  42. package/dist/utils/index.d.ts +3 -3
  43. package/dist/utils/index.js +3 -3
  44. package/dist/utils/jwt-helpers.d.ts +2 -3
  45. package/dist/utils/jwt-helpers.js +2 -3
  46. package/dist/utils/retry-client.d.ts +8 -0
  47. package/dist/utils/retry-client.js +29 -0
  48. package/dist/utils/service-token-auth.d.ts +3 -0
  49. package/dist/utils/service-token-auth.js +5 -2
  50. package/dist/utils/temp-jwt.d.ts +1 -6
  51. package/dist/utils/temp-jwt.js +1 -12
  52. package/dist/utils/work-app-mcp.js +1 -2
  53. package/dist/validation/schemas/skills.d.ts +25 -25
  54. package/dist/validation/schemas.d.ts +422 -422
  55. package/drizzle/runtime/0031_fantastic_gorilla_man.sql +13 -0
  56. package/drizzle/runtime/meta/0031_snapshot.json +4872 -0
  57. package/drizzle/runtime/meta/_journal.json +7 -0
  58. package/package.json +6 -2
@@ -13,9 +13,9 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
15
  headers: Record<string, string> | null;
16
- tenantId: string;
17
- projectId: string;
18
16
  agentId: string;
17
+ projectId: string;
18
+ tenantId: string;
19
19
  subAgentId: string;
20
20
  externalAgentId: string;
21
21
  } | undefined>;
@@ -48,9 +48,9 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
50
  headers: Record<string, string> | null;
51
- tenantId: string;
52
- projectId: string;
53
51
  agentId: string;
52
+ projectId: string;
53
+ tenantId: string;
54
54
  subAgentId: string;
55
55
  externalAgentId: string;
56
56
  }[]>;
@@ -61,9 +61,9 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
63
  headers: Record<string, string> | null;
64
- tenantId: string;
65
- projectId: string;
66
64
  agentId: string;
65
+ projectId: string;
66
+ tenantId: string;
67
67
  subAgentId: string;
68
68
  externalAgentId: string;
69
69
  }[]>;
@@ -190,9 +190,9 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
190
190
  createdAt: string;
191
191
  updatedAt: string;
192
192
  headers: Record<string, string> | null;
193
- tenantId: string;
194
- projectId: string;
195
193
  agentId: string;
194
+ projectId: string;
195
+ tenantId: string;
196
196
  subAgentId: string;
197
197
  externalAgentId: string;
198
198
  }>;
@@ -207,9 +207,9 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
207
207
  createdAt: string;
208
208
  updatedAt: string;
209
209
  headers: Record<string, string> | null;
210
- tenantId: string;
211
- projectId: string;
212
210
  agentId: string;
211
+ projectId: string;
212
+ tenantId: string;
213
213
  subAgentId: string;
214
214
  externalAgentId: string;
215
215
  } | undefined>;
@@ -228,9 +228,9 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
228
228
  createdAt: string;
229
229
  updatedAt: string;
230
230
  headers: Record<string, string> | null;
231
- tenantId: string;
232
- projectId: string;
233
231
  agentId: string;
232
+ projectId: string;
233
+ tenantId: string;
234
234
  subAgentId: string;
235
235
  externalAgentId: string;
236
236
  }>;
@@ -12,9 +12,9 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
- tenantId: string;
16
- projectId: string;
17
15
  agentId: string;
16
+ projectId: string;
17
+ tenantId: string;
18
18
  sourceSubAgentId: string;
19
19
  targetSubAgentId: string | null;
20
20
  relationType: string | null;
@@ -47,9 +47,9 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
47
47
  id: string;
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
- tenantId: string;
51
- projectId: string;
52
50
  agentId: string;
51
+ projectId: string;
52
+ tenantId: string;
53
53
  sourceSubAgentId: string;
54
54
  targetSubAgentId: string | null;
55
55
  relationType: string | null;
@@ -60,9 +60,9 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
60
60
  id: string;
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
- tenantId: string;
64
- projectId: string;
65
63
  agentId: string;
64
+ projectId: string;
65
+ tenantId: string;
66
66
  sourceSubAgentId: string;
67
67
  targetSubAgentId: string | null;
68
68
  relationType: string | null;
@@ -129,9 +129,9 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
129
129
  id: string;
130
130
  createdAt: string;
131
131
  updatedAt: string;
132
- tenantId: string;
133
- projectId: string;
134
132
  agentId: string;
133
+ projectId: string;
134
+ tenantId: string;
135
135
  sourceSubAgentId: string;
136
136
  targetSubAgentId: string | null;
137
137
  relationType: string | null;
@@ -148,9 +148,9 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
148
148
  id: string;
149
149
  createdAt: string;
150
150
  updatedAt: string;
151
- tenantId: string;
152
- projectId: string;
153
151
  agentId: string;
152
+ projectId: string;
153
+ tenantId: string;
154
154
  sourceSubAgentId: string;
155
155
  targetSubAgentId: string | null;
156
156
  relationType: string | null;
@@ -162,9 +162,9 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
162
162
  id: string;
163
163
  createdAt: string;
164
164
  updatedAt: string;
165
- tenantId: string;
166
- projectId: string;
167
165
  agentId: string;
166
+ projectId: string;
167
+ tenantId: string;
168
168
  sourceSubAgentId: string;
169
169
  targetSubAgentId: string | null;
170
170
  relationType: string | null;
@@ -208,15 +208,15 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
208
208
  createdAt: string;
209
209
  updatedAt: string;
210
210
  headers: Record<string, string> | null;
211
- tenantId: string;
212
- projectId: string;
213
211
  agentId: string;
214
- subAgentId: string;
212
+ projectId: string;
213
+ tenantId: string;
215
214
  toolId: string;
216
- selectedTools: string[] | null;
215
+ subAgentId: string;
217
216
  toolPolicies: Record<string, {
218
217
  needsApproval?: boolean;
219
218
  }> | null;
219
+ selectedTools: string[] | null;
220
220
  }>;
221
221
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
222
222
  scopes: AgentScopeConfig;
@@ -252,15 +252,15 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
252
252
  createdAt: string;
253
253
  updatedAt: string;
254
254
  headers: Record<string, string> | null;
255
- tenantId: string;
256
- projectId: string;
257
255
  agentId: string;
258
- subAgentId: string;
256
+ projectId: string;
257
+ tenantId: string;
259
258
  toolId: string;
260
- selectedTools: string[] | null;
259
+ subAgentId: string;
261
260
  toolPolicies: Record<string, {
262
261
  needsApproval?: boolean;
263
262
  }> | null;
263
+ selectedTools: string[] | null;
264
264
  } | undefined>;
265
265
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
266
266
  scopes: SubAgentScopeConfig;
@@ -13,9 +13,9 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
15
  headers: Record<string, string> | null;
16
- tenantId: string;
17
- projectId: string;
18
16
  agentId: string;
17
+ projectId: string;
18
+ tenantId: string;
19
19
  subAgentId: string;
20
20
  targetAgentId: string;
21
21
  } | undefined>;
@@ -48,9 +48,9 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
50
  headers: Record<string, string> | null;
51
- tenantId: string;
52
- projectId: string;
53
51
  agentId: string;
52
+ projectId: string;
53
+ tenantId: string;
54
54
  subAgentId: string;
55
55
  targetAgentId: string;
56
56
  }[]>;
@@ -61,9 +61,9 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
63
  headers: Record<string, string> | null;
64
- tenantId: string;
65
- projectId: string;
66
64
  agentId: string;
65
+ projectId: string;
66
+ tenantId: string;
67
67
  subAgentId: string;
68
68
  targetAgentId: string;
69
69
  }[]>;
@@ -226,9 +226,9 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
226
226
  createdAt: string;
227
227
  updatedAt: string;
228
228
  headers: Record<string, string> | null;
229
- tenantId: string;
230
- projectId: string;
231
229
  agentId: string;
230
+ projectId: string;
231
+ tenantId: string;
232
232
  subAgentId: string;
233
233
  targetAgentId: string;
234
234
  }>;
@@ -243,9 +243,9 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
243
243
  createdAt: string;
244
244
  updatedAt: string;
245
245
  headers: Record<string, string> | null;
246
- tenantId: string;
247
- projectId: string;
248
246
  agentId: string;
247
+ projectId: string;
248
+ tenantId: string;
249
249
  subAgentId: string;
250
250
  targetAgentId: string;
251
251
  } | undefined>;
@@ -264,9 +264,9 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
264
264
  createdAt: string;
265
265
  updatedAt: string;
266
266
  headers: Record<string, string> | null;
267
- tenantId: string;
268
- projectId: string;
269
267
  agentId: string;
268
+ projectId: string;
269
+ tenantId: string;
270
270
  subAgentId: string;
271
271
  targetAgentId: string;
272
272
  }>;
@@ -14,6 +14,9 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  description: string | null;
17
+ agentId: string;
18
+ projectId: string;
19
+ tenantId: string;
17
20
  models: {
18
21
  base?: {
19
22
  model?: string | undefined;
@@ -34,13 +37,10 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
34
37
  allowedProviders?: string[] | undefined;
35
38
  } | undefined;
36
39
  } | null;
40
+ prompt: string | null;
37
41
  stopWhen: {
38
42
  stepCountIs?: number | undefined;
39
43
  } | null;
40
- tenantId: string;
41
- projectId: string;
42
- agentId: string;
43
- prompt: string | null;
44
44
  conversationHistoryConfig: ConversationHistoryConfig | null;
45
45
  } | undefined>;
46
46
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
@@ -51,6 +51,9 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
51
51
  createdAt: string;
52
52
  updatedAt: string;
53
53
  description: string | null;
54
+ agentId: string;
55
+ projectId: string;
56
+ tenantId: string;
54
57
  models: {
55
58
  base?: {
56
59
  model?: string | undefined;
@@ -71,13 +74,10 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
71
74
  allowedProviders?: string[] | undefined;
72
75
  } | undefined;
73
76
  } | null;
77
+ prompt: string | null;
74
78
  stopWhen: {
75
79
  stepCountIs?: number | undefined;
76
80
  } | null;
77
- tenantId: string;
78
- projectId: string;
79
- agentId: string;
80
- prompt: string | null;
81
81
  conversationHistoryConfig: ConversationHistoryConfig | null;
82
82
  }[]>;
83
83
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -132,6 +132,9 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
132
132
  createdAt: string;
133
133
  updatedAt: string;
134
134
  description: string | null;
135
+ agentId: string;
136
+ projectId: string;
137
+ tenantId: string;
135
138
  models: {
136
139
  base?: {
137
140
  model?: string | undefined;
@@ -152,13 +155,10 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
152
155
  allowedProviders?: string[] | undefined;
153
156
  } | undefined;
154
157
  } | null;
158
+ prompt: string | null;
155
159
  stopWhen: {
156
160
  stepCountIs?: number | undefined;
157
161
  } | null;
158
- tenantId: string;
159
- projectId: string;
160
- agentId: string;
161
- prompt: string | null;
162
162
  conversationHistoryConfig: ConversationHistoryConfig | null;
163
163
  }>;
164
164
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -24,15 +24,15 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
24
24
  name: string;
25
25
  createdAt: string;
26
26
  updatedAt: string;
27
- headers: Record<string, string> | null;
28
27
  description: string | null;
29
- tenantId: string;
28
+ headers: Record<string, string> | null;
30
29
  projectId: string;
31
- credentialReferenceId: string | null;
30
+ tenantId: string;
32
31
  config: {
33
32
  type: "mcp";
34
33
  mcp: ToolMcpConfig;
35
34
  };
35
+ credentialReferenceId: string | null;
36
36
  credentialScope: string;
37
37
  imageUrl: string | null;
38
38
  capabilities: ToolServerCapabilities | null;
@@ -82,15 +82,15 @@ declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInser
82
82
  name: string;
83
83
  createdAt: string;
84
84
  updatedAt: string;
85
- headers: Record<string, string> | null;
86
85
  description: string | null;
87
- tenantId: string;
86
+ headers: Record<string, string> | null;
88
87
  projectId: string;
89
- credentialReferenceId: string | null;
88
+ tenantId: string;
90
89
  config: {
91
90
  type: "mcp";
92
91
  mcp: ToolMcpConfig;
93
92
  };
93
+ credentialReferenceId: string | null;
94
94
  credentialScope: string;
95
95
  imageUrl: string | null;
96
96
  capabilities: ToolServerCapabilities | null;
@@ -139,15 +139,15 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
139
139
  createdAt: string;
140
140
  updatedAt: string;
141
141
  headers: Record<string, string> | null;
142
- tenantId: string;
143
- projectId: string;
144
142
  agentId: string;
145
- subAgentId: string;
143
+ projectId: string;
144
+ tenantId: string;
146
145
  toolId: string;
147
- selectedTools: string[] | null;
146
+ subAgentId: string;
148
147
  toolPolicies: Record<string, {
149
148
  needsApproval?: boolean;
150
149
  }> | null;
150
+ selectedTools: string[] | null;
151
151
  }>;
152
152
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
153
153
  scopes: AgentScopeConfig;
@@ -158,15 +158,15 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
158
158
  createdAt: string;
159
159
  updatedAt: string;
160
160
  headers: Record<string, string> | null;
161
- tenantId: string;
162
- projectId: string;
163
161
  agentId: string;
164
- subAgentId: string;
162
+ projectId: string;
163
+ tenantId: string;
165
164
  toolId: string;
166
- selectedTools: string[] | null;
165
+ subAgentId: string;
167
166
  toolPolicies: Record<string, {
168
167
  needsApproval?: boolean;
169
168
  }> | null;
169
+ selectedTools: string[] | null;
170
170
  }>;
171
171
  /**
172
172
  * Upsert agent-tool relation (create if it doesn't exist, update if it does)
@@ -186,15 +186,15 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
186
186
  createdAt: string;
187
187
  updatedAt: string;
188
188
  headers: Record<string, string> | null;
189
- tenantId: string;
190
- projectId: string;
191
189
  agentId: string;
192
- subAgentId: string;
190
+ projectId: string;
191
+ tenantId: string;
193
192
  toolId: string;
194
- selectedTools: string[] | null;
193
+ subAgentId: string;
195
194
  toolPolicies: Record<string, {
196
195
  needsApproval?: boolean;
197
196
  }> | null;
197
+ selectedTools: string[] | null;
198
198
  }>;
199
199
  /**
200
200
  * Upsert a tool (create if it doesn't exist, update if it does)
@@ -206,15 +206,15 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
206
206
  name: string;
207
207
  createdAt: string;
208
208
  updatedAt: string;
209
- headers: Record<string, string> | null;
210
209
  description: string | null;
211
- tenantId: string;
210
+ headers: Record<string, string> | null;
212
211
  projectId: string;
213
- credentialReferenceId: string | null;
212
+ tenantId: string;
214
213
  config: {
215
214
  type: "mcp";
216
215
  mcp: ToolMcpConfig;
217
216
  };
217
+ credentialReferenceId: string | null;
218
218
  credentialScope: string;
219
219
  imageUrl: string | null;
220
220
  capabilities: ToolServerCapabilities | null;
@@ -174,7 +174,7 @@ const discoverToolsFromServer = async (tool, credentialReference, credentialStor
174
174
  });
175
175
  await client.connect();
176
176
  const serverTools = await client.tools();
177
- const serverInstructions = client.getInstructions()?.replace(/\u0000/g, "");
177
+ const serverInstructions = client.getInstructions() ?? void 0;
178
178
  await client.disconnect();
179
179
  const toolOverrides = tool.config.mcp.toolOverrides;
180
180
  return {
@@ -13,9 +13,9 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
15
  expiresAt: string | null;
16
- tenantId: string;
17
- projectId: string;
18
16
  agentId: string;
17
+ projectId: string;
18
+ tenantId: string;
19
19
  publicId: string;
20
20
  keyHash: string;
21
21
  keyPrefix: string;
@@ -27,9 +27,9 @@ declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: s
27
27
  createdAt: string;
28
28
  updatedAt: string;
29
29
  expiresAt: string | null;
30
- tenantId: string;
31
- projectId: string;
32
30
  agentId: string;
31
+ projectId: string;
32
+ tenantId: string;
33
33
  publicId: string;
34
34
  keyHash: string;
35
35
  keyPrefix: string;
@@ -44,9 +44,9 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
44
44
  createdAt: string;
45
45
  updatedAt: string;
46
46
  expiresAt: string | null;
47
- tenantId: string;
48
- projectId: string;
49
47
  agentId: string;
48
+ projectId: string;
49
+ tenantId: string;
50
50
  publicId: string;
51
51
  keyHash: string;
52
52
  keyPrefix: string;
@@ -71,9 +71,9 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
71
71
  createdAt: string;
72
72
  updatedAt: string;
73
73
  expiresAt: string | null;
74
- tenantId: string;
75
- projectId: string;
76
74
  agentId: string;
75
+ projectId: string;
76
+ tenantId: string;
77
77
  publicId: string;
78
78
  keyHash: string;
79
79
  keyPrefix: string;
@@ -5,15 +5,15 @@ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
5
5
 
6
6
  //#region src/data-access/runtime/apps.d.ts
7
7
  declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
8
- type: AppType;
9
8
  id: string;
10
9
  name: string;
11
10
  createdAt: string;
12
11
  updatedAt: string;
13
12
  description: string | null;
14
13
  enabled: boolean;
15
- tenantId: string | null;
14
+ type: AppType;
16
15
  projectId: string | null;
16
+ tenantId: string | null;
17
17
  prompt: string | null;
18
18
  config: {
19
19
  type: "web_client";
@@ -61,15 +61,15 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
61
61
  };
62
62
  }>;
63
63
  declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
64
- type: AppType;
65
64
  id: string;
66
65
  name: string;
67
66
  createdAt: string;
68
67
  updatedAt: string;
69
68
  description: string | null;
70
69
  enabled: boolean;
71
- tenantId: string | null;
70
+ type: AppType;
72
71
  projectId: string | null;
72
+ tenantId: string | null;
73
73
  prompt: string | null;
74
74
  config: {
75
75
  type: "web_client";
@@ -25,10 +25,10 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
25
25
  } | null;
26
26
  userId: string | null;
27
27
  metadata: ConversationMetadata | null;
28
- title: string | null;
29
- tenantId: string;
30
- projectId: string;
31
28
  agentId: string | null;
29
+ projectId: string;
30
+ tenantId: string;
31
+ title: string | null;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
@@ -94,10 +94,10 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
94
94
  } | null;
95
95
  userId: string | null;
96
96
  metadata: ConversationMetadata | null;
97
- title: string | null;
98
- tenantId: string;
99
- projectId: string;
100
97
  agentId: string | null;
98
+ projectId: string;
99
+ tenantId: string;
100
+ title: string | null;
101
101
  activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
103
103
  } | undefined>;
@@ -130,10 +130,10 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
130
130
  } | null;
131
131
  userId: string | null;
132
132
  metadata: ConversationMetadata | null;
133
- title: string | null;
134
- tenantId: string;
135
- projectId: string;
136
133
  agentId: string | null;
134
+ projectId: string;
135
+ tenantId: string;
136
+ title: string | null;
137
137
  activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
139
139
  }>;
@@ -162,10 +162,10 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
162
162
  } | null;
163
163
  userId: string | null;
164
164
  metadata: ConversationMetadata | null;
165
- title: string | null;
166
- tenantId: string;
167
- projectId: string;
168
165
  agentId: string | null;
166
+ projectId: string;
167
+ tenantId: string;
168
+ title: string | null;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
@@ -15,9 +15,9 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
15
15
  updatedAt: string;
16
16
  metadata: MessageMetadata | null;
17
17
  role: string;
18
+ projectId: string;
18
19
  tenantId: string;
19
20
  content: MessageContent;
20
- projectId: string;
21
21
  conversationId: string;
22
22
  fromSubAgentId: string | null;
23
23
  toSubAgentId: string | null;
@@ -149,9 +149,9 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
149
149
  updatedAt: string;
150
150
  metadata: MessageMetadata | null;
151
151
  role: string;
152
+ projectId: string;
152
153
  tenantId: string;
153
154
  content: MessageContent;
154
- projectId: string;
155
155
  conversationId: string;
156
156
  fromSubAgentId: string | null;
157
157
  toSubAgentId: string | null;
@@ -202,9 +202,9 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
202
202
  updatedAt: string;
203
203
  metadata: MessageMetadata | null;
204
204
  role: string;
205
+ projectId: string;
205
206
  tenantId: string;
206
207
  content: MessageContent;
207
- projectId: string;
208
208
  conversationId: string;
209
209
  fromSubAgentId: string | null;
210
210
  toSubAgentId: string | null;
@@ -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;
@@ -194,7 +194,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
194
194
  name: string;
195
195
  hash: string;
196
196
  } | null;
197
- status: "pending" | "running" | "completed" | "failed" | "cancelled";
197
+ status: "pending" | "failed" | "running" | "completed" | "cancelled";
198
198
  scheduledFor: string;
199
199
  startedAt: string | null;
200
200
  completedAt: string | null;
@@ -233,7 +233,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
233
233
  name: string;
234
234
  hash: string;
235
235
  } | null;
236
- status: "pending" | "running" | "completed" | "failed" | "cancelled";
236
+ status: "pending" | "failed" | "running" | "completed" | "cancelled";
237
237
  scheduledFor: string;
238
238
  startedAt: string | null;
239
239
  completedAt: string | null;
@@ -285,7 +285,7 @@ declare const listScheduledTriggerInvocationsByTriggerId: (db: AgentsRunDatabase
285
285
  name: string;
286
286
  hash: string;
287
287
  } | null;
288
- status: "pending" | "running" | "completed" | "failed" | "cancelled";
288
+ status: "pending" | "failed" | "running" | "completed" | "cancelled";
289
289
  scheduledFor: string;
290
290
  startedAt: string | null;
291
291
  completedAt: string | null;
@@ -0,0 +1,29 @@
1
+ import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
2
+
3
+ //#region src/data-access/runtime/streamChunks.d.ts
4
+ interface ConversationScope {
5
+ tenantId: string;
6
+ projectId: string;
7
+ conversationId: string;
8
+ }
9
+ declare const insertStreamChunks: (db: AgentsRunDatabaseClient) => (params: ConversationScope & {
10
+ chunks: {
11
+ idx: number;
12
+ data: string;
13
+ }[];
14
+ }) => Promise<void>;
15
+ declare const markStreamComplete: (db: AgentsRunDatabaseClient) => (params: ConversationScope & {
16
+ finalIdx: number;
17
+ }) => Promise<void>;
18
+ declare const getStreamChunks: (db: AgentsRunDatabaseClient) => (params: ConversationScope & {
19
+ afterIdx?: number;
20
+ limit?: number;
21
+ }) => Promise<{
22
+ idx: number;
23
+ data: string;
24
+ isFinal: boolean;
25
+ }[]>;
26
+ declare const deleteStreamChunks: (db: AgentsRunDatabaseClient) => (params: ConversationScope) => Promise<void>;
27
+ declare const cleanupExpiredStreamChunks: (db: AgentsRunDatabaseClient) => (olderThanMinutes?: number, batchSize?: number) => Promise<void>;
28
+ //#endregion
29
+ export { cleanupExpiredStreamChunks, deleteStreamChunks, getStreamChunks, insertStreamChunks, markStreamComplete };