@inkeep/agents-core 0.0.0-dev-20260325213342 → 0.0.0-dev-20260325220926
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-schema.d.ts +108 -108
- 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/client-exports.d.ts +3 -3
- package/dist/data-access/manage/agentFull.js +5 -5
- package/dist/data-access/manage/agents.d.ts +43 -43
- package/dist/data-access/manage/artifactComponents.d.ts +14 -14
- package/dist/data-access/manage/contextConfigs.d.ts +20 -20
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +16 -16
- package/dist/data-access/manage/functionTools.js +2 -2
- package/dist/data-access/manage/skills.d.ts +15 -15
- package/dist/data-access/manage/skills.js +2 -3
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentExternalAgentRelations.js +2 -2
- package/dist/data-access/manage/subAgentRelations.d.ts +26 -26
- package/dist/data-access/manage/subAgentRelations.js +2 -2
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentTeamAgentRelations.js +2 -2
- package/dist/data-access/manage/subAgents.d.ts +21 -21
- package/dist/data-access/manage/tools.d.ts +24 -24
- package/dist/data-access/manage/tools.js +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +20 -20
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +331 -331
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/utils/apiKeys.js +1 -1
- package/dist/utils/conversations.d.ts +7 -1
- package/dist/utils/conversations.js +10 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1944 -1944
- package/package.json +1 -1
|
@@ -10,11 +10,11 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
|
-
agentId: string;
|
|
16
13
|
createdAt: string;
|
|
17
14
|
updatedAt: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
headers: Record<string, string> | null;
|
|
19
19
|
externalAgentId: string;
|
|
20
20
|
subAgentId: string;
|
|
@@ -45,11 +45,11 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
47
|
id: string;
|
|
48
|
-
tenantId: string;
|
|
49
|
-
projectId: string;
|
|
50
|
-
agentId: string;
|
|
51
48
|
createdAt: string;
|
|
52
49
|
updatedAt: string;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
headers: Record<string, string> | null;
|
|
54
54
|
externalAgentId: string;
|
|
55
55
|
subAgentId: string;
|
|
@@ -58,11 +58,11 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
|
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
60
|
id: string;
|
|
61
|
-
tenantId: string;
|
|
62
|
-
projectId: string;
|
|
63
|
-
agentId: string;
|
|
64
61
|
createdAt: string;
|
|
65
62
|
updatedAt: string;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
headers: Record<string, string> | null;
|
|
67
67
|
externalAgentId: string;
|
|
68
68
|
subAgentId: string;
|
|
@@ -181,11 +181,11 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
181
181
|
};
|
|
182
182
|
}) => Promise<{
|
|
183
183
|
id: string;
|
|
184
|
-
tenantId: string;
|
|
185
|
-
projectId: string;
|
|
186
|
-
agentId: string;
|
|
187
184
|
createdAt: string;
|
|
188
185
|
updatedAt: string;
|
|
186
|
+
agentId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
tenantId: string;
|
|
189
189
|
headers: Record<string, string> | null;
|
|
190
190
|
externalAgentId: string;
|
|
191
191
|
subAgentId: string;
|
|
@@ -198,11 +198,11 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
198
198
|
externalAgentId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
200
|
id: string;
|
|
201
|
-
tenantId: string;
|
|
202
|
-
projectId: string;
|
|
203
|
-
agentId: string;
|
|
204
201
|
createdAt: string;
|
|
205
202
|
updatedAt: string;
|
|
203
|
+
agentId: string;
|
|
204
|
+
projectId: string;
|
|
205
|
+
tenantId: string;
|
|
206
206
|
headers: Record<string, string> | null;
|
|
207
207
|
externalAgentId: string;
|
|
208
208
|
subAgentId: string;
|
|
@@ -219,11 +219,11 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
219
219
|
};
|
|
220
220
|
}) => Promise<{
|
|
221
221
|
id: string;
|
|
222
|
-
tenantId: string;
|
|
223
|
-
projectId: string;
|
|
224
|
-
agentId: string;
|
|
225
222
|
createdAt: string;
|
|
226
223
|
updatedAt: string;
|
|
224
|
+
agentId: string;
|
|
225
|
+
projectId: string;
|
|
226
|
+
tenantId: string;
|
|
227
227
|
headers: Record<string, string> | null;
|
|
228
228
|
externalAgentId: string;
|
|
229
229
|
subAgentId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { externalAgents, subAgentExternalAgentRelations, subAgents } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { deriveRelationId } from "../../utils/conversations.js";
|
|
2
3
|
import { agentScopedWhere, subAgentScopedWhere } from "./scope-helpers.js";
|
|
3
4
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
4
|
-
import { nanoid } from "nanoid";
|
|
5
5
|
|
|
6
6
|
//#region src/data-access/manage/subAgentExternalAgentRelations.ts
|
|
7
7
|
const getSubAgentExternalAgentRelationById = (db) => async (params) => {
|
|
@@ -122,7 +122,7 @@ const getSubAgentsForExternalAgent = (db) => async (params) => {
|
|
|
122
122
|
};
|
|
123
123
|
};
|
|
124
124
|
const createSubAgentExternalAgentRelation = (db) => async (params) => {
|
|
125
|
-
const finalRelationId = params.relationId ??
|
|
125
|
+
const finalRelationId = params.relationId ?? deriveRelationId(params.scopes.tenantId, params.scopes.projectId, params.scopes.agentId, params.scopes.subAgentId, params.data.externalAgentId);
|
|
126
126
|
return (await db.insert(subAgentExternalAgentRelations).values({
|
|
127
127
|
id: finalRelationId,
|
|
128
128
|
tenantId: params.scopes.tenantId,
|
|
@@ -10,11 +10,11 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
|
-
agentId: string;
|
|
16
13
|
createdAt: string;
|
|
17
14
|
updatedAt: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
sourceSubAgentId: string;
|
|
19
19
|
targetSubAgentId: string | null;
|
|
20
20
|
relationType: string | null;
|
|
@@ -45,11 +45,11 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
47
|
id: string;
|
|
48
|
-
tenantId: string;
|
|
49
|
-
projectId: string;
|
|
50
|
-
agentId: string;
|
|
51
48
|
createdAt: string;
|
|
52
49
|
updatedAt: string;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
sourceSubAgentId: string;
|
|
54
54
|
targetSubAgentId: string | null;
|
|
55
55
|
relationType: string | null;
|
|
@@ -58,11 +58,11 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
60
|
id: string;
|
|
61
|
-
tenantId: string;
|
|
62
|
-
projectId: string;
|
|
63
|
-
agentId: string;
|
|
64
61
|
createdAt: string;
|
|
65
62
|
updatedAt: string;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
sourceSubAgentId: string;
|
|
67
67
|
targetSubAgentId: string | null;
|
|
68
68
|
relationType: string | null;
|
|
@@ -127,11 +127,11 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
127
127
|
}>;
|
|
128
128
|
declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
129
129
|
id: string;
|
|
130
|
-
tenantId: string;
|
|
131
|
-
projectId: string;
|
|
132
|
-
agentId: string;
|
|
133
130
|
createdAt: string;
|
|
134
131
|
updatedAt: string;
|
|
132
|
+
agentId: string;
|
|
133
|
+
projectId: string;
|
|
134
|
+
tenantId: string;
|
|
135
135
|
sourceSubAgentId: string;
|
|
136
136
|
targetSubAgentId: string | null;
|
|
137
137
|
relationType: string | null;
|
|
@@ -146,11 +146,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
146
146
|
relationType: string;
|
|
147
147
|
}) => Promise<{
|
|
148
148
|
id: string;
|
|
149
|
-
tenantId: string;
|
|
150
|
-
projectId: string;
|
|
151
|
-
agentId: string;
|
|
152
149
|
createdAt: string;
|
|
153
150
|
updatedAt: string;
|
|
151
|
+
agentId: string;
|
|
152
|
+
projectId: string;
|
|
153
|
+
tenantId: string;
|
|
154
154
|
sourceSubAgentId: string;
|
|
155
155
|
targetSubAgentId: string | null;
|
|
156
156
|
relationType: string | null;
|
|
@@ -160,11 +160,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
160
160
|
*/
|
|
161
161
|
declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
162
162
|
id: string;
|
|
163
|
-
tenantId: string;
|
|
164
|
-
projectId: string;
|
|
165
|
-
agentId: string;
|
|
166
163
|
createdAt: string;
|
|
167
164
|
updatedAt: string;
|
|
165
|
+
agentId: string;
|
|
166
|
+
projectId: string;
|
|
167
|
+
tenantId: string;
|
|
168
168
|
sourceSubAgentId: string;
|
|
169
169
|
targetSubAgentId: string | null;
|
|
170
170
|
relationType: string | null;
|
|
@@ -205,13 +205,13 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
205
205
|
};
|
|
206
206
|
}) => Promise<{
|
|
207
207
|
id: string;
|
|
208
|
-
tenantId: string;
|
|
209
|
-
projectId: string;
|
|
210
|
-
agentId: string;
|
|
211
208
|
createdAt: string;
|
|
212
209
|
updatedAt: string;
|
|
213
|
-
|
|
210
|
+
agentId: string;
|
|
211
|
+
projectId: string;
|
|
212
|
+
tenantId: string;
|
|
214
213
|
headers: Record<string, string> | null;
|
|
214
|
+
toolId: string;
|
|
215
215
|
toolPolicies: Record<string, {
|
|
216
216
|
needsApproval?: boolean;
|
|
217
217
|
}> | null;
|
|
@@ -249,13 +249,13 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
249
249
|
relationId: string;
|
|
250
250
|
}) => Promise<{
|
|
251
251
|
id: string;
|
|
252
|
-
tenantId: string;
|
|
253
|
-
projectId: string;
|
|
254
|
-
agentId: string;
|
|
255
252
|
createdAt: string;
|
|
256
253
|
updatedAt: string;
|
|
257
|
-
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
258
257
|
headers: Record<string, string> | null;
|
|
258
|
+
toolId: string;
|
|
259
259
|
toolPolicies: Record<string, {
|
|
260
260
|
needsApproval?: boolean;
|
|
261
261
|
}> | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { subAgentRelations, subAgentToolRelations, subAgents, tools } from "../../db/manage/manage-schema.js";
|
|
2
|
-
import {
|
|
2
|
+
import { deriveRelationId } from "../../utils/conversations.js";
|
|
3
3
|
import { agentScopedWhere, subAgentScopedWhere } from "./scope-helpers.js";
|
|
4
4
|
import { and, count, desc, eq, isNotNull } from "drizzle-orm";
|
|
5
5
|
|
|
@@ -126,7 +126,7 @@ const deleteAgentRelationsByAgent = (db) => async (params) => {
|
|
|
126
126
|
return (await db.delete(subAgentRelations).where(agentScopedWhere(subAgentRelations, params.scopes)).returning()).length > 0;
|
|
127
127
|
};
|
|
128
128
|
const createAgentToolRelation = (db) => async (params) => {
|
|
129
|
-
const finalRelationId = params.relationId ??
|
|
129
|
+
const finalRelationId = params.relationId ?? deriveRelationId(params.scopes.tenantId, params.scopes.projectId, params.scopes.agentId, params.data.subAgentId, params.data.toolId);
|
|
130
130
|
return (await db.insert(subAgentToolRelations).values({
|
|
131
131
|
id: finalRelationId,
|
|
132
132
|
...params.scopes,
|
|
@@ -10,11 +10,11 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
|
-
agentId: string;
|
|
16
13
|
createdAt: string;
|
|
17
14
|
updatedAt: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
headers: Record<string, string> | null;
|
|
19
19
|
subAgentId: string;
|
|
20
20
|
targetAgentId: string;
|
|
@@ -45,11 +45,11 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
47
|
id: string;
|
|
48
|
-
tenantId: string;
|
|
49
|
-
projectId: string;
|
|
50
|
-
agentId: string;
|
|
51
48
|
createdAt: string;
|
|
52
49
|
updatedAt: string;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
headers: Record<string, string> | null;
|
|
54
54
|
subAgentId: string;
|
|
55
55
|
targetAgentId: string;
|
|
@@ -58,11 +58,11 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
|
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
60
|
id: string;
|
|
61
|
-
tenantId: string;
|
|
62
|
-
projectId: string;
|
|
63
|
-
agentId: string;
|
|
64
61
|
createdAt: string;
|
|
65
62
|
updatedAt: string;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
headers: Record<string, string> | null;
|
|
67
67
|
subAgentId: string;
|
|
68
68
|
targetAgentId: string;
|
|
@@ -211,11 +211,11 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
211
211
|
};
|
|
212
212
|
}) => Promise<{
|
|
213
213
|
id: string;
|
|
214
|
-
tenantId: string;
|
|
215
|
-
projectId: string;
|
|
216
|
-
agentId: string;
|
|
217
214
|
createdAt: string;
|
|
218
215
|
updatedAt: string;
|
|
216
|
+
agentId: string;
|
|
217
|
+
projectId: string;
|
|
218
|
+
tenantId: string;
|
|
219
219
|
headers: Record<string, string> | null;
|
|
220
220
|
subAgentId: string;
|
|
221
221
|
targetAgentId: string;
|
|
@@ -228,11 +228,11 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
228
228
|
targetAgentId: string;
|
|
229
229
|
}) => Promise<{
|
|
230
230
|
id: string;
|
|
231
|
-
tenantId: string;
|
|
232
|
-
projectId: string;
|
|
233
|
-
agentId: string;
|
|
234
231
|
createdAt: string;
|
|
235
232
|
updatedAt: string;
|
|
233
|
+
agentId: string;
|
|
234
|
+
projectId: string;
|
|
235
|
+
tenantId: string;
|
|
236
236
|
headers: Record<string, string> | null;
|
|
237
237
|
subAgentId: string;
|
|
238
238
|
targetAgentId: string;
|
|
@@ -249,11 +249,11 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
249
249
|
};
|
|
250
250
|
}) => Promise<{
|
|
251
251
|
id: string;
|
|
252
|
-
tenantId: string;
|
|
253
|
-
projectId: string;
|
|
254
|
-
agentId: string;
|
|
255
252
|
createdAt: string;
|
|
256
253
|
updatedAt: string;
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
257
257
|
headers: Record<string, string> | null;
|
|
258
258
|
subAgentId: string;
|
|
259
259
|
targetAgentId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { agents, subAgentTeamAgentRelations, subAgents } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { deriveRelationId } from "../../utils/conversations.js";
|
|
2
3
|
import { agentScopedWhere, subAgentScopedWhere } from "./scope-helpers.js";
|
|
3
4
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
4
|
-
import { nanoid } from "nanoid";
|
|
5
5
|
|
|
6
6
|
//#region src/data-access/manage/subAgentTeamAgentRelations.ts
|
|
7
7
|
const getSubAgentTeamAgentRelationById = (db) => async (params) => {
|
|
@@ -125,7 +125,7 @@ const getSubAgentsForTeamAgent = (db) => async (params) => {
|
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
const createSubAgentTeamAgentRelation = (db) => async (params) => {
|
|
128
|
-
const finalRelationId = params.relationId ??
|
|
128
|
+
const finalRelationId = params.relationId ?? deriveRelationId(params.scopes.tenantId, params.scopes.projectId, params.scopes.agentId, params.scopes.subAgentId, params.data.targetAgentId);
|
|
129
129
|
return (await db.insert(subAgentTeamAgentRelations).values({
|
|
130
130
|
id: finalRelationId,
|
|
131
131
|
...params.scopes,
|
|
@@ -10,13 +10,13 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
subAgentId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
|
+
createdAt: string;
|
|
13
14
|
name: string;
|
|
14
|
-
|
|
15
|
-
tenantId: string;
|
|
16
|
-
projectId: string;
|
|
15
|
+
updatedAt: string;
|
|
17
16
|
agentId: string;
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
|
+
description: string | null;
|
|
20
20
|
models: {
|
|
21
21
|
base?: {
|
|
22
22
|
model?: string | undefined;
|
|
@@ -31,23 +31,23 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
31
31
|
providerOptions?: Record<string, any> | undefined;
|
|
32
32
|
} | undefined;
|
|
33
33
|
} | null;
|
|
34
|
+
prompt: string | null;
|
|
34
35
|
stopWhen: {
|
|
35
36
|
stepCountIs?: number | undefined;
|
|
36
37
|
} | null;
|
|
37
|
-
|
|
38
|
-
updatedAt: string;
|
|
38
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
41
41
|
scopes: AgentScopeConfig;
|
|
42
42
|
}) => Promise<{
|
|
43
43
|
id: string;
|
|
44
|
+
createdAt: string;
|
|
44
45
|
name: string;
|
|
45
|
-
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
46
|
+
updatedAt: string;
|
|
48
47
|
agentId: string;
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
projectId: string;
|
|
49
|
+
tenantId: string;
|
|
50
|
+
description: string | null;
|
|
51
51
|
models: {
|
|
52
52
|
base?: {
|
|
53
53
|
model?: string | undefined;
|
|
@@ -62,11 +62,11 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
62
62
|
providerOptions?: Record<string, any> | undefined;
|
|
63
63
|
} | undefined;
|
|
64
64
|
} | null;
|
|
65
|
+
prompt: string | null;
|
|
65
66
|
stopWhen: {
|
|
66
67
|
stepCountIs?: number | undefined;
|
|
67
68
|
} | null;
|
|
68
|
-
|
|
69
|
-
updatedAt: string;
|
|
69
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
70
70
|
}[]>;
|
|
71
71
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
72
72
|
scopes: AgentScopeConfig;
|
|
@@ -110,13 +110,13 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
110
110
|
}>;
|
|
111
111
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
112
112
|
id: string;
|
|
113
|
+
createdAt: string;
|
|
113
114
|
name: string;
|
|
114
|
-
|
|
115
|
-
tenantId: string;
|
|
116
|
-
projectId: string;
|
|
115
|
+
updatedAt: string;
|
|
117
116
|
agentId: string;
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
projectId: string;
|
|
118
|
+
tenantId: string;
|
|
119
|
+
description: string | null;
|
|
120
120
|
models: {
|
|
121
121
|
base?: {
|
|
122
122
|
model?: string | undefined;
|
|
@@ -131,11 +131,11 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
131
131
|
providerOptions?: Record<string, any> | undefined;
|
|
132
132
|
} | undefined;
|
|
133
133
|
} | null;
|
|
134
|
+
prompt: string | null;
|
|
134
135
|
stopWhen: {
|
|
135
136
|
stepCountIs?: number | undefined;
|
|
136
137
|
} | null;
|
|
137
|
-
|
|
138
|
-
updatedAt: string;
|
|
138
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
139
139
|
}>;
|
|
140
140
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
141
141
|
scopes: AgentScopeConfig;
|
|
@@ -21,12 +21,12 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
21
21
|
toolId: string;
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
description: string | null;
|
|
26
|
-
tenantId: string;
|
|
27
|
-
projectId: string;
|
|
28
24
|
createdAt: string;
|
|
25
|
+
name: string;
|
|
29
26
|
updatedAt: string;
|
|
27
|
+
projectId: string;
|
|
28
|
+
tenantId: string;
|
|
29
|
+
description: string | null;
|
|
30
30
|
headers: Record<string, string> | null;
|
|
31
31
|
config: {
|
|
32
32
|
type: "mcp";
|
|
@@ -79,12 +79,12 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
79
79
|
}>;
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
81
|
id: string;
|
|
82
|
-
name: string;
|
|
83
|
-
description: string | null;
|
|
84
|
-
tenantId: string;
|
|
85
|
-
projectId: string;
|
|
86
82
|
createdAt: string;
|
|
83
|
+
name: string;
|
|
87
84
|
updatedAt: string;
|
|
85
|
+
projectId: string;
|
|
86
|
+
tenantId: string;
|
|
87
|
+
description: string | null;
|
|
88
88
|
headers: Record<string, string> | null;
|
|
89
89
|
config: {
|
|
90
90
|
type: "mcp";
|
|
@@ -136,13 +136,13 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
136
136
|
}> | null;
|
|
137
137
|
}) => Promise<{
|
|
138
138
|
id: string;
|
|
139
|
-
tenantId: string;
|
|
140
|
-
projectId: string;
|
|
141
|
-
agentId: string;
|
|
142
139
|
createdAt: string;
|
|
143
140
|
updatedAt: string;
|
|
144
|
-
|
|
141
|
+
agentId: string;
|
|
142
|
+
projectId: string;
|
|
143
|
+
tenantId: string;
|
|
145
144
|
headers: Record<string, string> | null;
|
|
145
|
+
toolId: string;
|
|
146
146
|
toolPolicies: Record<string, {
|
|
147
147
|
needsApproval?: boolean;
|
|
148
148
|
}> | null;
|
|
@@ -155,13 +155,13 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
155
155
|
toolId: string;
|
|
156
156
|
}) => Promise<{
|
|
157
157
|
id: string;
|
|
158
|
-
tenantId: string;
|
|
159
|
-
projectId: string;
|
|
160
|
-
agentId: string;
|
|
161
158
|
createdAt: string;
|
|
162
159
|
updatedAt: string;
|
|
163
|
-
|
|
160
|
+
agentId: string;
|
|
161
|
+
projectId: string;
|
|
162
|
+
tenantId: string;
|
|
164
163
|
headers: Record<string, string> | null;
|
|
164
|
+
toolId: string;
|
|
165
165
|
toolPolicies: Record<string, {
|
|
166
166
|
needsApproval?: boolean;
|
|
167
167
|
}> | null;
|
|
@@ -183,13 +183,13 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
183
183
|
relationId?: string;
|
|
184
184
|
}) => Promise<{
|
|
185
185
|
id: string;
|
|
186
|
-
tenantId: string;
|
|
187
|
-
projectId: string;
|
|
188
|
-
agentId: string;
|
|
189
186
|
createdAt: string;
|
|
190
187
|
updatedAt: string;
|
|
191
|
-
|
|
188
|
+
agentId: string;
|
|
189
|
+
projectId: string;
|
|
190
|
+
tenantId: string;
|
|
192
191
|
headers: Record<string, string> | null;
|
|
192
|
+
toolId: string;
|
|
193
193
|
toolPolicies: Record<string, {
|
|
194
194
|
needsApproval?: boolean;
|
|
195
195
|
}> | null;
|
|
@@ -203,12 +203,12 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
203
203
|
data: ToolInsert;
|
|
204
204
|
}) => Promise<{
|
|
205
205
|
id: string;
|
|
206
|
-
name: string;
|
|
207
|
-
description: string | null;
|
|
208
|
-
tenantId: string;
|
|
209
|
-
projectId: string;
|
|
210
206
|
createdAt: string;
|
|
207
|
+
name: string;
|
|
211
208
|
updatedAt: string;
|
|
209
|
+
projectId: string;
|
|
210
|
+
tenantId: string;
|
|
211
|
+
description: string | null;
|
|
212
212
|
headers: Record<string, string> | null;
|
|
213
213
|
config: {
|
|
214
214
|
type: "mcp";
|
|
@@ -9,7 +9,7 @@ import { getCredentialStoreLookupKeyFromRetrievalParams } from "../../utils/cred
|
|
|
9
9
|
import { CredentialStuffer } from "../../credential-stuffer/CredentialStuffer.js";
|
|
10
10
|
import "../../credential-stuffer/index.js";
|
|
11
11
|
import { createAgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
12
|
-
import {
|
|
12
|
+
import { deriveRelationId } from "../../utils/conversations.js";
|
|
13
13
|
import { getActiveBranch } from "../../dolt/schema-sync.js";
|
|
14
14
|
import { agentScopedWhere, projectScopedWhere } from "./scope-helpers.js";
|
|
15
15
|
import { isSlackWorkAppTool } from "../runtime/slack-work-app-mcp.js";
|
|
@@ -371,7 +371,7 @@ const deleteTool = (db) => async (params) => {
|
|
|
371
371
|
return true;
|
|
372
372
|
};
|
|
373
373
|
const addToolToAgent = (db) => async (params) => {
|
|
374
|
-
const id =
|
|
374
|
+
const id = deriveRelationId(params.scopes.tenantId, params.scopes.projectId, params.scopes.agentId, params.subAgentId, params.toolId);
|
|
375
375
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
376
376
|
const [created] = await db.insert(subAgentToolRelations).values({
|
|
377
377
|
id,
|
|
@@ -9,12 +9,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
name: string | null;
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
|
-
agentId: string;
|
|
16
12
|
createdAt: string;
|
|
13
|
+
name: string | null;
|
|
17
14
|
updatedAt: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
expiresAt: string | null;
|
|
19
19
|
publicId: string;
|
|
20
20
|
keyHash: string;
|
|
@@ -23,12 +23,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
25
|
id: string;
|
|
26
|
-
name: string | null;
|
|
27
|
-
tenantId: string;
|
|
28
|
-
projectId: string;
|
|
29
|
-
agentId: string;
|
|
30
26
|
createdAt: string;
|
|
27
|
+
name: string | null;
|
|
31
28
|
updatedAt: string;
|
|
29
|
+
agentId: string;
|
|
30
|
+
projectId: string;
|
|
31
|
+
tenantId: string;
|
|
32
32
|
expiresAt: string | null;
|
|
33
33
|
publicId: string;
|
|
34
34
|
keyHash: string;
|
|
@@ -40,12 +40,12 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
40
40
|
agentId?: string;
|
|
41
41
|
}) => Promise<{
|
|
42
42
|
id: string;
|
|
43
|
-
name: string | null;
|
|
44
|
-
tenantId: string;
|
|
45
|
-
projectId: string;
|
|
46
|
-
agentId: string;
|
|
47
43
|
createdAt: string;
|
|
44
|
+
name: string | null;
|
|
48
45
|
updatedAt: string;
|
|
46
|
+
agentId: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
tenantId: string;
|
|
49
49
|
expiresAt: string | null;
|
|
50
50
|
publicId: string;
|
|
51
51
|
keyHash: string;
|
|
@@ -67,12 +67,12 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
67
67
|
}>;
|
|
68
68
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
69
69
|
id: string;
|
|
70
|
-
name: string | null;
|
|
71
|
-
tenantId: string;
|
|
72
|
-
projectId: string;
|
|
73
|
-
agentId: string;
|
|
74
70
|
createdAt: string;
|
|
71
|
+
name: string | null;
|
|
75
72
|
updatedAt: string;
|
|
73
|
+
agentId: string;
|
|
74
|
+
projectId: string;
|
|
75
|
+
tenantId: string;
|
|
76
76
|
expiresAt: string | null;
|
|
77
77
|
publicId: string;
|
|
78
78
|
keyHash: string;
|
|
@@ -5,16 +5,16 @@ 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
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
description: string | null;
|
|
11
|
-
tenantId: string | null;
|
|
12
|
-
projectId: string | null;
|
|
13
|
-
prompt: string | null;
|
|
14
8
|
type: AppType;
|
|
9
|
+
id: string;
|
|
15
10
|
createdAt: string;
|
|
11
|
+
name: string;
|
|
16
12
|
updatedAt: string;
|
|
13
|
+
projectId: string | null;
|
|
14
|
+
tenantId: string | null;
|
|
15
|
+
description: string | null;
|
|
17
16
|
enabled: boolean;
|
|
17
|
+
prompt: string | null;
|
|
18
18
|
config: {
|
|
19
19
|
type: "web_client";
|
|
20
20
|
webClient: {
|
|
@@ -53,16 +53,16 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
53
53
|
};
|
|
54
54
|
}>;
|
|
55
55
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
56
|
-
id: string;
|
|
57
|
-
name: string;
|
|
58
|
-
description: string | null;
|
|
59
|
-
tenantId: string | null;
|
|
60
|
-
projectId: string | null;
|
|
61
|
-
prompt: string | null;
|
|
62
56
|
type: AppType;
|
|
57
|
+
id: string;
|
|
63
58
|
createdAt: string;
|
|
59
|
+
name: string;
|
|
64
60
|
updatedAt: string;
|
|
61
|
+
projectId: string | null;
|
|
62
|
+
tenantId: string | null;
|
|
63
|
+
description: string | null;
|
|
65
64
|
enabled: boolean;
|
|
65
|
+
prompt: string | null;
|
|
66
66
|
config: {
|
|
67
67
|
type: "web_client";
|
|
68
68
|
webClient: {
|