@inkeep/agents-core 0.42.0 → 0.44.0
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.d.ts +28 -26
- package/dist/auth/auth.js +21 -16
- package/dist/auth/authz/client.d.ts +8 -3
- package/dist/auth/authz/client.js +23 -17
- package/dist/auth/authz/config.d.ts +50 -29
- package/dist/auth/authz/config.js +42 -33
- package/dist/auth/authz/index.d.ts +3 -3
- package/dist/auth/authz/index.js +3 -3
- package/dist/auth/authz/permissions.d.ts +0 -4
- package/dist/auth/authz/permissions.js +9 -13
- package/dist/auth/authz/sync.d.ts +23 -2
- package/dist/auth/authz/sync.js +127 -53
- package/dist/auth/init.d.ts +1 -0
- package/dist/auth/init.js +115 -0
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +3 -6
- package/dist/client-exports.js +4 -7
- package/dist/constants/execution-limits-shared/defaults.d.ts +1 -1
- package/dist/constants/execution-limits-shared/defaults.js +1 -1
- package/dist/constants/execution-limits-shared/index.d.ts +1 -1
- package/dist/constants/otel-attributes.d.ts +5 -0
- package/dist/constants/otel-attributes.js +8 -3
- package/dist/constants/signoz-queries.d.ts +1 -0
- package/dist/constants/signoz-queries.js +2 -1
- package/dist/context/TemplateEngine.d.ts +0 -6
- package/dist/context/TemplateEngine.js +4 -18
- package/dist/credential-stores/keychain-store.d.ts +20 -8
- package/dist/credential-stores/keychain-store.js +107 -43
- package/dist/data-access/index.d.ts +5 -4
- package/dist/data-access/index.js +5 -4
- package/dist/data-access/manage/agentFull.js +70 -25
- package/dist/data-access/manage/agents.d.ts +41 -41
- package/dist/data-access/manage/agents.js +29 -21
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/artifactComponents.js +1 -1
- 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/dataComponents.js +1 -1
- package/dist/data-access/manage/functionTools.d.ts +44 -21
- package/dist/data-access/manage/functionTools.js +34 -22
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +26 -26
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +39 -28
- package/dist/data-access/manage/tools.js +73 -31
- package/dist/data-access/manage/triggers.d.ts +27 -1
- package/dist/data-access/runtime/apiKeys.d.ts +20 -20
- package/dist/data-access/runtime/cascade-delete.d.ts +48 -1
- package/dist/data-access/runtime/cascade-delete.js +52 -2
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/github-work-app-installations.d.ts +261 -0
- package/dist/data-access/runtime/github-work-app-installations.js +457 -0
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/organizations.d.ts +2 -2
- package/dist/data-access/runtime/organizations.js +4 -4
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/db/manage/manage-schema.d.ts +533 -402
- package/dist/db/manage/manage-schema.js +38 -27
- package/dist/db/runtime/runtime-schema.d.ts +1021 -177
- package/dist/db/runtime/runtime-schema.js +173 -5
- package/dist/db/utils.d.ts +6 -0
- package/dist/db/utils.js +42 -0
- package/dist/dolt/branch.js +1 -1
- package/dist/dolt/branches-api.js +1 -1
- package/dist/dolt/index.d.ts +2 -2
- package/dist/dolt/index.js +4 -4
- package/dist/dolt/migrate-all-branches.js +6 -1
- package/dist/dolt/migrate-dolt.js +4 -1
- package/dist/dolt/ref-helpers.js +1 -1
- package/dist/dolt/ref-middleware.js +1 -1
- package/dist/dolt/ref-scope.js +1 -1
- package/dist/dolt/schema-sync.d.ts +2 -1
- package/dist/dolt/schema-sync.js +10 -1
- package/dist/env.d.ts +6 -4
- package/dist/env.js +11 -10
- package/dist/index.d.ts +15 -16
- package/dist/index.js +23 -24
- package/dist/types/@napi-rs__keyring/index.d.ts +14 -0
- package/dist/types/entities.d.ts +9 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/utility.d.ts +17 -3
- package/dist/types/utility.js +2 -1
- package/dist/utils/JsonTransformer.d.ts +1 -3
- package/dist/utils/JsonTransformer.js +14 -23
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/dist/utils/jmespath-utils.d.ts +152 -0
- package/dist/utils/jmespath-utils.js +213 -0
- package/dist/utils/mcp-client.d.ts +1 -1
- package/dist/utils/mcp-client.js +1 -1
- package/dist/utils/signature-validation.d.ts +2 -0
- package/dist/utils/signature-validation.js +3 -0
- package/dist/utils/third-party-mcp-servers/composio-client.d.ts +13 -1
- package/dist/utils/third-party-mcp-servers/composio-client.js +24 -6
- package/dist/utils/third-party-mcp-servers/index.d.ts +2 -2
- package/dist/utils/third-party-mcp-servers/index.js +2 -2
- package/dist/utils/trigger-auth.d.ts +31 -8
- package/dist/utils/trigger-auth.js +121 -13
- package/dist/validation/agentFull.js +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +4 -23
- package/dist/validation/drizzle-schema-helpers.js +3 -30
- package/dist/validation/index.d.ts +3 -5
- package/dist/validation/index.js +5 -7
- package/dist/validation/render-validation.js +19 -0
- package/dist/validation/schemas.d.ts +3675 -1665
- package/dist/validation/schemas.js +409 -94
- package/dist/validation/stream-event-schemas.d.ts +96 -1
- package/dist/validation/stream-event-schemas.js +67 -2
- package/drizzle/manage/0003_tiny_captain_universe.sql +8 -0
- package/drizzle/manage/0004_curious_phil_sheldon.sql +2 -0
- package/drizzle/manage/0005_silent_shatterstar.sql +53 -0
- package/drizzle/manage/0006_fixed_umar.sql +1 -0
- package/drizzle/manage/meta/0003_snapshot.json +3134 -0
- package/drizzle/manage/meta/0004_snapshot.json +3141 -0
- package/drizzle/manage/meta/0005_snapshot.json +3141 -0
- package/drizzle/manage/meta/0006_snapshot.json +3148 -0
- package/drizzle/manage/meta/_journal.json +28 -0
- package/drizzle/runtime/0010_previous_black_knight.sql +84 -0
- package/drizzle/runtime/meta/0010_snapshot.json +3066 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +12 -5
- package/spicedb/schema.zed +114 -0
- package/dist/validation/id-validation.d.ts +0 -24
- package/dist/validation/id-validation.js +0 -52
|
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
53
53
|
data: FunctionToolApiInsert;
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
|
-
tenantId: string;
|
|
57
|
-
projectId: string;
|
|
58
56
|
id: string;
|
|
59
57
|
name: string;
|
|
60
|
-
description: string | null;
|
|
61
|
-
agentId: string;
|
|
62
58
|
createdAt: string;
|
|
63
59
|
updatedAt: string;
|
|
60
|
+
description: string | null;
|
|
61
|
+
agentId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
tenantId: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
95
95
|
data: FunctionToolApiInsert;
|
|
96
96
|
scopes: AgentScopeConfig;
|
|
97
97
|
}) => Promise<{
|
|
98
|
-
tenantId: string;
|
|
99
|
-
projectId: string;
|
|
100
98
|
id: string;
|
|
101
99
|
name: string;
|
|
102
|
-
description: string | null;
|
|
103
|
-
agentId: string;
|
|
104
100
|
createdAt: string;
|
|
105
101
|
updatedAt: string;
|
|
102
|
+
description: string | null;
|
|
103
|
+
agentId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
tenantId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -112,17 +112,22 @@ declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
112
112
|
agentId: string;
|
|
113
113
|
};
|
|
114
114
|
subAgentId: string;
|
|
115
|
+
pagination?: PaginationConfig;
|
|
115
116
|
}) => Promise<{
|
|
116
117
|
data: {
|
|
117
|
-
|
|
118
|
-
updatedAt: string;
|
|
118
|
+
id: string;
|
|
119
119
|
name: string;
|
|
120
120
|
description: string | null;
|
|
121
121
|
functionId: string;
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
createdAt: string;
|
|
123
|
+
updatedAt: string;
|
|
124
124
|
tenantId: string;
|
|
125
|
-
|
|
125
|
+
projectId: string;
|
|
126
|
+
agentId: string;
|
|
127
|
+
relationshipId: string;
|
|
128
|
+
toolPolicies: Record<string, {
|
|
129
|
+
needsApproval?: boolean;
|
|
130
|
+
}> | null;
|
|
126
131
|
}[];
|
|
127
132
|
pagination: {
|
|
128
133
|
page: number;
|
|
@@ -138,6 +143,9 @@ declare const upsertSubAgentFunctionToolRelation: (db: AgentsManageDatabaseClien
|
|
|
138
143
|
scopes: AgentScopeConfig;
|
|
139
144
|
subAgentId: string;
|
|
140
145
|
functionToolId: string;
|
|
146
|
+
toolPolicies?: Record<string, {
|
|
147
|
+
needsApproval?: boolean;
|
|
148
|
+
}> | null;
|
|
141
149
|
relationId?: string;
|
|
142
150
|
}) => Promise<{
|
|
143
151
|
id: string;
|
|
@@ -149,15 +157,21 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
149
157
|
scopes: AgentScopeConfig;
|
|
150
158
|
subAgentId: string;
|
|
151
159
|
functionToolId: string;
|
|
160
|
+
toolPolicies?: Record<string, {
|
|
161
|
+
needsApproval?: boolean;
|
|
162
|
+
}> | null;
|
|
152
163
|
}) => Promise<{
|
|
153
|
-
tenantId: string;
|
|
154
|
-
projectId: string;
|
|
155
164
|
id: string;
|
|
156
|
-
agentId: string;
|
|
157
165
|
createdAt: string;
|
|
158
166
|
updatedAt: string;
|
|
159
|
-
|
|
167
|
+
agentId: string;
|
|
168
|
+
projectId: string;
|
|
169
|
+
tenantId: string;
|
|
160
170
|
functionToolId: string;
|
|
171
|
+
toolPolicies: Record<string, {
|
|
172
|
+
needsApproval?: boolean;
|
|
173
|
+
}> | null;
|
|
174
|
+
subAgentId: string;
|
|
161
175
|
}>;
|
|
162
176
|
/**
|
|
163
177
|
* Update an agent-function tool relation
|
|
@@ -168,6 +182,9 @@ declare const updateSubAgentFunctionToolRelation: (db: AgentsManageDatabaseClien
|
|
|
168
182
|
data: {
|
|
169
183
|
subAgentId: string;
|
|
170
184
|
functionToolId: string;
|
|
185
|
+
toolPolicies?: Record<string, {
|
|
186
|
+
needsApproval?: boolean;
|
|
187
|
+
}> | null;
|
|
171
188
|
};
|
|
172
189
|
}) => Promise<{
|
|
173
190
|
id: string;
|
|
@@ -205,15 +222,21 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
205
222
|
scopes: AgentScopeConfig;
|
|
206
223
|
subAgentId: string;
|
|
207
224
|
functionToolId: string;
|
|
225
|
+
toolPolicies?: Record<string, {
|
|
226
|
+
needsApproval?: boolean;
|
|
227
|
+
}> | null;
|
|
208
228
|
}) => Promise<{
|
|
209
|
-
tenantId: string;
|
|
210
|
-
projectId: string;
|
|
211
229
|
id: string;
|
|
212
|
-
agentId: string;
|
|
213
230
|
createdAt: string;
|
|
214
231
|
updatedAt: string;
|
|
215
|
-
|
|
232
|
+
agentId: string;
|
|
233
|
+
projectId: string;
|
|
234
|
+
tenantId: string;
|
|
216
235
|
functionToolId: string;
|
|
236
|
+
toolPolicies: Record<string, {
|
|
237
|
+
needsApproval?: boolean;
|
|
238
|
+
}> | null;
|
|
239
|
+
subAgentId: string;
|
|
217
240
|
}>;
|
|
218
241
|
//#endregion
|
|
219
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -96,32 +96,41 @@ const upsertFunctionTool = (db) => async (params) => {
|
|
|
96
96
|
};
|
|
97
97
|
const getFunctionToolsForSubAgent = (db) => {
|
|
98
98
|
return async (params) => {
|
|
99
|
-
const
|
|
100
|
-
const
|
|
99
|
+
const page = params.pagination?.page || 1;
|
|
100
|
+
const limit = Math.min(params.pagination?.limit || 1e3, 1e3);
|
|
101
|
+
const offset = (page - 1) * limit;
|
|
102
|
+
const { tenantId, projectId, agentId } = params.scopes;
|
|
101
103
|
try {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
const whereClause = and(eq(subAgentFunctionToolRelations.tenantId, tenantId), eq(subAgentFunctionToolRelations.projectId, projectId), eq(subAgentFunctionToolRelations.agentId, agentId), eq(subAgentFunctionToolRelations.subAgentId, params.subAgentId));
|
|
105
|
+
const [data, totalResult] = await Promise.all([db.select({
|
|
106
|
+
id: functionTools.id,
|
|
107
|
+
name: functionTools.name,
|
|
108
|
+
description: functionTools.description,
|
|
109
|
+
functionId: functionTools.functionId,
|
|
110
|
+
createdAt: functionTools.createdAt,
|
|
111
|
+
updatedAt: functionTools.updatedAt,
|
|
112
|
+
tenantId: functionTools.tenantId,
|
|
113
|
+
projectId: functionTools.projectId,
|
|
114
|
+
agentId: functionTools.agentId,
|
|
115
|
+
relationshipId: subAgentFunctionToolRelations.id,
|
|
116
|
+
toolPolicies: subAgentFunctionToolRelations.toolPolicies
|
|
117
|
+
}).from(subAgentFunctionToolRelations).innerJoin(functionTools, and(eq(subAgentFunctionToolRelations.functionToolId, functionTools.id), eq(subAgentFunctionToolRelations.tenantId, functionTools.tenantId), eq(subAgentFunctionToolRelations.projectId, functionTools.projectId), eq(subAgentFunctionToolRelations.agentId, functionTools.agentId))).where(whereClause).limit(limit).offset(offset).orderBy(desc(subAgentFunctionToolRelations.createdAt)), db.select({ count: count() }).from(subAgentFunctionToolRelations).where(whereClause)]);
|
|
118
|
+
const total = totalResult[0]?.count || 0;
|
|
119
|
+
return {
|
|
120
|
+
data,
|
|
108
121
|
pagination: {
|
|
109
|
-
page
|
|
110
|
-
limit
|
|
122
|
+
page,
|
|
123
|
+
limit,
|
|
124
|
+
total,
|
|
125
|
+
pages: Math.ceil(total / limit)
|
|
111
126
|
}
|
|
112
|
-
});
|
|
113
|
-
const relations$1 = await db.select().from(subAgentFunctionToolRelations).where(and(eq(subAgentFunctionToolRelations.tenantId, tenantId), eq(subAgentFunctionToolRelations.projectId, projectId), eq(subAgentFunctionToolRelations.agentId, agentId), eq(subAgentFunctionToolRelations.subAgentId, subAgentId)));
|
|
114
|
-
const relatedFunctionToolIds = new Set(relations$1.map((r) => r.functionToolId));
|
|
115
|
-
return {
|
|
116
|
-
data: functionToolsList.data.filter((ft) => relatedFunctionToolIds.has(ft.id)),
|
|
117
|
-
pagination: functionToolsList.pagination
|
|
118
127
|
};
|
|
119
128
|
} catch (error) {
|
|
120
129
|
logger.error({
|
|
121
130
|
tenantId,
|
|
122
131
|
projectId,
|
|
123
132
|
agentId,
|
|
124
|
-
subAgentId,
|
|
133
|
+
subAgentId: params.subAgentId,
|
|
125
134
|
error
|
|
126
135
|
}, "Failed to get function tools for agent");
|
|
127
136
|
throw error;
|
|
@@ -132,14 +141,15 @@ const getFunctionToolsForSubAgent = (db) => {
|
|
|
132
141
|
* Upsert a sub_agent-function tool relation (create if it doesn't exist, update if it does)
|
|
133
142
|
*/
|
|
134
143
|
const upsertSubAgentFunctionToolRelation = (db) => async (params) => {
|
|
135
|
-
const { scopes, subAgentId, functionToolId, relationId } = params;
|
|
144
|
+
const { scopes, subAgentId, functionToolId, toolPolicies, relationId } = params;
|
|
136
145
|
const { tenantId, projectId, agentId } = scopes;
|
|
137
146
|
if (relationId) return await updateSubAgentFunctionToolRelation(db)({
|
|
138
147
|
scopes,
|
|
139
148
|
relationId,
|
|
140
149
|
data: {
|
|
141
150
|
subAgentId,
|
|
142
|
-
functionToolId
|
|
151
|
+
functionToolId,
|
|
152
|
+
...toolPolicies !== void 0 ? { toolPolicies } : {}
|
|
143
153
|
}
|
|
144
154
|
});
|
|
145
155
|
try {
|
|
@@ -173,7 +183,7 @@ const upsertSubAgentFunctionToolRelation = (db) => async (params) => {
|
|
|
173
183
|
*/
|
|
174
184
|
const addFunctionToolToSubAgent = (db) => {
|
|
175
185
|
return async (params) => {
|
|
176
|
-
const { scopes, subAgentId, functionToolId } = params;
|
|
186
|
+
const { scopes, subAgentId, functionToolId, toolPolicies } = params;
|
|
177
187
|
const { tenantId, projectId, agentId } = scopes;
|
|
178
188
|
try {
|
|
179
189
|
const relationId = generateId();
|
|
@@ -183,7 +193,8 @@ const addFunctionToolToSubAgent = (db) => {
|
|
|
183
193
|
projectId,
|
|
184
194
|
agentId,
|
|
185
195
|
subAgentId,
|
|
186
|
-
functionToolId
|
|
196
|
+
functionToolId,
|
|
197
|
+
...toolPolicies !== void 0 ? { toolPolicies } : {}
|
|
187
198
|
}).returning();
|
|
188
199
|
logger.info({
|
|
189
200
|
tenantId,
|
|
@@ -217,7 +228,8 @@ const updateSubAgentFunctionToolRelation = (db) => {
|
|
|
217
228
|
try {
|
|
218
229
|
await db.update(subAgentFunctionToolRelations).set({
|
|
219
230
|
subAgentId: data.subAgentId,
|
|
220
|
-
functionToolId: data.functionToolId
|
|
231
|
+
functionToolId: data.functionToolId,
|
|
232
|
+
...data.toolPolicies !== void 0 ? { toolPolicies: data.toolPolicies } : {}
|
|
221
233
|
}).where(and(eq(subAgentFunctionToolRelations.id, relationId), eq(subAgentFunctionToolRelations.tenantId, tenantId), eq(subAgentFunctionToolRelations.projectId, projectId), eq(subAgentFunctionToolRelations.agentId, agentId)));
|
|
222
234
|
logger.info({
|
|
223
235
|
tenantId,
|
|
@@ -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;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headers: Record<string, string> | null;
|
|
18
|
-
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
19
18
|
subAgentId: string;
|
|
19
|
+
externalAgentId: 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;
|
|
48
46
|
id: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
52
49
|
headers: Record<string, string> | null;
|
|
53
|
-
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
54
53
|
subAgentId: string;
|
|
54
|
+
externalAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
|
-
tenantId: string;
|
|
60
|
-
projectId: string;
|
|
61
59
|
id: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
65
62
|
headers: Record<string, string> | null;
|
|
66
|
-
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
67
66
|
subAgentId: string;
|
|
67
|
+
externalAgentId: 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;
|
|
184
182
|
id: string;
|
|
185
|
-
agentId: string;
|
|
186
183
|
createdAt: string;
|
|
187
184
|
updatedAt: string;
|
|
188
185
|
headers: Record<string, string> | null;
|
|
189
|
-
|
|
186
|
+
agentId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
tenantId: string;
|
|
190
189
|
subAgentId: string;
|
|
190
|
+
externalAgentId: 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;
|
|
201
199
|
id: string;
|
|
202
|
-
agentId: string;
|
|
203
200
|
createdAt: string;
|
|
204
201
|
updatedAt: string;
|
|
205
202
|
headers: Record<string, string> | null;
|
|
206
|
-
|
|
203
|
+
agentId: string;
|
|
204
|
+
projectId: string;
|
|
205
|
+
tenantId: string;
|
|
207
206
|
subAgentId: string;
|
|
207
|
+
externalAgentId: 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;
|
|
222
220
|
id: string;
|
|
223
|
-
agentId: string;
|
|
224
221
|
createdAt: string;
|
|
225
222
|
updatedAt: string;
|
|
226
223
|
headers: Record<string, string> | null;
|
|
227
|
-
|
|
224
|
+
agentId: string;
|
|
225
|
+
projectId: string;
|
|
226
|
+
tenantId: string;
|
|
228
227
|
subAgentId: string;
|
|
228
|
+
externalAgentId: string;
|
|
229
229
|
}>;
|
|
230
230
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
231
231
|
scopes: SubAgentScopeConfig;
|
|
@@ -8,12 +8,12 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
8
8
|
scopes: AgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
14
|
+
agentId: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
17
|
sourceSubAgentId: string;
|
|
18
18
|
targetSubAgentId: string | null;
|
|
19
19
|
relationType: string | null;
|
|
@@ -43,12 +43,12 @@ 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;
|
|
48
46
|
id: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
49
|
+
agentId: string;
|
|
50
|
+
projectId: string;
|
|
51
|
+
tenantId: string;
|
|
52
52
|
sourceSubAgentId: string;
|
|
53
53
|
targetSubAgentId: string | null;
|
|
54
54
|
relationType: string | null;
|
|
@@ -56,12 +56,12 @@ 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;
|
|
61
59
|
id: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
62
|
+
agentId: string;
|
|
63
|
+
projectId: string;
|
|
64
|
+
tenantId: string;
|
|
65
65
|
sourceSubAgentId: string;
|
|
66
66
|
targetSubAgentId: string | null;
|
|
67
67
|
relationType: string | null;
|
|
@@ -125,12 +125,12 @@ 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;
|
|
130
128
|
id: string;
|
|
131
|
-
agentId: string;
|
|
132
129
|
createdAt: string;
|
|
133
130
|
updatedAt: string;
|
|
131
|
+
agentId: string;
|
|
132
|
+
projectId: string;
|
|
133
|
+
tenantId: string;
|
|
134
134
|
sourceSubAgentId: string;
|
|
135
135
|
targetSubAgentId: string | null;
|
|
136
136
|
relationType: string | null;
|
|
@@ -144,12 +144,12 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
144
144
|
targetSubAgentId?: string;
|
|
145
145
|
relationType: string;
|
|
146
146
|
}) => Promise<{
|
|
147
|
-
tenantId: string;
|
|
148
|
-
projectId: string;
|
|
149
147
|
id: string;
|
|
150
|
-
agentId: string;
|
|
151
148
|
createdAt: string;
|
|
152
149
|
updatedAt: string;
|
|
150
|
+
agentId: string;
|
|
151
|
+
projectId: string;
|
|
152
|
+
tenantId: string;
|
|
153
153
|
sourceSubAgentId: string;
|
|
154
154
|
targetSubAgentId: string | null;
|
|
155
155
|
relationType: string | null;
|
|
@@ -158,12 +158,12 @@ 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;
|
|
163
161
|
id: string;
|
|
164
|
-
agentId: string;
|
|
165
162
|
createdAt: string;
|
|
166
163
|
updatedAt: string;
|
|
164
|
+
agentId: string;
|
|
165
|
+
projectId: string;
|
|
166
|
+
tenantId: string;
|
|
167
167
|
sourceSubAgentId: string;
|
|
168
168
|
targetSubAgentId: string | null;
|
|
169
169
|
relationType: string | null;
|
|
@@ -203,18 +203,18 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
203
203
|
}> | null;
|
|
204
204
|
};
|
|
205
205
|
}) => Promise<{
|
|
206
|
-
tenantId: string;
|
|
207
|
-
projectId: string;
|
|
208
206
|
id: string;
|
|
209
|
-
agentId: string;
|
|
210
207
|
createdAt: string;
|
|
211
208
|
updatedAt: string;
|
|
212
|
-
toolId: string;
|
|
213
209
|
headers: Record<string, string> | null;
|
|
210
|
+
agentId: string;
|
|
211
|
+
projectId: string;
|
|
212
|
+
tenantId: string;
|
|
214
213
|
toolPolicies: Record<string, {
|
|
215
214
|
needsApproval?: boolean;
|
|
216
215
|
}> | null;
|
|
217
216
|
subAgentId: string;
|
|
217
|
+
toolId: string;
|
|
218
218
|
selectedTools: string[] | null;
|
|
219
219
|
}>;
|
|
220
220
|
declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -247,18 +247,18 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
247
247
|
scopes: SubAgentScopeConfig;
|
|
248
248
|
relationId: string;
|
|
249
249
|
}) => Promise<{
|
|
250
|
-
tenantId: string;
|
|
251
|
-
projectId: string;
|
|
252
250
|
id: string;
|
|
253
|
-
agentId: string;
|
|
254
251
|
createdAt: string;
|
|
255
252
|
updatedAt: string;
|
|
256
|
-
toolId: string;
|
|
257
253
|
headers: Record<string, string> | null;
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
258
257
|
toolPolicies: Record<string, {
|
|
259
258
|
needsApproval?: boolean;
|
|
260
259
|
}> | null;
|
|
261
260
|
subAgentId: string;
|
|
261
|
+
toolId: string;
|
|
262
262
|
selectedTools: string[] | null;
|
|
263
263
|
} | undefined>;
|
|
264
264
|
declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -8,13 +8,13 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
8
8
|
scopes: SubAgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headers: Record<string, string> | null;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
subAgentId: string;
|
|
19
19
|
targetAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
@@ -43,26 +43,26 @@ 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;
|
|
48
46
|
id: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
52
49
|
headers: Record<string, string> | null;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
subAgentId: 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;
|
|
61
59
|
id: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
65
62
|
headers: Record<string, string> | null;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
subAgentId: string;
|
|
67
67
|
targetAgentId: string;
|
|
68
68
|
}[]>;
|
|
@@ -209,13 +209,13 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
209
209
|
headers?: Record<string, string> | null;
|
|
210
210
|
};
|
|
211
211
|
}) => Promise<{
|
|
212
|
-
tenantId: string;
|
|
213
|
-
projectId: string;
|
|
214
212
|
id: string;
|
|
215
|
-
agentId: string;
|
|
216
213
|
createdAt: string;
|
|
217
214
|
updatedAt: string;
|
|
218
215
|
headers: Record<string, string> | null;
|
|
216
|
+
agentId: string;
|
|
217
|
+
projectId: string;
|
|
218
|
+
tenantId: string;
|
|
219
219
|
subAgentId: string;
|
|
220
220
|
targetAgentId: string;
|
|
221
221
|
}>;
|
|
@@ -226,13 +226,13 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
226
226
|
scopes: SubAgentScopeConfig;
|
|
227
227
|
targetAgentId: string;
|
|
228
228
|
}) => Promise<{
|
|
229
|
-
tenantId: string;
|
|
230
|
-
projectId: string;
|
|
231
229
|
id: string;
|
|
232
|
-
agentId: string;
|
|
233
230
|
createdAt: string;
|
|
234
231
|
updatedAt: string;
|
|
235
232
|
headers: Record<string, string> | null;
|
|
233
|
+
agentId: string;
|
|
234
|
+
projectId: string;
|
|
235
|
+
tenantId: string;
|
|
236
236
|
subAgentId: string;
|
|
237
237
|
targetAgentId: string;
|
|
238
238
|
} | undefined>;
|
|
@@ -247,13 +247,13 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
247
247
|
headers?: Record<string, string> | null;
|
|
248
248
|
};
|
|
249
249
|
}) => Promise<{
|
|
250
|
-
tenantId: string;
|
|
251
|
-
projectId: string;
|
|
252
250
|
id: string;
|
|
253
|
-
agentId: string;
|
|
254
251
|
createdAt: string;
|
|
255
252
|
updatedAt: string;
|
|
256
253
|
headers: Record<string, string> | null;
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
257
257
|
subAgentId: string;
|
|
258
258
|
targetAgentId: string;
|
|
259
259
|
}>;
|
|
@@ -8,15 +8,14 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
8
8
|
scopes: AgentScopeConfig;
|
|
9
9
|
subAgentId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
12
|
name: string;
|
|
15
|
-
description: string | null;
|
|
16
|
-
prompt: string | null;
|
|
17
|
-
agentId: string;
|
|
18
13
|
createdAt: string;
|
|
19
14
|
updatedAt: string;
|
|
15
|
+
description: string | null;
|
|
16
|
+
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
20
19
|
models: {
|
|
21
20
|
base?: {
|
|
22
21
|
model?: string | undefined;
|
|
@@ -31,6 +30,7 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
31
30
|
providerOptions?: Record<string, any> | undefined;
|
|
32
31
|
} | undefined;
|
|
33
32
|
} | null;
|
|
33
|
+
prompt: string | null;
|
|
34
34
|
stopWhen: {
|
|
35
35
|
stepCountIs?: number | undefined;
|
|
36
36
|
} | null;
|
|
@@ -39,15 +39,14 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
39
39
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
40
40
|
scopes: AgentScopeConfig;
|
|
41
41
|
}) => Promise<{
|
|
42
|
-
tenantId: string;
|
|
43
|
-
projectId: string;
|
|
44
42
|
id: string;
|
|
45
43
|
name: string;
|
|
46
|
-
description: string | null;
|
|
47
|
-
prompt: string | null;
|
|
48
|
-
agentId: string;
|
|
49
44
|
createdAt: string;
|
|
50
45
|
updatedAt: string;
|
|
46
|
+
description: string | null;
|
|
47
|
+
agentId: string;
|
|
48
|
+
projectId: string;
|
|
49
|
+
tenantId: string;
|
|
51
50
|
models: {
|
|
52
51
|
base?: {
|
|
53
52
|
model?: string | undefined;
|
|
@@ -62,6 +61,7 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
62
61
|
providerOptions?: Record<string, any> | undefined;
|
|
63
62
|
} | undefined;
|
|
64
63
|
} | null;
|
|
64
|
+
prompt: string | null;
|
|
65
65
|
stopWhen: {
|
|
66
66
|
stepCountIs?: number | undefined;
|
|
67
67
|
} | null;
|
|
@@ -108,15 +108,14 @@ 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;
|
|
113
111
|
id: string;
|
|
114
112
|
name: string;
|
|
115
|
-
description: string | null;
|
|
116
|
-
prompt: string | null;
|
|
117
|
-
agentId: string;
|
|
118
113
|
createdAt: string;
|
|
119
114
|
updatedAt: string;
|
|
115
|
+
description: string | null;
|
|
116
|
+
agentId: string;
|
|
117
|
+
projectId: string;
|
|
118
|
+
tenantId: string;
|
|
120
119
|
models: {
|
|
121
120
|
base?: {
|
|
122
121
|
model?: string | undefined;
|
|
@@ -131,6 +130,7 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
131
130
|
providerOptions?: Record<string, any> | undefined;
|
|
132
131
|
} | undefined;
|
|
133
132
|
} | null;
|
|
133
|
+
prompt: string | null;
|
|
134
134
|
stopWhen: {
|
|
135
135
|
stepCountIs?: number | undefined;
|
|
136
136
|
} | null;
|