@inkeep/agents-core 0.0.0-dev-20260319160044 → 0.0.0-dev-20260319205809
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.
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +2 -2
- package/dist/data-access/manage/agents.d.ts +11 -11
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/skills.d.ts +9 -9
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +9 -9
- package/dist/data-access/manage/tools.d.ts +15 -15
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +6 -6
- package/dist/data-access/runtime/conversations.d.ts +16 -16
- package/dist/data-access/runtime/messages.d.ts +6 -6
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +10 -1
- package/dist/data-access/runtime/scheduledTriggerInvocations.js +13 -1
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/manage-schema.d.ts +453 -453
- package/dist/db/runtime/runtime-schema.d.ts +328 -328
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1782 -1782
- package/package.json +1 -1
|
@@ -9,10 +9,10 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
9
9
|
scopes: SubAgentScopeConfig;
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
agentId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
tenantId: string;
|
|
15
12
|
id: string;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
agentId: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
headers: Record<string, string> | null;
|
|
@@ -44,10 +44,10 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
|
|
|
44
44
|
declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
|
-
agentId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
tenantId: string;
|
|
50
47
|
id: string;
|
|
48
|
+
tenantId: string;
|
|
49
|
+
projectId: string;
|
|
50
|
+
agentId: string;
|
|
51
51
|
createdAt: string;
|
|
52
52
|
updatedAt: string;
|
|
53
53
|
headers: Record<string, string> | null;
|
|
@@ -57,10 +57,10 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
57
57
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
|
-
agentId: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
tenantId: string;
|
|
63
60
|
id: string;
|
|
61
|
+
tenantId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
agentId: string;
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
66
|
headers: Record<string, string> | null;
|
|
@@ -180,10 +180,10 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
180
180
|
headers?: Record<string, string> | null;
|
|
181
181
|
};
|
|
182
182
|
}) => Promise<{
|
|
183
|
-
agentId: string;
|
|
184
|
-
projectId: string;
|
|
185
|
-
tenantId: string;
|
|
186
183
|
id: string;
|
|
184
|
+
tenantId: string;
|
|
185
|
+
projectId: string;
|
|
186
|
+
agentId: string;
|
|
187
187
|
createdAt: string;
|
|
188
188
|
updatedAt: string;
|
|
189
189
|
headers: Record<string, string> | null;
|
|
@@ -197,10 +197,10 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
197
197
|
scopes: SubAgentScopeConfig;
|
|
198
198
|
externalAgentId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
|
-
agentId: string;
|
|
201
|
-
projectId: string;
|
|
202
|
-
tenantId: string;
|
|
203
200
|
id: string;
|
|
201
|
+
tenantId: string;
|
|
202
|
+
projectId: string;
|
|
203
|
+
agentId: string;
|
|
204
204
|
createdAt: string;
|
|
205
205
|
updatedAt: string;
|
|
206
206
|
headers: Record<string, string> | null;
|
|
@@ -218,10 +218,10 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
218
218
|
headers?: Record<string, string> | null;
|
|
219
219
|
};
|
|
220
220
|
}) => Promise<{
|
|
221
|
-
agentId: string;
|
|
222
|
-
projectId: string;
|
|
223
|
-
tenantId: string;
|
|
224
221
|
id: string;
|
|
222
|
+
tenantId: string;
|
|
223
|
+
projectId: string;
|
|
224
|
+
agentId: string;
|
|
225
225
|
createdAt: string;
|
|
226
226
|
updatedAt: string;
|
|
227
227
|
headers: Record<string, string> | null;
|
|
@@ -9,10 +9,10 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
agentId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
tenantId: string;
|
|
15
12
|
id: string;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
agentId: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
sourceSubAgentId: string;
|
|
@@ -44,10 +44,10 @@ declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
44
44
|
declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
|
-
agentId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
tenantId: string;
|
|
50
47
|
id: string;
|
|
48
|
+
tenantId: string;
|
|
49
|
+
projectId: string;
|
|
50
|
+
agentId: string;
|
|
51
51
|
createdAt: string;
|
|
52
52
|
updatedAt: string;
|
|
53
53
|
sourceSubAgentId: string;
|
|
@@ -57,10 +57,10 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
57
57
|
declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
|
-
agentId: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
tenantId: string;
|
|
63
60
|
id: string;
|
|
61
|
+
tenantId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
agentId: string;
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
66
|
sourceSubAgentId: string;
|
|
@@ -126,10 +126,10 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
126
126
|
}[];
|
|
127
127
|
}>;
|
|
128
128
|
declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
129
|
-
agentId: string;
|
|
130
|
-
projectId: string;
|
|
131
|
-
tenantId: string;
|
|
132
129
|
id: string;
|
|
130
|
+
tenantId: string;
|
|
131
|
+
projectId: string;
|
|
132
|
+
agentId: string;
|
|
133
133
|
createdAt: string;
|
|
134
134
|
updatedAt: string;
|
|
135
135
|
sourceSubAgentId: string;
|
|
@@ -145,10 +145,10 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
145
145
|
targetSubAgentId?: string;
|
|
146
146
|
relationType: string;
|
|
147
147
|
}) => Promise<{
|
|
148
|
-
agentId: string;
|
|
149
|
-
projectId: string;
|
|
150
|
-
tenantId: string;
|
|
151
148
|
id: string;
|
|
149
|
+
tenantId: string;
|
|
150
|
+
projectId: string;
|
|
151
|
+
agentId: string;
|
|
152
152
|
createdAt: string;
|
|
153
153
|
updatedAt: string;
|
|
154
154
|
sourceSubAgentId: string;
|
|
@@ -159,10 +159,10 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
159
159
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
160
160
|
*/
|
|
161
161
|
declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
162
|
-
agentId: string;
|
|
163
|
-
projectId: string;
|
|
164
|
-
tenantId: string;
|
|
165
162
|
id: string;
|
|
163
|
+
tenantId: string;
|
|
164
|
+
projectId: string;
|
|
165
|
+
agentId: string;
|
|
166
166
|
createdAt: string;
|
|
167
167
|
updatedAt: string;
|
|
168
168
|
sourceSubAgentId: string;
|
|
@@ -204,10 +204,10 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
204
204
|
}> | null;
|
|
205
205
|
};
|
|
206
206
|
}) => Promise<{
|
|
207
|
-
agentId: string;
|
|
208
|
-
projectId: string;
|
|
209
|
-
tenantId: string;
|
|
210
207
|
id: string;
|
|
208
|
+
tenantId: string;
|
|
209
|
+
projectId: string;
|
|
210
|
+
agentId: string;
|
|
211
211
|
createdAt: string;
|
|
212
212
|
updatedAt: string;
|
|
213
213
|
toolId: string;
|
|
@@ -248,10 +248,10 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
248
248
|
scopes: SubAgentScopeConfig;
|
|
249
249
|
relationId: string;
|
|
250
250
|
}) => Promise<{
|
|
251
|
-
agentId: string;
|
|
252
|
-
projectId: string;
|
|
253
|
-
tenantId: string;
|
|
254
251
|
id: string;
|
|
252
|
+
tenantId: string;
|
|
253
|
+
projectId: string;
|
|
254
|
+
agentId: string;
|
|
255
255
|
createdAt: string;
|
|
256
256
|
updatedAt: string;
|
|
257
257
|
toolId: string;
|
|
@@ -9,10 +9,10 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
9
9
|
scopes: SubAgentScopeConfig;
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
agentId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
tenantId: string;
|
|
15
12
|
id: string;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
agentId: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
headers: Record<string, string> | null;
|
|
@@ -44,10 +44,10 @@ declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =
|
|
|
44
44
|
declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
|
-
agentId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
tenantId: string;
|
|
50
47
|
id: string;
|
|
48
|
+
tenantId: string;
|
|
49
|
+
projectId: string;
|
|
50
|
+
agentId: string;
|
|
51
51
|
createdAt: string;
|
|
52
52
|
updatedAt: string;
|
|
53
53
|
headers: Record<string, string> | null;
|
|
@@ -57,10 +57,10 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
57
57
|
declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
|
-
agentId: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
tenantId: string;
|
|
63
60
|
id: string;
|
|
61
|
+
tenantId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
agentId: string;
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
66
|
headers: Record<string, string> | null;
|
|
@@ -210,10 +210,10 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
210
210
|
headers?: Record<string, string> | null;
|
|
211
211
|
};
|
|
212
212
|
}) => Promise<{
|
|
213
|
-
agentId: string;
|
|
214
|
-
projectId: string;
|
|
215
|
-
tenantId: string;
|
|
216
213
|
id: string;
|
|
214
|
+
tenantId: string;
|
|
215
|
+
projectId: string;
|
|
216
|
+
agentId: string;
|
|
217
217
|
createdAt: string;
|
|
218
218
|
updatedAt: string;
|
|
219
219
|
headers: Record<string, string> | null;
|
|
@@ -227,10 +227,10 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
227
227
|
scopes: SubAgentScopeConfig;
|
|
228
228
|
targetAgentId: string;
|
|
229
229
|
}) => Promise<{
|
|
230
|
-
agentId: string;
|
|
231
|
-
projectId: string;
|
|
232
|
-
tenantId: string;
|
|
233
230
|
id: string;
|
|
231
|
+
tenantId: string;
|
|
232
|
+
projectId: string;
|
|
233
|
+
agentId: string;
|
|
234
234
|
createdAt: string;
|
|
235
235
|
updatedAt: string;
|
|
236
236
|
headers: Record<string, string> | null;
|
|
@@ -248,10 +248,10 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
248
248
|
headers?: Record<string, string> | null;
|
|
249
249
|
};
|
|
250
250
|
}) => Promise<{
|
|
251
|
-
agentId: string;
|
|
252
|
-
projectId: string;
|
|
253
|
-
tenantId: string;
|
|
254
251
|
id: string;
|
|
252
|
+
tenantId: string;
|
|
253
|
+
projectId: string;
|
|
254
|
+
agentId: string;
|
|
255
255
|
createdAt: string;
|
|
256
256
|
updatedAt: string;
|
|
257
257
|
headers: Record<string, string> | null;
|
|
@@ -9,12 +9,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
subAgentId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
agentId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
tenantId: string;
|
|
15
12
|
id: string;
|
|
16
13
|
name: string;
|
|
17
14
|
description: string | null;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
agentId: string;
|
|
18
18
|
prompt: string | null;
|
|
19
19
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
20
20
|
models: {
|
|
@@ -40,12 +40,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
40
40
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
41
41
|
scopes: AgentScopeConfig;
|
|
42
42
|
}) => Promise<{
|
|
43
|
-
agentId: string;
|
|
44
|
-
projectId: string;
|
|
45
|
-
tenantId: string;
|
|
46
43
|
id: string;
|
|
47
44
|
name: string;
|
|
48
45
|
description: string | null;
|
|
46
|
+
tenantId: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
agentId: string;
|
|
49
49
|
prompt: string | null;
|
|
50
50
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
51
51
|
models: {
|
|
@@ -109,12 +109,12 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
109
109
|
};
|
|
110
110
|
}>;
|
|
111
111
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
112
|
-
agentId: string;
|
|
113
|
-
projectId: string;
|
|
114
|
-
tenantId: string;
|
|
115
112
|
id: string;
|
|
116
113
|
name: string;
|
|
117
114
|
description: string | null;
|
|
115
|
+
tenantId: string;
|
|
116
|
+
projectId: string;
|
|
117
|
+
agentId: string;
|
|
118
118
|
prompt: string | null;
|
|
119
119
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
120
120
|
models: {
|
|
@@ -20,11 +20,11 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
20
20
|
scopes: ProjectScopeConfig;
|
|
21
21
|
toolId: string;
|
|
22
22
|
}) => Promise<{
|
|
23
|
-
projectId: string;
|
|
24
|
-
tenantId: string;
|
|
25
23
|
id: string;
|
|
26
24
|
name: string;
|
|
27
25
|
description: string | null;
|
|
26
|
+
tenantId: string;
|
|
27
|
+
projectId: string;
|
|
28
28
|
createdAt: string;
|
|
29
29
|
updatedAt: string;
|
|
30
30
|
headers: Record<string, string> | null;
|
|
@@ -78,11 +78,11 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
78
78
|
};
|
|
79
79
|
}>;
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
|
-
projectId: string;
|
|
82
|
-
tenantId: string;
|
|
83
81
|
id: string;
|
|
84
82
|
name: string;
|
|
85
83
|
description: string | null;
|
|
84
|
+
tenantId: string;
|
|
85
|
+
projectId: string;
|
|
86
86
|
createdAt: string;
|
|
87
87
|
updatedAt: string;
|
|
88
88
|
headers: Record<string, string> | null;
|
|
@@ -135,10 +135,10 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
135
135
|
needsApproval?: boolean;
|
|
136
136
|
}> | null;
|
|
137
137
|
}) => Promise<{
|
|
138
|
-
agentId: string;
|
|
139
|
-
projectId: string;
|
|
140
|
-
tenantId: string;
|
|
141
138
|
id: string;
|
|
139
|
+
tenantId: string;
|
|
140
|
+
projectId: string;
|
|
141
|
+
agentId: string;
|
|
142
142
|
createdAt: string;
|
|
143
143
|
updatedAt: string;
|
|
144
144
|
toolId: string;
|
|
@@ -154,10 +154,10 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
154
154
|
subAgentId: string;
|
|
155
155
|
toolId: string;
|
|
156
156
|
}) => Promise<{
|
|
157
|
-
agentId: string;
|
|
158
|
-
projectId: string;
|
|
159
|
-
tenantId: string;
|
|
160
157
|
id: string;
|
|
158
|
+
tenantId: string;
|
|
159
|
+
projectId: string;
|
|
160
|
+
agentId: string;
|
|
161
161
|
createdAt: string;
|
|
162
162
|
updatedAt: string;
|
|
163
163
|
toolId: string;
|
|
@@ -182,10 +182,10 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
182
182
|
}> | null;
|
|
183
183
|
relationId?: string;
|
|
184
184
|
}) => Promise<{
|
|
185
|
-
agentId: string;
|
|
186
|
-
projectId: string;
|
|
187
|
-
tenantId: string;
|
|
188
185
|
id: string;
|
|
186
|
+
tenantId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
agentId: string;
|
|
189
189
|
createdAt: string;
|
|
190
190
|
updatedAt: string;
|
|
191
191
|
toolId: string;
|
|
@@ -202,11 +202,11 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
202
202
|
declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
203
203
|
data: ToolInsert;
|
|
204
204
|
}) => Promise<{
|
|
205
|
-
projectId: string;
|
|
206
|
-
tenantId: string;
|
|
207
205
|
id: string;
|
|
208
206
|
name: string;
|
|
209
207
|
description: string | null;
|
|
208
|
+
tenantId: string;
|
|
209
|
+
projectId: string;
|
|
210
210
|
createdAt: string;
|
|
211
211
|
updatedAt: string;
|
|
212
212
|
headers: Record<string, string> | null;
|
|
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
|
|
|
40
40
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
41
41
|
encoding: "hex" | "base64";
|
|
42
42
|
signature: {
|
|
43
|
-
source: "query" | "
|
|
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" | "
|
|
49
|
+
source: "literal" | "body" | "header";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
@@ -8,11 +8,11 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
8
8
|
scopes: ProjectScopeConfig;
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
agentId: string;
|
|
12
|
-
projectId: string;
|
|
13
|
-
tenantId: string;
|
|
14
11
|
id: string;
|
|
15
12
|
name: string | null;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
agentId: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
expiresAt: string | null;
|
|
@@ -22,11 +22,11 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
22
22
|
lastUsedAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
|
-
agentId: string;
|
|
26
|
-
projectId: string;
|
|
27
|
-
tenantId: string;
|
|
28
25
|
id: string;
|
|
29
26
|
name: string | null;
|
|
27
|
+
tenantId: string;
|
|
28
|
+
projectId: string;
|
|
29
|
+
agentId: string;
|
|
30
30
|
createdAt: string;
|
|
31
31
|
updatedAt: string;
|
|
32
32
|
expiresAt: string | null;
|
|
@@ -39,11 +39,11 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
40
40
|
agentId?: string;
|
|
41
41
|
}) => Promise<{
|
|
42
|
-
agentId: string;
|
|
43
|
-
projectId: string;
|
|
44
|
-
tenantId: string;
|
|
45
42
|
id: string;
|
|
46
43
|
name: string | null;
|
|
44
|
+
tenantId: string;
|
|
45
|
+
projectId: string;
|
|
46
|
+
agentId: string;
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
49
|
expiresAt: string | null;
|
|
@@ -66,11 +66,11 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
66
66
|
};
|
|
67
67
|
}>;
|
|
68
68
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
69
|
-
agentId: string;
|
|
70
|
-
projectId: string;
|
|
71
|
-
tenantId: string;
|
|
72
69
|
id: string;
|
|
73
70
|
name: string | null;
|
|
71
|
+
tenantId: string;
|
|
72
|
+
projectId: string;
|
|
73
|
+
agentId: string;
|
|
74
74
|
createdAt: string;
|
|
75
75
|
updatedAt: string;
|
|
76
76
|
expiresAt: string | null;
|
|
@@ -5,12 +5,12 @@ 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
|
-
projectId: string | null;
|
|
10
|
-
tenantId: string | null;
|
|
11
8
|
id: string;
|
|
12
9
|
name: string;
|
|
13
10
|
description: string | null;
|
|
11
|
+
tenantId: string | null;
|
|
12
|
+
projectId: string | null;
|
|
13
|
+
type: AppType;
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
16
|
enabled: boolean;
|
|
@@ -52,12 +52,12 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
52
52
|
};
|
|
53
53
|
}>;
|
|
54
54
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
55
|
-
type: AppType;
|
|
56
|
-
projectId: string | null;
|
|
57
|
-
tenantId: string | null;
|
|
58
55
|
id: string;
|
|
59
56
|
name: string;
|
|
60
57
|
description: string | null;
|
|
58
|
+
tenantId: string | null;
|
|
59
|
+
projectId: string | null;
|
|
60
|
+
type: AppType;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
63
|
enabled: boolean;
|
|
@@ -16,11 +16,10 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
16
16
|
total: number;
|
|
17
17
|
}>;
|
|
18
18
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
19
|
-
agentId: string | null;
|
|
20
|
-
projectId: string;
|
|
21
|
-
tenantId: string;
|
|
22
|
-
userId: string | null;
|
|
23
19
|
id: string;
|
|
20
|
+
tenantId: string;
|
|
21
|
+
projectId: string;
|
|
22
|
+
agentId: string | null;
|
|
24
23
|
title: string | null;
|
|
25
24
|
createdAt: string;
|
|
26
25
|
updatedAt: string;
|
|
@@ -30,6 +29,7 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
|
|
|
30
29
|
name: string;
|
|
31
30
|
hash: string;
|
|
32
31
|
} | null;
|
|
32
|
+
userId: string | null;
|
|
33
33
|
activeSubAgentId: string;
|
|
34
34
|
lastContextResolution: string | null;
|
|
35
35
|
}>;
|
|
@@ -85,11 +85,10 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
85
85
|
scopes: ProjectScopeConfig;
|
|
86
86
|
conversationId: string;
|
|
87
87
|
}) => Promise<{
|
|
88
|
-
agentId: string | null;
|
|
89
|
-
projectId: string;
|
|
90
|
-
tenantId: string;
|
|
91
|
-
userId: string | null;
|
|
92
88
|
id: string;
|
|
89
|
+
tenantId: string;
|
|
90
|
+
projectId: string;
|
|
91
|
+
agentId: string | null;
|
|
93
92
|
title: string | null;
|
|
94
93
|
createdAt: string;
|
|
95
94
|
updatedAt: string;
|
|
@@ -99,6 +98,7 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
99
98
|
name: string;
|
|
100
99
|
hash: string;
|
|
101
100
|
} | null;
|
|
101
|
+
userId: string | null;
|
|
102
102
|
activeSubAgentId: string;
|
|
103
103
|
lastContextResolution: string | null;
|
|
104
104
|
} | undefined>;
|
|
@@ -121,11 +121,10 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
121
121
|
metadata?: ConversationMetadata | null | undefined;
|
|
122
122
|
contextConfigId?: string | undefined;
|
|
123
123
|
} | {
|
|
124
|
-
agentId: string | null;
|
|
125
|
-
projectId: string;
|
|
126
|
-
tenantId: string;
|
|
127
|
-
userId: string | null;
|
|
128
124
|
id: string;
|
|
125
|
+
tenantId: string;
|
|
126
|
+
projectId: string;
|
|
127
|
+
agentId: string | null;
|
|
129
128
|
title: string | null;
|
|
130
129
|
createdAt: string;
|
|
131
130
|
updatedAt: string;
|
|
@@ -135,6 +134,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
135
134
|
name: string;
|
|
136
135
|
hash: string;
|
|
137
136
|
} | null;
|
|
137
|
+
userId: string | null;
|
|
138
138
|
activeSubAgentId: string;
|
|
139
139
|
lastContextResolution: string | null;
|
|
140
140
|
}>;
|
|
@@ -153,11 +153,10 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
153
153
|
scopes: ProjectScopeConfig;
|
|
154
154
|
conversationId: string;
|
|
155
155
|
}) => Promise<{
|
|
156
|
-
agentId: string | null;
|
|
157
|
-
projectId: string;
|
|
158
|
-
tenantId: string;
|
|
159
|
-
userId: string | null;
|
|
160
156
|
id: string;
|
|
157
|
+
tenantId: string;
|
|
158
|
+
projectId: string;
|
|
159
|
+
agentId: string | null;
|
|
161
160
|
title: string | null;
|
|
162
161
|
createdAt: string;
|
|
163
162
|
updatedAt: string;
|
|
@@ -167,6 +166,7 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
167
166
|
name: string;
|
|
168
167
|
hash: string;
|
|
169
168
|
} | null;
|
|
169
|
+
userId: string | null;
|
|
170
170
|
activeSubAgentId: string;
|
|
171
171
|
lastContextResolution: string | null;
|
|
172
172
|
} | undefined>;
|
|
@@ -10,9 +10,9 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
-
projectId: string;
|
|
14
|
-
tenantId: string;
|
|
15
13
|
id: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
projectId: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
metadata: MessageMetadata | null;
|
|
@@ -144,9 +144,9 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
144
144
|
scopes: ProjectScopeConfig;
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
|
-
projectId: string;
|
|
148
|
-
tenantId: string;
|
|
149
147
|
id: string;
|
|
148
|
+
tenantId: string;
|
|
149
|
+
projectId: string;
|
|
150
150
|
createdAt: string;
|
|
151
151
|
updatedAt: string;
|
|
152
152
|
metadata: MessageMetadata | null;
|
|
@@ -197,9 +197,9 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
197
197
|
scopes: ProjectScopeConfig;
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
|
-
projectId: string;
|
|
201
|
-
tenantId: string;
|
|
202
200
|
id: string;
|
|
201
|
+
tenantId: string;
|
|
202
|
+
projectId: string;
|
|
203
203
|
createdAt: string;
|
|
204
204
|
updatedAt: string;
|
|
205
205
|
metadata: MessageMetadata | null;
|
|
@@ -116,6 +116,15 @@ declare const markScheduledTriggerInvocationFailed: (db: AgentsRunDatabaseClient
|
|
|
116
116
|
scheduledTriggerId: string;
|
|
117
117
|
invocationId: string;
|
|
118
118
|
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
119
|
+
/**
|
|
120
|
+
* Reset a cancelled invocation back to pending.
|
|
121
|
+
* Only updates if the current status is 'cancelled' to prevent race conditions.
|
|
122
|
+
*/
|
|
123
|
+
declare const resetCancelledInvocationToPending: (db: AgentsRunDatabaseClient) => (params: {
|
|
124
|
+
scopes: AgentScopeConfig;
|
|
125
|
+
scheduledTriggerId: string;
|
|
126
|
+
invocationId: string;
|
|
127
|
+
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
119
128
|
/**
|
|
120
129
|
* Add a conversation ID to the invocation's conversationIds array
|
|
121
130
|
* Used to track all conversations created during retries
|
|
@@ -245,4 +254,4 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
245
254
|
};
|
|
246
255
|
}>;
|
|
247
256
|
//#endregion
|
|
248
|
-
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
|
|
257
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|
|
@@ -98,6 +98,18 @@ const markScheduledTriggerInvocationFailed = (db) => async (params) => {
|
|
|
98
98
|
}).where(and(agentScopedWhere(scheduledTriggerInvocations, params.scopes), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), ne(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
|
|
99
99
|
};
|
|
100
100
|
/**
|
|
101
|
+
* Reset a cancelled invocation back to pending.
|
|
102
|
+
* Only updates if the current status is 'cancelled' to prevent race conditions.
|
|
103
|
+
*/
|
|
104
|
+
const resetCancelledInvocationToPending = (db) => async (params) => {
|
|
105
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
106
|
+
status: "pending",
|
|
107
|
+
attemptNumber: 1,
|
|
108
|
+
startedAt: null,
|
|
109
|
+
completedAt: null
|
|
110
|
+
}).where(and(agentScopedWhere(scheduledTriggerInvocations, params.scopes), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), eq(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
101
113
|
* Add a conversation ID to the invocation's conversationIds array
|
|
102
114
|
* Used to track all conversations created during retries
|
|
103
115
|
*/
|
|
@@ -213,4 +225,4 @@ const listProjectScheduledTriggerInvocationsPaginated = (db) => async (params) =
|
|
|
213
225
|
};
|
|
214
226
|
|
|
215
227
|
//#endregion
|
|
216
|
-
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
|
|
228
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|