@inkeep/agents-core 0.0.0-dev-20260120175022 → 0.0.0-dev-20260120221941

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 (65) hide show
  1. package/dist/auth/auth-schema.d.ts +82 -82
  2. package/dist/auth/auth-validation-schemas.d.ts +146 -146
  3. package/dist/auth/auth.d.ts +53 -53
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/client-exports.d.ts +6 -2
  6. package/dist/client-exports.js +2 -2
  7. package/dist/constants/otel-attributes.d.ts +3 -0
  8. package/dist/constants/otel-attributes.js +3 -0
  9. package/dist/data-access/index.d.ts +3 -1
  10. package/dist/data-access/index.js +3 -1
  11. package/dist/data-access/manage/agentFull.js +114 -0
  12. package/dist/data-access/manage/agents.d.ts +25 -25
  13. package/dist/data-access/manage/agents.js +27 -0
  14. package/dist/data-access/manage/artifactComponents.d.ts +14 -14
  15. package/dist/data-access/manage/contextConfigs.d.ts +12 -12
  16. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  17. package/dist/data-access/manage/functionTools.d.ts +14 -14
  18. package/dist/data-access/manage/projectFull.d.ts +4 -0
  19. package/dist/data-access/manage/projectFull.js +31 -8
  20. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  21. package/dist/data-access/manage/subAgentRelations.d.ts +24 -24
  22. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
  23. package/dist/data-access/manage/subAgents.d.ts +15 -15
  24. package/dist/data-access/manage/tools.d.ts +33 -33
  25. package/dist/data-access/manage/triggers.d.ts +84 -0
  26. package/dist/data-access/manage/triggers.js +95 -0
  27. package/dist/data-access/runtime/apiKeys.d.ts +16 -16
  28. package/dist/data-access/runtime/conversations.d.ts +23 -23
  29. package/dist/data-access/runtime/evalRuns.d.ts +2 -2
  30. package/dist/data-access/runtime/evalRuns.js +11 -1
  31. package/dist/data-access/runtime/messages.d.ts +21 -21
  32. package/dist/data-access/runtime/tasks.d.ts +7 -7
  33. package/dist/data-access/runtime/triggerInvocations.d.ts +62 -0
  34. package/dist/data-access/runtime/triggerInvocations.js +54 -0
  35. package/dist/db/manage/manage-schema.d.ts +553 -288
  36. package/dist/db/manage/manage-schema.js +31 -2
  37. package/dist/db/runtime/runtime-schema.d.ts +370 -155
  38. package/dist/db/runtime/runtime-schema.js +33 -3
  39. package/dist/dolt/branch.d.ts +55 -1
  40. package/dist/dolt/branch.js +85 -1
  41. package/dist/dolt/index.d.ts +2 -2
  42. package/dist/dolt/index.js +2 -2
  43. package/dist/index.d.ts +10 -6
  44. package/dist/index.js +10 -6
  45. package/dist/types/entities.d.ts +14 -2
  46. package/dist/types/index.d.ts +2 -2
  47. package/dist/utils/index.d.ts +3 -1
  48. package/dist/utils/index.js +3 -1
  49. package/dist/utils/template-interpolation.d.ts +22 -0
  50. package/dist/utils/template-interpolation.js +62 -0
  51. package/dist/utils/trigger-auth.d.ts +32 -0
  52. package/dist/utils/trigger-auth.js +130 -0
  53. package/dist/validation/dolt-schemas.d.ts +1 -1
  54. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  55. package/dist/validation/index.d.ts +2 -2
  56. package/dist/validation/index.js +2 -2
  57. package/dist/validation/schemas.d.ts +3620 -1382
  58. package/dist/validation/schemas.js +87 -4
  59. package/drizzle/manage/0001_broken_wendell_vaughn.sql +19 -0
  60. package/drizzle/manage/meta/0001_snapshot.json +3115 -0
  61. package/drizzle/manage/meta/_journal.json +7 -0
  62. package/drizzle/runtime/0009_freezing_leo.sql +17 -0
  63. package/drizzle/runtime/meta/0009_snapshot.json +2397 -0
  64. package/drizzle/runtime/meta/_journal.json +7 -0
  65. package/package.json +1 -1
@@ -8,15 +8,15 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
8
8
  scopes: SubAgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
+ tenantId: string;
12
+ projectId: string;
11
13
  id: string;
