@inkeep/agents-core 0.70.1 → 0.70.3

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 (55) hide show
  1. package/dist/auth/auth-schema.d.ts +163 -163
  2. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  3. package/dist/auth/permissions.d.ts +9 -9
  4. package/dist/client-exports.d.ts +2 -2
  5. package/dist/client-exports.js +2 -2
  6. package/dist/data-access/index.d.ts +4 -2
  7. package/dist/data-access/index.js +4 -2
  8. package/dist/data-access/manage/agents.d.ts +36 -36
  9. package/dist/data-access/manage/artifactComponents.d.ts +6 -6
  10. package/dist/data-access/manage/contextConfigs.d.ts +4 -4
  11. package/dist/data-access/manage/dataComponents.d.ts +2 -2
  12. package/dist/data-access/manage/functionTools.d.ts +8 -8
  13. package/dist/data-access/manage/improvementRowRevert.d.ts +29 -0
  14. package/dist/data-access/manage/improvementRowRevert.js +84 -0
  15. package/dist/data-access/manage/skills.d.ts +10 -10
  16. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
  17. package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
  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 +18 -18
  21. package/dist/data-access/manage/triggers.d.ts +6 -6
  22. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  23. package/dist/data-access/runtime/apps.d.ts +12 -12
  24. package/dist/data-access/runtime/apps.js +2 -2
  25. package/dist/data-access/runtime/conversations.d.ts +24 -24
  26. package/dist/data-access/runtime/feedback.d.ts +16 -5
  27. package/dist/data-access/runtime/feedback.js +18 -2
  28. package/dist/data-access/runtime/improvementRuns.d.ts +49 -0
  29. package/dist/data-access/runtime/improvementRuns.js +41 -0
  30. package/dist/data-access/runtime/messages.d.ts +21 -21
  31. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  32. package/dist/data-access/runtime/tasks.d.ts +6 -6
  33. package/dist/db/manage/manage-schema.d.ts +366 -366
  34. package/dist/db/runtime/runtime-schema.d.ts +195 -12
  35. package/dist/db/runtime/runtime-schema.js +18 -1
  36. package/dist/dolt/diff.d.ts +2 -1
  37. package/dist/dolt/fk-map.d.ts +10 -1
  38. package/dist/dolt/fk-map.js +37 -1
  39. package/dist/dolt/index.d.ts +3 -3
  40. package/dist/dolt/index.js +3 -3
  41. package/dist/dolt/pk-map.d.ts +5 -1
  42. package/dist/dolt/pk-map.js +17 -1
  43. package/dist/index.d.ts +8 -6
  44. package/dist/index.js +8 -6
  45. package/dist/utils/error.d.ts +51 -51
  46. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  47. package/dist/validation/index.d.ts +2 -2
  48. package/dist/validation/index.js +2 -2
  49. package/dist/validation/schemas/skills.d.ts +48 -48
  50. package/dist/validation/schemas.d.ts +2401 -2168
  51. package/dist/validation/schemas.js +131 -2
  52. package/drizzle/runtime/0038_windy_kinsey_walden.sql +15 -0
  53. package/drizzle/runtime/meta/0038_snapshot.json +6111 -0
  54. package/drizzle/runtime/meta/_journal.json +7 -0
  55. package/package.json +1 -1
@@ -12,11 +12,11 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
- projectId: string;
15
+ headers: Record<string, string> | null;
16
16
  tenantId: string;
17
+ projectId: string;
17
18
  agentId: string;
18
19
  subAgentId: string;
19
- headers: Record<string, string> | null;
20
20
  externalAgentId: string;
21
21
  } | undefined>;
22
22
  declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
@@ -47,11 +47,11 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
47
47
  id: string;
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
- projectId: string;
50
+ headers: Record<string, string> | null;
51
51
  tenantId: string;
52
+ projectId: string;
52
53
  agentId: string;
53
54
  subAgentId: string;
54
- headers: Record<string, string> | null;
55
55
  externalAgentId: string;
56
56
  }[]>;
