@inkeep/agents-core 0.58.9 → 0.58.12
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 +85 -85
- package/dist/auth/auth-validation-schemas.d.ts +152 -152
- package/dist/auth/auth.d.ts +9 -9
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +4 -4
- package/dist/client-exports.js +2 -2
- package/dist/data-access/manage/agents.d.ts +40 -40
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/credentialReferences.d.ts +2 -2
- package/dist/data-access/manage/credentialReferences.js +46 -18
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +18 -18
- package/dist/data-access/manage/skills.d.ts +14 -14
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +24 -24
- package/dist/data-access/manage/tools.d.ts +28 -27
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +8 -8
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/db/manage/manage-schema.d.ts +453 -453
- package/dist/db/runtime/runtime-schema.d.ts +326 -326
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/extend-schemas.d.ts +5 -1
- package/dist/validation/schemas.d.ts +2408 -3219
- package/dist/validation/schemas.js +41 -10
- package/package.json +3 -3
|
@@ -93,8 +93,8 @@ declare const countCredentialReferences: (db: AgentsManageDatabaseClient) => (pa
|
|
|
93
93
|
}) => Promise<number>;
|
|
94
94
|
/**
|
|
95
95
|
* Upsert a credential reference (create if it doesn't exist, update if it does).
|
|
96
|
-
* For user-scoped credentials (toolId + userId set),
|
|
97
|
-
*
|
|
96
|
+
* For user-scoped credentials (toolId + userId set), also checks the unique constraint pair.
|
|
97
|
+
* Uses application-level find-then-update since Doltgres does not support ON CONFLICT DO UPDATE.
|
|
98
98
|
*/
|
|
99
99
|
declare const upsertCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
100
100
|
data: CredentialReferenceInsert;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { credentialReferences, externalAgents, tools } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { isUniqueConstraintError } from "../../utils/error.js";
|
|
2
3
|
import { and, count, desc, eq, sql } from "drizzle-orm";
|
|
3
4
|
|
|
4
5
|
//#region src/data-access/manage/credentialReferences.ts
|
|
@@ -120,15 +121,14 @@ const countCredentialReferences = (db) => async (params) => {
|
|
|
120
121
|
};
|
|
121
122
|
/**
|
|
122
123
|
* Upsert a credential reference (create if it doesn't exist, update if it does).
|
|
123
|
-
* For user-scoped credentials (toolId + userId set),
|
|
124
|
-
*
|
|
124
|
+
* For user-scoped credentials (toolId + userId set), also checks the unique constraint pair.
|
|
125
|
+
* Uses application-level find-then-update since Doltgres does not support ON CONFLICT DO UPDATE.
|
|
125
126
|
*/
|
|
126
127
|
const upsertCredentialReference = (db) => async (params) => {
|
|
127
128
|
const scopes = {
|
|
128
129
|
tenantId: params.data.tenantId,
|
|
129
130
|
projectId: params.data.projectId
|
|
130
131
|
};
|
|
131
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
132
132
|
const existingById = await getCredentialReference(db)({
|
|
133
133
|
scopes,
|
|
134
134
|
id: params.data.id
|
|
@@ -148,23 +148,51 @@ const upsertCredentialReference = (db) => async (params) => {
|
|
|
148
148
|
return updated;
|
|
149
149
|
}
|
|
150
150
|
if (params.data.toolId && params.data.userId) {
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
151
|
+
const existingByToolUser = await getUserScopedCredentialReference(db)({
|
|
152
|
+
scopes,
|
|
153
|
+
toolId: params.data.toolId,
|
|
154
|
+
userId: params.data.userId
|
|
155
|
+
});
|
|
156
|
+
if (existingByToolUser) {
|
|
157
|
+
const updated = await updateCredentialReference(db)({
|
|
158
|
+
scopes,
|
|
159
|
+
id: existingByToolUser.id,
|
|
160
|
+
data: {
|
|
161
|
+
name: params.data.name,
|
|
162
|
+
type: params.data.type,
|
|
163
|
+
credentialStoreId: params.data.credentialStoreId,
|
|
164
|
+
retrievalParams: params.data.retrievalParams
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
if (!updated) throw new Error("Failed to update credential reference - no rows affected");
|
|
168
|
+
return updated;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
return await createCredentialReference(db)(params.data);
|
|
173
|
+
} catch (error) {
|
|
174
|
+
if (isUniqueConstraintError(error) && params.data.toolId && params.data.userId) {
|
|
175
|
+
const raceWinner = await getUserScopedCredentialReference(db)({
|
|
176
|
+
scopes,
|
|
177
|
+
toolId: params.data.toolId,
|
|
178
|
+
userId: params.data.userId
|
|
179
|
+
});
|
|
180
|
+
if (raceWinner) {
|
|
181
|
+
const updated = await updateCredentialReference(db)({
|
|
182
|
+
scopes,
|
|
183
|
+
id: raceWinner.id,
|
|
184
|
+
data: {
|
|
185
|
+
name: params.data.name,
|
|
186
|
+
type: params.data.type,
|
|
187
|
+
credentialStoreId: params.data.credentialStoreId,
|
|
188
|
+
retrievalParams: params.data.retrievalParams
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
if (updated) return updated;
|
|
163
192
|
}
|
|
164
|
-
}
|
|
165
|
-
|
|
193
|
+
}
|
|
194
|
+
throw error;
|
|
166
195
|
}
|
|
167
|
-
return await createCredentialReference(db)(params.data);
|
|
168
196
|
};
|
|
169
197
|
|
|
170
198
|
//#endregion
|
|
@@ -66,10 +66,10 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
66
66
|
dataComponentId: string;
|
|
67
67
|
}) => Promise<{
|
|
68
68
|
id: string;
|
|
69
|
-
createdAt: string;
|
|
70
|
-
agentId: string;
|
|
71
|
-
projectId: string;
|
|
72
69
|
tenantId: string;
|
|
70
|
+
projectId: string;
|
|
71
|
+
agentId: string;
|
|
72
|
+
createdAt: string;
|
|
73
73
|
subAgentId: string;
|
|
74
74
|
dataComponentId: string;
|
|
75
75
|
}>;
|
|
@@ -108,10 +108,10 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
108
108
|
dataComponentId: string;
|
|
109
109
|
}) => Promise<{
|
|
110
110
|
id: string;
|
|
111
|
-
createdAt: string;
|
|
112
|
-
agentId: string;
|
|
113
|
-
projectId: string;
|
|
114
111
|
tenantId: string;
|
|
112
|
+
projectId: string;
|
|
113
|
+
agentId: string;
|
|
114
|
+
createdAt: string;
|
|
115
115
|
subAgentId: string;
|
|
116
116
|
dataComponentId: string;
|
|
117
117
|
} | null>;
|
|
@@ -55,12 +55,12 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
55
55
|
}) => Promise<{
|
|
56
56
|
id: string;
|
|
57
57
|
name: string;
|
|
58
|
-
createdAt: string;
|
|
59
|
-
updatedAt: string;
|
|
60
58
|
description: string | null;
|
|
61
|
-
agentId: string;
|
|
62
|
-
projectId: string;
|
|
63
59
|
tenantId: string;
|
|
60
|
+
projectId: string;
|
|
61
|
+
agentId: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -97,12 +97,12 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
97
97
|
}) => Promise<{
|
|
98
98
|
id: string;
|
|
99
99
|
name: string;
|
|
100
|
-
createdAt: string;
|
|
101
|
-
updatedAt: string;
|
|
102
100
|
description: string | null;
|
|
103
|
-
agentId: string;
|
|
104
|
-
projectId: string;
|
|
105
101
|
tenantId: string;
|
|
102
|
+
projectId: string;
|
|
103
|
+
agentId: string;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
updatedAt: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -162,16 +162,16 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
162
162
|
}> | null;
|
|
163
163
|
}) => Promise<{
|
|
164
164
|
id: string;
|
|
165
|
+
tenantId: string;
|
|
166
|
+
projectId: string;
|
|
167
|
+
agentId: string;
|
|
165
168
|
createdAt: string;
|
|
166
169
|
updatedAt: string;
|
|
167
|
-
agentId: string;
|
|
168
|
-
projectId: string;
|
|
169
|
-
tenantId: string;
|
|
170
|
-
subAgentId: string;
|
|
171
|
-
functionToolId: string;
|
|
172
170
|
toolPolicies: Record<string, {
|
|
173
171
|
needsApproval?: boolean;
|
|
174
172
|
}> | null;
|
|
173
|
+
subAgentId: string;
|
|
174
|
+
functionToolId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -227,16 +227,16 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
227
227
|
}> | null;
|
|
228
228
|
}) => Promise<{
|
|
229
229
|
id: string;
|
|
230
|
+
tenantId: string;
|
|
231
|
+
projectId: string;
|
|
232
|
+
agentId: string;
|
|
230
233
|
createdAt: string;
|
|
231
234
|
updatedAt: string;
|
|
232
|
-
agentId: string;
|
|
233
|
-
projectId: string;
|
|
234
|
-
tenantId: string;
|
|
235
|
-
subAgentId: string;
|
|
236
|
-
functionToolId: string;
|
|
237
235
|
toolPolicies: Record<string, {
|
|
238
236
|
needsApproval?: boolean;
|
|
239
237
|
}> | null;
|
|
238
|
+
subAgentId: string;
|
|
239
|
+
functionToolId: string;
|
|
240
240
|
}>;
|
|
241
241
|
//#endregion
|
|
242
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -10,12 +10,12 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
projectId: string;
|
|
13
16
|
createdAt: string;
|
|
14
17
|
updatedAt: string;
|
|
15
18
|
metadata: Record<string, string> | null;
|
|
16
|
-
description: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
19
|
content: string;
|
|
20
20
|
} | null>;
|
|
21
21
|
declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -43,23 +43,23 @@ declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
43
43
|
declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
tenantId: string;
|
|
48
|
+
projectId: string;
|
|
46
49
|
createdAt: string;
|
|
47
50
|
updatedAt: string;
|
|
48
51
|
metadata: Record<string, string> | null;
|
|
49
|
-
description: string;
|
|
50
|
-
projectId: string;
|
|
51
|
-
tenantId: string;
|
|
52
52
|
content: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
55
55
|
id: string;
|
|
56
56
|
name: string;
|
|
57
|
+
description: string;
|
|
58
|
+
tenantId: string;
|
|
59
|
+
projectId: string;
|
|
57
60
|
createdAt: string;
|
|
58
61
|
updatedAt: string;
|
|
59
62
|
metadata: Record<string, string> | null;
|
|
60
|
-
description: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
tenantId: string;
|
|
63
63
|
content: string;
|
|
64
64
|
}>;
|
|
65
65
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -92,15 +92,15 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
92
92
|
alwaysLoaded?: boolean;
|
|
93
93
|
}) => Promise<{
|
|
94
94
|
id: string;
|
|
95
|
+
tenantId: string;
|
|
96
|
+
projectId: string;
|
|
97
|
+
agentId: string;
|
|
95
98
|
createdAt: string;
|
|
96
99
|
updatedAt: string;
|
|
97
|
-
agentId: string;
|
|
98
|
-
projectId: string;
|
|
99
|
-
tenantId: string;
|
|
100
|
-
subAgentId: string;
|
|
101
|
-
skillId: string;
|
|
102
100
|
index: number;
|
|
103
101
|
alwaysLoaded: boolean;
|
|
102
|
+
subAgentId: string;
|
|
103
|
+
skillId: string;
|
|
104
104
|
}>;
|
|
105
105
|
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
106
106
|
scopes: AgentScopeConfig;
|
|
@@ -10,14 +10,14 @@ 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;
|
|
13
16
|
createdAt: string;
|
|
14
17
|
updatedAt: string;
|
|
15
18
|
headers: Record<string, string> | null;
|
|
16
|
-
agentId: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
|
-
subAgentId: string;
|
|
20
19
|
externalAgentId: string;
|
|
20
|
+
subAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
23
|
scopes: SubAgentScopeConfig;
|
|
@@ -45,27 +45,27 @@ 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;
|
|
48
51
|
createdAt: string;
|
|
49
52
|
updatedAt: string;
|
|
50
53
|
headers: Record<string, string> | null;
|
|
51
|
-
agentId: string;
|
|
52
|
-
projectId: string;
|
|
53
|
-
tenantId: string;
|
|
54
|
-
subAgentId: string;
|
|
55
54
|
externalAgentId: string;
|
|
55
|
+
subAgentId: string;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
60
|
id: string;
|
|
61
|
+
tenantId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
agentId: string;
|
|
61
64
|
createdAt: string;
|
|
62
65
|
updatedAt: string;
|
|
63
66
|
headers: Record<string, string> | null;
|
|
64
|
-
agentId: string;
|
|
65
|
-
projectId: string;
|
|
66
|
-
tenantId: string;
|
|
67
|
-
subAgentId: string;
|
|
68
67
|
externalAgentId: string;
|
|
68
|
+
subAgentId: string;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -181,14 +181,14 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
181
181
|
};
|
|
182
182
|
}) => Promise<{
|
|
183
183
|
id: string;
|
|
184
|
+
tenantId: string;
|
|
185
|
+
projectId: string;
|
|
186
|
+
agentId: string;
|
|
184
187
|
createdAt: string;
|
|
185
188
|
updatedAt: string;
|
|
186
189
|
headers: Record<string, string> | null;
|
|
187
|
-
agentId: string;
|
|
188
|
-
projectId: string;
|
|
189
|
-
tenantId: string;
|
|
190
|
-
subAgentId: string;
|
|
191
190
|
externalAgentId: string;
|
|
191
|
+
subAgentId: string;
|
|
192
192
|
}>;
|
|
193
193
|
/**
|
|
194
194
|
* Check if sub-agent external agent relation exists by params
|
|
@@ -198,14 +198,14 @@ 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;
|
|
201
204
|
createdAt: string;
|
|
202
205
|
updatedAt: string;
|
|
203
206
|
headers: Record<string, string> | null;
|
|
204
|
-
agentId: string;
|
|
205
|
-
projectId: string;
|
|
206
|
-
tenantId: string;
|
|
207
|
-
subAgentId: string;
|
|
208
207
|
externalAgentId: string;
|
|
208
|
+
subAgentId: string;
|
|
209
209
|
} | undefined>;
|
|
210
210
|
/**
|
|
211
211
|
* Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
|
|
@@ -219,14 +219,14 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
219
219
|
};
|
|
220
220
|
}) => Promise<{
|
|
221
221
|
id: string;
|
|
222
|
+
tenantId: string;
|
|
223
|
+
projectId: string;
|
|
224
|
+
agentId: string;
|
|
222
225
|
createdAt: string;
|
|
223
226
|
updatedAt: string;
|
|
224
227
|
headers: Record<string, string> | null;
|
|
225
|
-
agentId: string;
|
|
226
|
-
projectId: string;
|
|
227
|
-
tenantId: string;
|
|
228
|
-
subAgentId: string;
|
|
229
228
|
externalAgentId: string;
|
|
229
|
+
subAgentId: string;
|
|
230
230
|
}>;
|
|
231
231
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
232
232
|
scopes: SubAgentScopeConfig;
|
|
@@ -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;
|
|
13
16
|
createdAt: string;
|
|
14
17
|
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;
|
|
48
51
|
createdAt: string;
|
|
49
52
|
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;
|
|
61
64
|
createdAt: string;
|
|
62
65
|
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;
|
|
130
133
|
createdAt: string;
|
|
131
134
|
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;
|
|
149
152
|
createdAt: string;
|
|
150
153
|
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;
|
|
163
166
|
createdAt: string;
|
|
164
167
|
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,17 +205,17 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
205
205
|
};
|
|
206
206
|
}) => Promise<{
|
|
207
207
|
id: string;
|
|
208
|
+
tenantId: string;
|
|
209
|
+
projectId: string;
|
|
210
|
+
agentId: string;
|
|
208
211
|
createdAt: string;
|
|
209
212
|
updatedAt: string;
|
|
210
|
-
headers: Record<string, string> | null;
|
|
211
|
-
agentId: string;
|
|
212
|
-
projectId: string;
|
|
213
|
-
tenantId: string;
|
|
214
213
|
toolId: string;
|
|
215
|
-
|
|
214
|
+
headers: Record<string, string> | null;
|
|
216
215
|
toolPolicies: Record<string, {
|
|
217
216
|
needsApproval?: boolean;
|
|
218
217
|
}> | null;
|
|
218
|
+
subAgentId: string;
|
|
219
219
|
selectedTools: string[] | null;
|
|
220
220
|
}>;
|
|
221
221
|
declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -249,17 +249,17 @@ 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;
|
|
252
255
|
createdAt: string;
|
|
253
256
|
updatedAt: string;
|
|
254
|
-
headers: Record<string, string> | null;
|
|
255
|
-
agentId: string;
|
|
256
|
-
projectId: string;
|
|
257
|
-
tenantId: string;
|
|
258
257
|
toolId: string;
|
|
259
|
-
|
|
258
|
+
headers: Record<string, string> | null;
|
|
260
259
|
toolPolicies: Record<string, {
|
|
261
260
|
needsApproval?: boolean;
|
|
262
261
|
}> | null;
|
|
262
|
+
subAgentId: string;
|
|
263
263
|
selectedTools: string[] | null;
|
|
264
264
|
} | undefined>;
|
|
265
265
|
declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -10,12 +10,12 @@ 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;
|
|
13
16
|
createdAt: string;
|
|
14
17
|
updatedAt: string;
|
|
15
18
|
headers: Record<string, string> | null;
|
|
16
|
-
agentId: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
19
|
subAgentId: string;
|
|
20
20
|
targetAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
@@ -45,12 +45,12 @@ 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;
|
|
48
51
|
createdAt: string;
|
|
49
52
|
updatedAt: string;
|
|
50
53
|
headers: Record<string, string> | null;
|
|
51
|
-
agentId: string;
|
|
52
|
-
projectId: string;
|
|
53
|
-
tenantId: string;
|
|
54
54
|
subAgentId: string;
|
|
55
55
|
targetAgentId: string;
|
|
56
56
|
}[]>;
|
|
@@ -58,12 +58,12 @@ 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;
|
|
61
64
|
createdAt: string;
|
|
62
65
|
updatedAt: string;
|
|
63
66
|
headers: Record<string, string> | null;
|
|
64
|
-
agentId: string;
|
|
65
|
-
projectId: string;
|
|
66
|
-
tenantId: string;
|
|
67
67
|
subAgentId: string;
|
|
68
68
|
targetAgentId: string;
|
|
69
69
|
}[]>;
|
|
@@ -211,12 +211,12 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
211
211
|
};
|
|
212
212
|
}) => Promise<{
|
|
213
213
|
id: string;
|
|
214
|
+
tenantId: string;
|
|
215
|
+
projectId: string;
|
|
216
|
+
agentId: string;
|
|
214
217
|
createdAt: string;
|
|
215
218
|
updatedAt: string;
|
|
216
219
|
headers: Record<string, string> | null;
|
|
217
|
-
agentId: string;
|
|
218
|
-
projectId: string;
|
|
219
|
-
tenantId: string;
|
|
220
220
|
subAgentId: string;
|
|
221
221
|
targetAgentId: string;
|
|
222
222
|
}>;
|
|
@@ -228,12 +228,12 @@ 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;
|
|
231
234
|
createdAt: string;
|
|
232
235
|
updatedAt: string;
|
|
233
236
|
headers: Record<string, string> | null;
|
|
234
|
-
agentId: string;
|
|
235
|
-
projectId: string;
|
|
236
|
-
tenantId: string;
|
|
237
237
|
subAgentId: string;
|
|
238
238
|
targetAgentId: string;
|
|
239
239
|
} | undefined>;
|
|
@@ -249,12 +249,12 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
249
249
|
};
|
|
250
250
|
}) => Promise<{
|
|
251
251
|
id: string;
|
|
252
|
+
tenantId: string;
|
|
253
|
+
projectId: string;
|
|
254
|
+
agentId: string;
|
|
252
255
|
createdAt: string;
|
|
253
256
|
updatedAt: string;
|
|
254
257
|
headers: Record<string, string> | null;
|
|
255
|
-
agentId: string;
|
|
256
|
-
projectId: string;
|
|
257
|
-
tenantId: string;
|
|
258
258
|
subAgentId: string;
|
|
259
259
|
targetAgentId: string;
|
|
260
260
|
}>;
|