12
14
  createdAt: string;
13
15
  updatedAt: string;
14
- projectId: string;
15
- tenantId: string;
16
- agentId: string;
16
+ subAgentId: string;
17
17
  headers: Record<string, string> | null;
18
+ agentId: string;
18
19
  externalAgentId: string;
19
- subAgentId: string;
20
20
  } | undefined>;
21
21
  declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
22
22
  scopes: SubAgentScopeConfig;
@@ -43,28 +43,28 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
43
43
  declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
+ tenantId: string;
47
+ projectId: string;
46
48
  id: string;
47
49
  createdAt: string;
48
50
  updatedAt: string;
49
- projectId: string;
50
- tenantId: string;
51
- agentId: string;
51
+ subAgentId: string;
52
52
  headers: Record<string, string> | null;
53
+ agentId: string;
53
54
  externalAgentId: string;
54
- subAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
+ tenantId: string;
60
+ projectId: string;
59
61
  id: string;
60
62
  createdAt: string;
61
63
  updatedAt: string;
62
- projectId: string;
63
- tenantId: string;
64
- agentId: string;
64
+ subAgentId: string;
65
65
  headers: Record<string, string> | null;
66
+ agentId: string;
66
67
  externalAgentId: string;
67
- subAgentId: string;
68
68
  }[]>;
69
69
  declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
70
70
  scopes: AgentScopeConfig;
@@ -179,15 +179,15 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
179
179
  headers?: Record<string, string> | null;
180
180
  };
181
181
  }) => Promise<{
182
+ tenantId: string;
183
+ projectId: string;
182
184
  id: string;
183
185
  createdAt: string;
184
186
  updatedAt: string;
185
- projectId: string;
186
- tenantId: string;
187
- agentId: string;
187
+ subAgentId: string;
188
188
  headers: Record<string, string> | null;
189
+ agentId: string;
189
190
  externalAgentId: string;
190
- subAgentId: string;
191
191
  }>;
192
192
  /**
193
193
  * Check if sub-agent external agent relation exists by params
@@ -196,15 +196,15 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
196
196
  scopes: SubAgentScopeConfig;
197
197
  externalAgentId: string;
198
198
  }) => Promise<{
199
+ tenantId: string;
200
+ projectId: string;
199
201
  id: string;
200
202
  createdAt: string;
201
203
  updatedAt: string;
202
- projectId: string;
203
- tenantId: string;
204
- agentId: string;
204
+ subAgentId: string;
205
205
  headers: Record<string, string> | null;
206
+ agentId: string;
206
207
  externalAgentId: string;
207
- subAgentId: string;
208
208
  } | undefined>;
209
209
  /**
210
210
  * Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
@@ -217,15 +217,15 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
217
217
  headers?: Record<string, string> | null;
218
218
  };
219
219
  }) => Promise<{
220
+ tenantId: string;
221
+ projectId: string;
220
222
  id: string;
221
223
  createdAt: string;
222
224
  updatedAt: string;
223
- projectId: string;
224
- tenantId: string;
225
- agentId: string;
225
+ subAgentId: string;
226
226
  headers: Record<string, string> | null;
227
+ agentId: string;
227
228
  externalAgentId: string;
228
- subAgentId: string;
229
229
  }>;
230
230
  declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
231
231
  scopes: SubAgentScopeConfig;
@@ -8,11 +8,11 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
8
8
  scopes: AgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
+ tenantId: string;
12
+ projectId: string;
11
13
  id: string;
12
14
  createdAt: string;
13
15
  updatedAt: string;
14
- projectId: string;
15
- tenantId: string;
16
16
  agentId: string;
17
17
  sourceSubAgentId: string;
18
18
  targetSubAgentId: string | null;
@@ -43,11 +43,11 @@ declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
43
43
  declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
+ tenantId: string;
47
+ projectId: string;
46
48
  id: string;
47
49
  createdAt: string;
48
50
  updatedAt: string;
49
- projectId: string;
50
- tenantId: string;
51
51
  agentId: string;
52
52
  sourceSubAgentId: string;
53
53
  targetSubAgentId: string | null;
@@ -56,11 +56,11 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
56
56
  declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
+ tenantId: string;
60
+ projectId: string;
59
61
  id: string;
60
62
  createdAt: string;
61
63
  updatedAt: string;
62
- projectId: string;
63
- tenantId: string;
64
64
  agentId: string;
65
65
  sourceSubAgentId: string;
66
66
  targetSubAgentId: string | null;
@@ -125,11 +125,11 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
125
125
  }[];
126
126
  }>;
127
127
  declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
128
+ tenantId: string;
129
+ projectId: string;
128
130
  id: string;
129
131
  createdAt: string;
130
132
  updatedAt: string;
131
- projectId: string;
132
- tenantId: string;
133
133
  agentId: string;
134
134
  sourceSubAgentId: string;
135
135
  targetSubAgentId: string | null;
@@ -144,11 +144,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
144
144
  targetSubAgentId?: string;
145
145
  relationType: string;
146
146
  }) => Promise<{
147
+ tenantId: string;
148
+ projectId: string;
147
149
  id: string;
148
150
  createdAt: string;
149
151
  updatedAt: string;
150
- projectId: string;
151
- tenantId: string;
152
152
  agentId: string;
153
153
  sourceSubAgentId: string;
154
154
  targetSubAgentId: string | null;
@@ -158,11 +158,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
158
158
  * Upsert agent relation (create if it doesn't exist, no-op if it does)
159
159
  */