57
57
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -60,11 +60,11 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
60
60
  id: string;
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
- projectId: string;
63
+ headers: Record<string, string> | null;
64
64
  tenantId: string;
65
+ projectId: string;
65
66
  agentId: string;
66
67
  subAgentId: string;
67
- headers: Record<string, string> | null;
68
68
  externalAgentId: string;
69
69
  }[]>;
70
70
  declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -189,11 +189,11 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
189
189
  id: string;
190
190
  createdAt: string;
191
191
  updatedAt: string;
192
- projectId: string;
192
+ headers: Record<string, string> | null;
193
193
  tenantId: string;
194
+ projectId: string;
194
195
  agentId: string;
195
196
  subAgentId: string;
196
- headers: Record<string, string> | null;
197
197
  externalAgentId: string;
198
198
  }>;
199
199
  /**
@@ -206,11 +206,11 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
206
206
  id: string;
207
207
  createdAt: string;
208
208
  updatedAt: string;
209
- projectId: string;
209
+ headers: Record<string, string> | null;
210
210
  tenantId: string;
211
+ projectId: string;
211
212
  agentId: string;
212
213
  subAgentId: string;
213
- headers: Record<string, string> | null;
214
214
  externalAgentId: string;
215
215
  } | undefined>;
216
216
  /**
@@ -227,11 +227,11 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
227
227
  id: string;
228
228
  createdAt: string;
229
229
  updatedAt: string;
230
- projectId: string;
230
+ headers: Record<string, string> | null;
231
231
  tenantId: string;
232
+ projectId: string;
232
233
  agentId: string;
233
234
  subAgentId: string;
234
- headers: Record<string, string> | null;
235
235
  externalAgentId: string;
236
236
  }>;
237
237
  declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -12,8 +12,8 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
- projectId: string;
16
15
  tenantId: string;
16
+ projectId: string;
17
17
  agentId: string;
18
18
  sourceSubAgentId: string;
19
19
  targetSubAgentId: string | null;
@@ -47,8 +47,8 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
47
47
  id: string;
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
- projectId: string;
51
50
  tenantId: string;
51
+ projectId: string;
52
52
  agentId: string;
53
53
  sourceSubAgentId: string;
54
54
  targetSubAgentId: string | null;
@@ -60,8 +60,8 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
60
60
  id: string;
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
- projectId: string;
64
63
  tenantId: string;
64
+ projectId: string;
65
65
  agentId: string;
66
66
  sourceSubAgentId: string;
67
67
  targetSubAgentId: string | null;
@@ -129,8 +129,8 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
129
129
  id: string;
130
130
  createdAt: string;
131
131
  updatedAt: string;
132
- projectId: string;
133
132
  tenantId: string;
133
+ projectId: string;
134
134
  agentId: string;
135
135
  sourceSubAgentId: string;
136
136
  targetSubAgentId: string | null;
@@ -148,8 +148,8 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
148
148
  id: string;
149
149
  createdAt: string;
150
150
  updatedAt: string;
151
- projectId: string;
152
151
  tenantId: string;
152
+ projectId: string;
153
153
  agentId: string;
154
154
  sourceSubAgentId: string;
155
155
  targetSubAgentId: string | null;
@@ -162,8 +162,8 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
162
162
  id: string;
163
163
  createdAt: string;
164
164
  updatedAt: string;
165
- projectId: string;
166
165
  tenantId: string;
166
+ projectId: string;
167
167
  agentId: string;
168
168
  sourceSubAgentId: string;
169
169
  targetSubAgentId: string | null;
@@ -207,16 +207,16 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
207
207
  id: string;
208
208
  createdAt: string;
209
209
  updatedAt: string;
210
- projectId: string;
210
+ headers: Record<string, string> | null;
211
211
  tenantId: string;
212
+ projectId: string;
212
213
  agentId: string;
213
214
  subAgentId: string;
214
- headers: Record<string, string> | null;
215
215
  toolId: string;
216
- selectedTools: string[] | null;
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;
@@ -251,16 +251,16 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
251
251
  id: string;
252
252
  createdAt: string;
253
253
  updatedAt: string;
254
- projectId: string;
254
+ headers: Record<string, string> | null;
255
255
  tenantId: string;
256
+ projectId: string;
256
257
  agentId: string;
257
258
  subAgentId: string;
258
- headers: Record<string, string> | null;
259
259
  toolId: string;
260
- selectedTools: string[] | null;
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;
@@ -12,11 +12,11 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
- projectId: string;
15
+ headers: Record<string, string> | null;
16
16
  tenantId: string;
17
+ projectId: string;
17
18
  agentId: string;
18
19
  subAgentId: string;
19
- headers: Record<string, string> | null;
20
20
  targetAgentId: string;
21
21
  } | undefined>;
22
22
  declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
@@ -47,11 +47,11 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
47
47
  id: string;
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
- projectId: string;
50
+ headers: Record<string, string> | null;
51
51
  tenantId: string;
52
+ projectId: string;
52
53
  agentId: string;
53
54
  subAgentId: string;
54
- headers: Record<string, string> | null;
55
55
  targetAgentId: string;
56
56
  }[]>;
57
57
  declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -60,11 +60,11 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
60
60
  id: string;
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
- projectId: string;
63
+ headers: Record<string, string> | null;
64
64
  tenantId: string;
65
+ projectId: string;
65
66
  agentId: string;
66
67
  subAgentId: string;
67
- headers: Record<string, string> | null;
68
68
  targetAgentId: string;
69
69
  }[]>;
70
70
  declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -225,11 +225,11 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
225
225
  id: string;
226
226
  createdAt: string;
227
227
  updatedAt: string;
228
- projectId: string;
228
+ headers: Record<string, string> | null;
229
229
  tenantId: string;
230
+ projectId: string;
230
231
  agentId: string;
231
232
  subAgentId: string;
232
- headers: Record<string, string> | null;
233
233
  targetAgentId: string;
234
234
  }>;
235
235
  /**
@@ -242,11 +242,11 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
242
242
  id: string;
243
243
  createdAt: string;
244
244
  updatedAt: string;
245
- projectId: string;
245
+ headers: Record<string, string> | null;
246
246
  tenantId: string;
247
+ projectId: string;
247
248
  agentId: string;
248
249
  subAgentId: string;
249
- headers: Record<string, string> | null;
250
250
  targetAgentId: string;
251
251
  } | undefined>;
252
252
  /**
@@ -263,11 +263,11 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
263
263
  id: string;
264
264
  createdAt: string;
265
265
  updatedAt: string;
266
- projectId: string;
266
+ headers: Record<string, string> | null;
267
267
  tenantId: string;
268
+ projectId: string;
268
269
  agentId: string;
269
270
  subAgentId: string;
270
- headers: Record<string, string> | null;
271
271
  targetAgentId: string;
272
272
  }>;
273
273
  declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -11,11 +11,13 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
11
11
  }) => Promise<{
12
12
  id: string;
13
13
  name: string;
14
- description: string | null;
15
14
  createdAt: string;
16
15
  updatedAt: string;
17
- projectId: string;
16
+ description: string | null;
17
+ prompt: string | null;
18
18
  tenantId: string;
19
+ projectId: string;
20
+ agentId: string;
19
21
  models: {
20
22
  base?: {
21
23
  model?: string | undefined;
@@ -39,8 +41,6 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
39
41
  stopWhen: {
40
42
  stepCountIs?: number | undefined;
41
43
  } | null;
42
- agentId: string;
43
- prompt: string | null;
44
44
  conversationHistoryConfig: ConversationHistoryConfig | null;
45
45
  } | undefined>;
46
46
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
@@ -48,11 +48,13 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
48
48
  }) => Promise<{
49
49
  id: string;
50
50
  name: string;
51
- description: string | null;
52
51
  createdAt: string;
53
52
  updatedAt: string;
54
- projectId: string;
53
+ description: string | null;
54
+ prompt: string | null;
55
55
  tenantId: string;
56
+ projectId: string;
57
+ agentId: string;
56
58
  models: {
57
59
  base?: {
58
60
  model?: string | undefined;
@@ -76,8 +78,6 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
76
78
  stopWhen: {
77
79
  stepCountIs?: number | undefined;
78
80
  } | null;
79
- agentId: string;
80
- prompt: string | null;
81
81
  conversationHistoryConfig: ConversationHistoryConfig | null;
82
82
  }[]>;
83
83
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -129,11 +129,13 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
129
129
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
130
130
  id: string;
131
131
  name: string;
132
- description: string | null;
133
132
  createdAt: string;
134
133
  updatedAt: string;
135
- projectId: string;
134
+ description: string | null;
135
+ prompt: string | null;
136
136
  tenantId: string;
137
+ projectId: string;
138
+ agentId: string;
137
139
  models: {
138
140
  base?: {
139
141
  model?: string | undefined;
@@ -157,8 +159,6 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
157
159
  stopWhen: {
158
160
  stepCountIs?: number | undefined;
159
161
  } | null;
160
- agentId: string;
161
- prompt: string | null;
162
162
  conversationHistoryConfig: ConversationHistoryConfig | null;
163
163
  }>;
164
164
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -22,18 +22,18 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
22
22
  }) => Promise<{
23
23
  id: string;
24
24
  name: string;
25
- description: string | null;
26
25
  createdAt: string;
27
26
  updatedAt: string;
28
- projectId: string;
27
+ description: string | null;
28
+ headers: Record<string, string> | null;
29
29
  tenantId: string;
30
+ projectId: string;
30
31
  config: {
31
32
  type: "mcp";
32
33
  mcp: ToolMcpConfig;
33
34
  };
34
35
  credentialReferenceId: string | null;
35
36
  credentialScope: string;
36
- headers: Record<string, string> | null;
37
37
  imageUrl: string | null;
38
38
  capabilities: ToolServerCapabilities | null;
39
39
  lastError: string | null;
@@ -80,18 +80,18 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
80
80
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
81
81
  id: string;
82
82
  name: string;
83
- description: string | null;
84
83
  createdAt: string;
85
84
  updatedAt: string;
86
- projectId: string;
85
+ description: string | null;
86
+ headers: Record<string, string> | null;
87
87
  tenantId: string;
88
+ projectId: string;
88
89
  config: {
89
90
  type: "mcp";
90
91
  mcp: ToolMcpConfig;
91
92
  };
92
93
  credentialReferenceId: string | null;
93
94
  credentialScope: string;
94
- headers: Record<string, string> | null;
95
95
  imageUrl: string | null;
96
96
  capabilities: ToolServerCapabilities | null;
97
97
  lastError: string | null;
@@ -138,16 +138,16 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
138
138
  id: string;
139
139
  createdAt: string;
140
140
  updatedAt: string;
141
- projectId: string;
141
+ headers: Record<string, string> | null;
142
142
  tenantId: string;
143
+ projectId: string;
143
144
  agentId: string;
144
145
  subAgentId: string;
145
- headers: Record<string, string> | null;
146
146
  toolId: string;
147
- selectedTools: string[] | null;
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;
@@ -157,16 +157,16 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
157
157
  id: string;
158
158
  createdAt: string;
159
159
  updatedAt: string;
160
- projectId: string;
160
+ headers: Record<string, string> | null;
161
161
  tenantId: string;
162
+ projectId: string;
162
163
  agentId: string;
163
164
  subAgentId: string;
164
- headers: Record<string, string> | null;
165
165
  toolId: string;
166
- selectedTools: string[] | null;
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)
@@ -185,16 +185,16 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
185
185
  id: string;
186
186
  createdAt: string;
187
187
  updatedAt: string;
188
- projectId: string;
188
+ headers: Record<string, string> | null;
189
189
  tenantId: string;
190
+ projectId: string;
190
191
  agentId: string;
191
192
  subAgentId: string;
192
- headers: Record<string, string> | null;
193
193
  toolId: string;
194
- selectedTools: string[] | null;
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)
@@ -204,18 +204,18 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
204
204
  }) => Promise<{
205
205
  id: string;
206
206
  name: string;
207
- description: string | null;
208
207
  createdAt: string;
209
208
  updatedAt: string;
210
- projectId: string;
209
+ description: string | null;
210
+ headers: Record<string, string> | null;
211
211
  tenantId: string;
212
+ projectId: string;
212
213
  config: {
213
214
  type: "mcp";
214
215
  mcp: ToolMcpConfig;
215
216
  };
216
217
  credentialReferenceId: string | null;
217
218
  credentialScope: string;
218
- headers: Record<string, string> | null;
219
219
  imageUrl: string | null;
220
220
  capabilities: ToolServerCapabilities | null;
221
221
  lastError: string | null;
@@ -37,16 +37,16 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
37
37
  authentication: unknown;
38
38
  signingSecretCredentialReferenceId: string | null;
39
39
  signatureVerification: {
40
- algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
- encoding: "hex" | "base64";
40
+ algorithm: "md5" | "sha256" | "sha512" | "sha384" | "sha1";
41
+ encoding: "base64" | "hex";
42
42
  signature: {
43
- source: "query" | "header" | "body";
43
+ source: "query" | "body" | "header";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "header" | "body";
49
+ source: "literal" | "body" | "header";
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
- projectId: string;
135
+ userId: string;
136
136
  tenantId: string;
137
+ projectId: string;
137
138
  agentId: string;
138
- userId: string;
139
139
  triggerId: string;
140
140
  }>;
141
141
  declare const deleteTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
@@ -12,28 +12,28 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
12
12
  name: string | null;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
- projectId: string;
15
+ expiresAt: string | null;
16
16
  tenantId: string;
17
+ projectId: string;
17
18
  agentId: string;
18
19
  publicId: string;
19
20
  keyHash: string;
20
21
  keyPrefix: string;
21
22
  lastUsedAt: string | null;
22
- expiresAt: string | null;
23
23
  } | undefined>;
24
24
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
25
25
  id: string;
26
26
  name: string | null;
27
27
  createdAt: string;
28
28
  updatedAt: string;
29
- projectId: string;
29
+ expiresAt: string | null;
30
30
  tenantId: string;
31
+ projectId: string;
31
32
  agentId: string;
32
33
  publicId: string;
33
34
  keyHash: string;
34
35
  keyPrefix: string;
35
36
  lastUsedAt: string | null;
36
- expiresAt: string | null;
37
37
  } | undefined>;
38
38
  declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
39
39
  scopes: ProjectScopeConfig;
@@ -43,14 +43,14 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
43
43
  name: string | null;
44
44
  createdAt: string;
45
45
  updatedAt: string;
46
- projectId: string;
46
+ expiresAt: string | null;
47
47
  tenantId: string;
48
+ projectId: string;
48
49
  agentId: string;
49
50
  publicId: string;
50
51
  keyHash: string;
51
52
  keyPrefix: string;
52
53
  lastUsedAt: string | null;
53
- expiresAt: string | null;
54
54
  }[]>;
55
55
  declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
56
56
  scopes: ProjectScopeConfig;
@@ -70,14 +70,14 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
70
70
  name: string | null;
71
71
  createdAt: string;
72
72
  updatedAt: string;
73
- projectId: string;
73
+ expiresAt: string | null;
74
74
  tenantId: string;
75
+ projectId: string;
75
76
  agentId: string;
76
77
  publicId: string;
77
78
  keyHash: string;
78
79
  keyPrefix: string;
79
80
  lastUsedAt: string | null;
80
- expiresAt: string | null;
81
81
  }>;
82
82
  declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
83
83
  scopes: ProjectScopeConfig;
@@ -8,11 +8,13 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
8
8
  type: AppType;
9
9
  id: string;
10
10
  name: string;
11
- description: string | null;
12
11
  createdAt: string;
13
12
  updatedAt: string;
14
- projectId: string | null;
13
+ description: string | null;
14
+ enabled: boolean;
15
+ prompt: string | null;
15
16
  tenantId: string | null;
17
+ projectId: string | null;
16
18
  config: {
17
19
  type: "web_client";
18
20
  webClient: {
@@ -20,7 +22,7 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
20
22
  publicKeys: {
21
23
  kid: string;
22
24
  publicKey: string;
23
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
25
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
24
26
  addedAt: string;
25
27
  }[];
26
28
  allowAnonymous: boolean;
@@ -43,8 +45,6 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
43
45
  }[] | undefined;
44
46
  };
45
47
  };
46
- enabled: boolean;
47
- prompt: string | null;
48
48
  lastUsedAt: string | null;
49
49
  defaultProjectId: string | null;
50
50
  defaultAgentId: string | null;
@@ -60,7 +60,7 @@ declare const getAppByIdForProject: (db: AgentsRunDatabaseClient) => (params: {
60
60
  }) => Promise<AppSelect | undefined>;
61
61
  declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
62
62
  scopes: TenantScopeConfig & {
63
- projectId?: string;
63
+ projectIds?: string[];
64
64
  };
65
65
  pagination?: PaginationConfig;
66
66
  type?: AppType;
@@ -77,11 +77,13 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
77
77
  type: AppType;
78
78
  id: string;
79
79
  name: string;
80
- description: string | null;
81
80
  createdAt: string;
82
81
  updatedAt: string;
83
- projectId: string | null;
82
+ description: string | null;
83
+ enabled: boolean;
84
+ prompt: string | null;
84
85
  tenantId: string | null;
86
+ projectId: string | null;
85
87
  config: {
86
88
  type: "web_client";
87
89
  webClient: {
@@ -89,7 +91,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
89
91
  publicKeys: {
90
92
  kid: string;
91
93
  publicKey: string;
92
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
94
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
93
95
  addedAt: string;
94
96
  }[];
95
97
  allowAnonymous: boolean;
@@ -112,8 +114,6 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
112
114
  }[] | undefined;
113
115
  };
114
116
  };
115
- enabled: boolean;
116
- prompt: string | null;
117
117
  lastUsedAt: string | null;
118
118
  defaultProjectId: string | null;
119
119
  defaultAgentId: string | null;
@@ -174,7 +174,7 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
174
174
  publicKeys: {
175
175
  kid: string;
176
176
  publicKey: string;
177
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
177
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
178
178
  addedAt: string;
179
179
  }[];
180
180
  allowAnonymous: boolean;
@@ -1,6 +1,6 @@
1
1
  import { apps } from "../../db/runtime/runtime-schema.js";
2
2
  import { projectScopedWhere, tenantScopedWhere } from "../manage/scope-helpers.js";
3
- import { and, count, desc, eq } from "drizzle-orm";
3
+ import { and, count, desc, eq, inArray } from "drizzle-orm";
4
4
 
5
5
  //#region src/data-access/runtime/apps.ts
6
6
  const getAppById = (db) => async (id) => {
@@ -20,7 +20,7 @@ const listAppsPaginated = (db) => async (params) => {
20
20
  const limit = Math.min(params.pagination?.limit || 10, 100);
21
21
  const offset = (page - 1) * limit;
22
22
  const conditions = [tenantScopedWhere(apps, params.scopes)];
23
- if (params.scopes.projectId) conditions.push(eq(apps.projectId, params.scopes.projectId));
23
+ if (params.scopes.projectIds && params.scopes.projectIds.length > 0) conditions.push(inArray(apps.projectId, params.scopes.projectIds));
24
24
  if (params.type) conditions.push(eq(apps.type, params.type));
25
25
  const whereClause = and(...conditions);
26
26
  const [data, totalResult] = await Promise.all([db.select().from(apps).where(whereClause).limit(limit).offset(offset).orderBy(desc(apps.createdAt)), db.select({ count: count() }).from(apps).where(whereClause)]);