160
160
  declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
161
+ tenantId: string;
162
+ projectId: string;
161
163
  id: string;
162
164
  createdAt: string;
163
165
  updatedAt: string;
164
- projectId: string;
165
- tenantId: string;
166
166
  agentId: string;
167
167
  sourceSubAgentId: string;
168
168
  targetSubAgentId: string | null;
@@ -203,19 +203,19 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
203
203
  }> | null;
204
204
  };
205
205
  }) => Promise<{
206
+ tenantId: string;
207
+ projectId: string;
206
208
  id: string;
207
209
  createdAt: string;
208
210
  updatedAt: string;
209
- projectId: string;
210
- tenantId: string;
211
- toolId: string;
212
- agentId: string;
211
+ subAgentId: string;
213
212
  headers: Record<string, string> | null;
213
+ agentId: string;
214
+ toolId: string;
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;
@@ -247,19 +247,19 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
247
247
  scopes: SubAgentScopeConfig;
248
248
  relationId: string;
249
249
  }) => Promise<{
250
+ tenantId: string;
251
+ projectId: string;
250
252
  id: string;
251
253
  createdAt: string;
252
254
  updatedAt: string;
253
- projectId: string;
254
- tenantId: string;
255
- toolId: string;
256
- agentId: string;
255
+ subAgentId: string;
257
256
  headers: Record<string, string> | null;
257
+ agentId: string;
258
+ toolId: string;
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;
@@ -8,14 +8,14 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
8
8
  scopes: SubAgentScopeConfig;
9
9
  relationId: string;
10
10
  }) => Promise<{
11
+ tenantId: string;
12
+ projectId: string;
11
13
  id: string;
12
14
  createdAt: string;
13
15
  updatedAt: string;
14
- projectId: string;
15
- tenantId: string;
16
- agentId: string;
17
- headers: Record<string, string> | null;
18
16
  subAgentId: string;
17
+ headers: Record<string, string> | null;
18
+ agentId: string;
19
19
  targetAgentId: string;
20
20
  } | undefined>;
21
21
  declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
@@ -43,27 +43,27 @@ declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =
43
43
  declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
44
44
  scopes: SubAgentScopeConfig;
45
45
  }) => Promise<{
46
+ tenantId: string;
47
+ projectId: string;
46
48
  id: string;
47
49
  createdAt: string;
48
50
  updatedAt: string;
49
- projectId: string;
50
- tenantId: string;
51
- agentId: string;
52
- headers: Record<string, string> | null;
53
51
  subAgentId: string;
52
+ headers: Record<string, string> | null;
53
+ agentId: string;
54
54
  targetAgentId: string;
55
55
  }[]>;
56
56
  declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
57
57
  scopes: AgentScopeConfig;
58
58
  }) => Promise<{
59
+ tenantId: string;
60
+ projectId: string;
59
61
  id: string;
60
62
  createdAt: string;
61
63
  updatedAt: string;
62
- projectId: string;
63
- tenantId: string;
64
- agentId: string;
65
- headers: Record<string, string> | null;
66
64
  subAgentId: string;
65
+ headers: Record<string, string> | null;
66
+ agentId: string;
67
67
  targetAgentId: string;
68
68
  }[]>;
69
69
  declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -209,14 +209,14 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
209
209
  headers?: Record<string, string> | null;
210
210
  };
211
211
  }) => Promise<{
212
+ tenantId: string;
213
+ projectId: string;
212
214
  id: string;
213
215
  createdAt: string;
214
216
  updatedAt: string;
215
- projectId: string;
216
- tenantId: string;
217
- agentId: string;
218
- headers: Record<string, string> | null;
219
217
  subAgentId: string;
218
+ headers: Record<string, string> | null;
219
+ agentId: string;
220
220
  targetAgentId: string;
221
221
  }>;
222
222
  /**
@@ -226,14 +226,14 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
226
226
  scopes: SubAgentScopeConfig;
227
227
  targetAgentId: string;
228
228
  }) => Promise<{
229
+ tenantId: string;
230
+ projectId: string;
229
231
  id: string;
230
232
  createdAt: string;
231
233
  updatedAt: string;
232
- projectId: string;
233
- tenantId: string;
234
- agentId: string;
235
- headers: Record<string, string> | null;
236
234
  subAgentId: string;
235
+ headers: Record<string, string> | null;
236
+ agentId: string;
237
237
  targetAgentId: string;
238
238
  } | undefined>;
239
239
  /**
@@ -247,14 +247,14 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
247
247
  headers?: Record<string, string> | null;
248
248
  };
249
249
  }) => Promise<{
250
+ tenantId: string;
251
+ projectId: string;
250
252
  id: string;
251
253
  createdAt: string;
252
254
  updatedAt: string;
253
- projectId: string;
254
- tenantId: string;
255
- agentId: string;
256
- headers: Record<string, string> | null;
257
255
  subAgentId: string;
256
+ headers: Record<string, string> | null;
257
+ agentId: string;
258
258
  targetAgentId: string;
259
259
  }>;
260
260
  declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -8,13 +8,13 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
8
8
  scopes: AgentScopeConfig;
9
9
  subAgentId: string;
10
10
  }) => Promise<{
11
+ tenantId: string;
12
+ projectId: string;
11
13
  id: string;
12
- name: string;
13
- description: string | null;
14
14
  createdAt: string;
15
+ name: string;
15
16
  updatedAt: string;
16
- projectId: string;
17
- tenantId: string;
17
+ description: string | null;
18
18
  models: {
19
19
  base?: {
20
20
  model?: string | undefined;
@@ -32,20 +32,20 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
32
32
  stopWhen: {
33
33
  stepCountIs?: number | undefined;
34
34
  } | null;
35
- prompt: string | null;
36
35
  agentId: string;
36
+ prompt: string | null;
37
37
  conversationHistoryConfig: ConversationHistoryConfig | null;
38
38
  } | undefined>;
39
39
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
40
40
  scopes: AgentScopeConfig;
41
41
  }) => Promise<{
42
+ tenantId: string;
43
+ projectId: string;
42
44
  id: string;
43
- name: string;
44
- description: string | null;
45
45
  createdAt: string;
46
+ name: string;
46
47
  updatedAt: string;
47
- projectId: string;
48
- tenantId: string;
48
+ description: string | null;
49
49
  models: {
50
50
  base?: {
51
51
  model?: string | undefined;
@@ -63,8 +63,8 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
63
63
  stopWhen: {
64
64
  stepCountIs?: number | undefined;
65
65
  } | null;
66
- prompt: string | null;
67
66
  agentId: string;
67
+ prompt: string | null;
68
68
  conversationHistoryConfig: ConversationHistoryConfig | null;
69
69
  }[]>;
70
70
  declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -108,13 +108,13 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
108
108
  };
109
109
  }>;
110
110
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
111
+ tenantId: string;
112
+ projectId: string;
111
113
  id: string;
112
- name: string;
113
- description: string | null;
114
114
  createdAt: string;
115
+ name: string;
115
116
  updatedAt: string;
116
- projectId: string;
117
- tenantId: string;
117
+ description: string | null;
118
118
  models: {
119
119
  base?: {
120
120
  model?: string | undefined;
@@ -132,8 +132,8 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
132
132
  stopWhen: {
133
133
  stepCountIs?: number | undefined;
134
134
  } | null;
135
- prompt: string | null;
136
135
  agentId: string;
136
+ prompt: string | null;
137
137
  conversationHistoryConfig: ConversationHistoryConfig | null;
138
138
  }>;
139
139
  declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -12,19 +12,19 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
12
12
  scopes: ProjectScopeConfig;
13
13
  toolId: string;
14
14
  }) => Promise<{
15
+ tenantId: string;
16
+ projectId: string;
15
17
  id: string;
16
- name: string;
17
- description: string | null;
18
- credentialReferenceId: string | null;
19
18
  createdAt: string;
19
+ name: string;
20
20
  updatedAt: string;
21
- projectId: string;
22
- tenantId: string;
21
+ description: string | null;
23
22
  headers: Record<string, string> | null;
24
23
  config: {
25
24
  type: "mcp";
26
25
  mcp: ToolMcpConfig;
27
26
  };
27
+ credentialReferenceId: string | null;
28
28
  credentialScope: string;
29
29
  imageUrl: string | null;
30
30
  capabilities: ToolServerCapabilities | null;
@@ -61,19 +61,19 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
61
61
  };
62
62
  }>;
63
63
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
64
+ tenantId: string;
65
+ projectId: string;
64
66
  id: string;
65
- name: string;
66
- description: string | null;
67
- credentialReferenceId: string | null;
68
67
  createdAt: string;
68
+ name: string;
69
69
  updatedAt: string;
70
- projectId: string;
71
- tenantId: string;
70
+ description: string | null;
72
71
  headers: Record<string, string> | null;
73
72
  config: {
74
73
  type: "mcp";
75
74
  mcp: ToolMcpConfig;
76
75
  };
76
+ credentialReferenceId: string | null;
77
77
  credentialScope: string;
78
78
  imageUrl: string | null;
79
79
  capabilities: ToolServerCapabilities | null;
@@ -116,38 +116,38 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
116
116
  needsApproval?: boolean;
117
117
  }> | null;
118
118
  }) => Promise<{
119
+ tenantId: string;
120
+ projectId: string;
119
121
  id: string;
120
122
  createdAt: string;
121
123
  updatedAt: string;
122
- projectId: string;
123
- tenantId: string;
124
- toolId: string;
125
- agentId: string;
124
+ subAgentId: string;
126
125
  headers: Record<string, string> | null;
126
+ agentId: string;
127
+ toolId: string;
128
+ selectedTools: string[] | null;
127
129
  toolPolicies: Record<string, {
128
130
  needsApproval?: boolean;
129
131
  }> | null;
130
- subAgentId: string;
131
- selectedTools: string[] | null;
132
132
  }>;
133
133
  declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
134
134
  scopes: AgentScopeConfig;
135
135
  subAgentId: string;
136
136
  toolId: string;
137
137
  }) => Promise<{
138
+ tenantId: string;
139
+ projectId: string;
138
140
  id: string;
139
141
  createdAt: string;
140
142
  updatedAt: string;
141
- projectId: string;
142
- tenantId: string;
143
- toolId: string;
144
- agentId: string;
143
+ subAgentId: string;
145
144
  headers: Record<string, string> | null;
145
+ agentId: string;
146
+ toolId: string;
147
+ selectedTools: string[] | null;
146
148
  toolPolicies: Record<string, {
147
149
  needsApproval?: boolean;
148
150
  }> | null;
149
- subAgentId: string;
150
- selectedTools: string[] | null;
151
151
  }>;
152
152
  /**
153
153
  * Upsert agent-tool relation (create if it doesn't exist, update if it does)
@@ -163,19 +163,19 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
163
163
  }> | null;
164
164
  relationId?: string;
165
165
  }) => Promise<{
166
+ tenantId: string;
167
+ projectId: string;
166
168
  id: string;
167
169
  createdAt: string;
168
170
  updatedAt: string;
169
- projectId: string;
170
- tenantId: string;
171
- toolId: string;
172
- agentId: string;
171
+ subAgentId: string;
173
172
  headers: Record<string, string> | null;
173
+ agentId: string;
174
+ toolId: string;
175
+ selectedTools: string[] | null;
174
176
  toolPolicies: Record<string, {
175
177
  needsApproval?: boolean;
176
178
  }> | null;
177
- subAgentId: string;
178
- selectedTools: string[] | null;
179
179
  }>;
180
180
  /**
181
181
  * Upsert a tool (create if it doesn't exist, update if it does)
@@ -183,19 +183,19 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
183
183
  declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
184
184
  data: ToolInsert;
185
185
  }) => Promise<{
186
+ tenantId: string;
187
+ projectId: string;
186
188
  id: string;
187
- name: string;
188
- description: string | null;
189
- credentialReferenceId: string | null;
190
189
  createdAt: string;
190
+ name: string;
191
191
  updatedAt: string;
192
- projectId: string;
193
- tenantId: string;
192
+ description: string | null;
194
193
  headers: Record<string, string> | null;
195
194
  config: {
196
195
  type: "mcp";
197
196
  mcp: ToolMcpConfig;
198
197
  };
198
+ credentialReferenceId: string | null;
199
199
  credentialScope: string;
200
200
  imageUrl: string | null;
201
201
  capabilities: ToolServerCapabilities | null;
@@ -0,0 +1,84 @@
1
+ import { AgentScopeConfig, PaginationConfig } from "../../types/utility.js";
2
+ import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
3
+ import { TriggerInsert, TriggerSelect, TriggerUpdate } from "../../types/entities.js";
4
+
5
+ //#region src/data-access/manage/triggers.d.ts
6
+
7
+ /**
8
+ * Get a trigger by ID (agent-scoped)
9
+ * Uses withBranch to checkout the project's main branch and query using Drizzle ORM,
10
+ * which handles column name mapping automatically.
11
+ */
12
+ declare const getTriggerById: (db: AgentsManageDatabaseClient) => (params: {
13
+ scopes: AgentScopeConfig;
14
+ triggerId: string;
15
+ /** If true, uses withBranch to read from the project branch. Default: true for non-branch-scoped clients */
16
+ useBranchScope?: boolean;
17
+ }) => Promise<TriggerSelect | undefined>;
18
+ /**
19
+ * List all triggers for an agent
20
+ */
21
+ declare const listTriggers: (db: AgentsManageDatabaseClient) => (params: {
22
+ scopes: AgentScopeConfig;
23
+ }) => Promise<TriggerSelect[]>;
24
+ /**
25
+ * List triggers for an agent with pagination
26
+ */
27
+ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params: {
28
+ scopes: AgentScopeConfig;
29
+ pagination?: PaginationConfig;
30
+ }) => Promise<{
31
+ data: {
32
+ createdAt: string;
33
+ updatedAt: string;
34
+ enabled: boolean;
35
+ inputSchema: Record<string, unknown> | null;
36
+ outputTransform: {
37
+ jmespath?: string;
38
+ objectTransformation?: Record<string, string>;
39
+ } | null;
40
+ messageTemplate: string;
41
+ authentication: unknown;
42
+ signingSecret: string | null;
43
+ name: string;
44
+ description: string | null;
45
+ agentId: string;
46
+ projectId: string;
47
+ tenantId: string;
48
+ id: string;
49
+ }[];
50
+ pagination: {
51
+ page: number;
52
+ limit: number;
53
+ total: number;
54
+ pages: number;
55
+ };
56
+ }>;
57
+ /**
58
+ * Create a new trigger (agent-scoped)
59
+ */
60
+ declare const createTrigger: (db: AgentsManageDatabaseClient) => (params: TriggerInsert) => Promise<TriggerSelect>;
61
+ /**
62
+ * Update a trigger (agent-scoped)
63
+ */
64
+ declare const updateTrigger: (db: AgentsManageDatabaseClient) => (params: {
65
+ scopes: AgentScopeConfig;
66
+ triggerId: string;
67
+ data: TriggerUpdate;
68
+ }) => Promise<TriggerSelect>;
69
+ /**
70
+ * Delete a trigger (agent-scoped)
71
+ */
72
+ declare const deleteTrigger: (db: AgentsManageDatabaseClient) => (params: {
73
+ scopes: AgentScopeConfig;
74
+ triggerId: string;
75
+ }) => Promise<void>;
76
+ /**
77
+ * Upsert a trigger (create or update based on existence)
78
+ */
79
+ declare const upsertTrigger: (db: AgentsManageDatabaseClient) => (params: {
80
+ scopes: AgentScopeConfig;
81
+ data: TriggerInsert;
82
+ }) => Promise<TriggerSelect>;
83
+ //#endregion
84
+ export { createTrigger, deleteTrigger, getTriggerById, listTriggers, listTriggersPaginated, updateTrigger, upsertTrigger };