@inkeep/agents-core 0.44.0 → 0.45.1
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 +82 -82
- package/dist/auth/auth-validation-schemas.d.ts +146 -146
- package/dist/auth/auth.d.ts +57 -57
- package/dist/auth/authz/index.d.ts +2 -2
- package/dist/auth/authz/index.js +2 -2
- package/dist/auth/authz/permissions.d.ts +16 -1
- package/dist/auth/authz/permissions.js +26 -1
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/constants/otel-attributes.d.ts +1 -0
- package/dist/constants/otel-attributes.js +1 -0
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +4 -4
- package/dist/data-access/manage/agents.d.ts +59 -42
- package/dist/data-access/manage/agents.js +33 -2
- 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/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +16 -16
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +32 -32
- 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 +27 -27
- package/dist/data-access/manage/tools.js +1 -1
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +20 -20
- package/dist/data-access/runtime/conversations.d.ts +31 -31
- 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 +4 -4
- package/dist/db/runtime/runtime-schema.d.ts +8 -8
- package/dist/dolt/branch.js +1 -1
- package/dist/dolt/branches-api.js +1 -1
- package/dist/dolt/index.js +3 -3
- package/dist/dolt/migrate-all-branches.js +1 -1
- package/dist/dolt/ref-helpers.js +1 -1
- package/dist/dolt/ref-scope.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +11 -11
- package/dist/utils/temp-jwt.d.ts +2 -1
- package/dist/utils/temp-jwt.js +3 -2
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1666 -1666
- package/dist/validation/schemas.js +50 -52
- package/package.json +2 -2
|
@@ -8,15 +8,14 @@ import { PgTable } from "drizzle-orm/pg-core";
|
|
|
8
8
|
declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
}) => Promise<{
|
|
11
|
+
tenantId: string;
|
|
12
|
+
projectId: string;
|
|
11
13
|
id: string;
|
|
12
14
|
name: string;
|
|
15
|
+
description: string | null;
|
|
16
|
+
prompt: string | null;
|
|
13
17
|
createdAt: string;
|
|
14
18
|
updatedAt: string;
|
|
15
|
-
description: string | null;
|
|
16
|
-
projectId: string;
|
|
17
|
-
tenantId: string;
|
|
18
|
-
defaultSubAgentId: string | null;
|
|
19
|
-
contextConfigId: string | null;
|
|
20
19
|
models: {
|
|
21
20
|
base?: {
|
|
22
21
|
model?: string | undefined;
|
|
@@ -31,7 +30,11 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
31
30
|
providerOptions?: Record<string, any> | undefined;
|
|
32
31
|
} | undefined;
|
|
33
32
|
} | null;
|
|
34
|
-
|
|
33
|
+
stopWhen: {
|
|
34
|
+
transferCountIs?: number | undefined;
|
|
35
|
+
} | null;
|
|
36
|
+
defaultSubAgentId: string | null;
|
|
37
|
+
contextConfigId: string | null;
|
|
35
38
|
statusUpdates: {
|
|
36
39
|
enabled?: boolean | undefined;
|
|
37
40
|
numEvents?: number | undefined;
|
|
@@ -47,22 +50,18 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
47
50
|
} | undefined;
|
|
48
51
|
}[] | undefined;
|
|
49
52
|
} | null;
|
|
50
|
-
stopWhen: {
|
|
51
|
-
transferCountIs?: number | undefined;
|
|
52
|
-
} | null;
|
|
53
53
|
} | null>;
|
|
54
54
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
56
56
|
}) => Promise<{
|
|
57
|
+
tenantId: string;
|
|
58
|
+
projectId: string;
|
|
57
59
|
id: string;
|
|
58
60
|
name: string;
|
|
61
|
+
description: string | null;
|
|
62
|
+
prompt: string | null;
|
|
59
63
|
createdAt: string;
|
|
60
64
|
updatedAt: string;
|
|
61
|
-
description: string | null;
|
|
62
|
-
projectId: string;
|
|
63
|
-
tenantId: string;
|
|
64
|
-
defaultSubAgentId: string | null;
|
|
65
|
-
contextConfigId: string | null;
|
|
66
65
|
models: {
|
|
67
66
|
base?: {
|
|
68
67
|
model?: string | undefined;
|
|
@@ -77,7 +76,11 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
77
76
|
providerOptions?: Record<string, any> | undefined;
|
|
78
77
|
} | undefined;
|
|
79
78
|
} | null;
|
|
80
|
-
|
|
79
|
+
stopWhen: {
|
|
80
|
+
transferCountIs?: number | undefined;
|
|
81
|
+
} | null;
|
|
82
|
+
defaultSubAgentId: string | null;
|
|
83
|
+
contextConfigId: string | null;
|
|
81
84
|
statusUpdates: {
|
|
82
85
|
enabled?: boolean | undefined;
|
|
83
86
|
numEvents?: number | undefined;
|
|
@@ -93,18 +96,16 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
93
96
|
} | undefined;
|
|
94
97
|
}[] | undefined;
|
|
95
98
|
} | null;
|
|
96
|
-
stopWhen: {
|
|
97
|
-
transferCountIs?: number | undefined;
|
|
98
|
-
} | null;
|
|
99
99
|
defaultSubAgent: {
|
|
100
|
+
tenantId: string;
|
|
101
|
+
projectId: string;
|
|
100
102
|
id: string;
|
|
101
103
|
name: string;
|
|
102
|
-
createdAt: string;
|
|
103
|
-
updatedAt: string;
|
|
104
104
|
description: string | null;
|
|
105
|
+
prompt: string | null;
|
|
105
106
|
agentId: string;
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
createdAt: string;
|
|
108
|
+
updatedAt: string;
|
|
108
109
|
models: {
|
|
109
110
|
base?: {
|
|
110
111
|
model?: string | undefined;
|
|
@@ -119,7 +120,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
119
120
|
providerOptions?: Record<string, any> | undefined;
|
|
120
121
|
} | undefined;
|
|
121
122
|
} | null;
|
|
122
|
-
prompt: string | null;
|
|
123
123
|
stopWhen: {
|
|
124
124
|
stepCountIs?: number | undefined;
|
|
125
125
|
} | null;
|
|
@@ -129,15 +129,14 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
129
129
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
130
130
|
scopes: ProjectScopeConfig;
|
|
131
131
|
}) => Promise<{
|
|
132
|
+
tenantId: string;
|
|
133
|
+
projectId: string;
|
|
132
134
|
id: string;
|
|
133
135
|
name: string;
|
|
136
|
+
description: string | null;
|
|
137
|
+
prompt: string | null;
|
|
134
138
|
createdAt: string;
|
|
135
139
|
updatedAt: string;
|
|
136
|
-
description: string | null;
|
|
137
|
-
projectId: string;
|
|
138
|
-
tenantId: string;
|
|
139
|
-
defaultSubAgentId: string | null;
|
|
140
|
-
contextConfigId: string | null;
|
|
141
140
|
models: {
|
|
142
141
|
base?: {
|
|
143
142
|
model?: string | undefined;
|
|
@@ -152,7 +151,11 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
152
151
|
providerOptions?: Record<string, any> | undefined;
|
|
153
152
|
} | undefined;
|
|
154
153
|
} | null;
|
|
155
|
-
|
|
154
|
+
stopWhen: {
|
|
155
|
+
transferCountIs?: number | undefined;
|
|
156
|
+
} | null;
|
|
157
|
+
defaultSubAgentId: string | null;
|
|
158
|
+
contextConfigId: string | null;
|
|
156
159
|
statusUpdates: {
|
|
157
160
|
enabled?: boolean | undefined;
|
|
158
161
|
numEvents?: number | undefined;
|
|
@@ -168,9 +171,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
168
171
|
} | undefined;
|
|
169
172
|
}[] | undefined;
|
|
170
173
|
} | null;
|
|
171
|
-
stopWhen: {
|
|
172
|
-
transferCountIs?: number | undefined;
|
|
173
|
-
} | null;
|
|
174
174
|
}[]>;
|
|
175
175
|
declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
176
176
|
scopes: ProjectScopeConfig;
|
|
@@ -227,16 +227,32 @@ declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params:
|
|
|
227
227
|
pages: number;
|
|
228
228
|
};
|
|
229
229
|
}>;
|
|
230
|
+
type AvailableAgentInfo = {
|
|
231
|
+
agentId: string;
|
|
232
|
+
agentName: string;
|
|
233
|
+
projectId: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* List agents across multiple project branches for a tenant.
|
|
237
|
+
*
|
|
238
|
+
* Use this when you need to query agents across projects without middleware-provided db.
|
|
239
|
+
*
|
|
240
|
+
* @param db - Database client
|
|
241
|
+
* @param params - Tenant and project IDs
|
|
242
|
+
*/
|
|
243
|
+
declare function listAgentsAcrossProjectBranches(db: AgentsManageDatabaseClient, params: {
|
|
244
|
+
tenantId: string;
|
|
245
|
+
projectIds: string[];
|
|
246
|
+
}): Promise<AvailableAgentInfo[]>;
|
|
230
247
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
248
|
+
tenantId: string;
|
|
249
|
+
projectId: string;
|
|
231
250
|
id: string;
|
|
232
251
|
name: string;
|
|
252
|
+
description: string | null;
|
|
253
|
+
prompt: string | null;
|
|
233
254
|
createdAt: string;
|
|
234
255
|
updatedAt: string;
|
|
235
|
-
description: string | null;
|
|
236
|
-
projectId: string;
|
|
237
|
-
tenantId: string;
|
|
238
|
-
defaultSubAgentId: string | null;
|
|
239
|
-
contextConfigId: string | null;
|
|
240
256
|
models: {
|
|
241
257
|
base?: {
|
|
242
258
|
model?: string | undefined;
|
|
@@ -251,7 +267,11 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
251
267
|
providerOptions?: Record<string, any> | undefined;
|
|
252
268
|
} | undefined;
|
|
253
269
|
} | null;
|
|
254
|
-
|
|
270
|
+
stopWhen: {
|
|
271
|
+
transferCountIs?: number | undefined;
|
|
272
|
+
} | null;
|
|
273
|
+
defaultSubAgentId: string | null;
|
|
274
|
+
contextConfigId: string | null;
|
|
255
275
|
statusUpdates: {
|
|
256
276
|
enabled?: boolean | undefined;
|
|
257
277
|
numEvents?: number | undefined;
|
|
@@ -267,9 +287,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
267
287
|
} | undefined;
|
|
268
288
|
}[] | undefined;
|
|
269
289
|
} | null;
|
|
270
|
-
stopWhen: {
|
|
271
|
-
transferCountIs?: number | undefined;
|
|
272
|
-
} | null;
|
|
273
290
|
}>;
|
|
274
291
|
declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
275
292
|
scopes: AgentScopeConfig;
|
|
@@ -365,4 +382,4 @@ declare const upsertAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
365
382
|
data: AgentInsert;
|
|
366
383
|
}) => Promise<AgentSelect | null>;
|
|
367
384
|
//#endregion
|
|
368
|
-
export { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, listAgents, listAgentsPaginated, updateAgent, upsertAgent };
|
|
385
|
+
export { AvailableAgentInfo, createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, listAgents, listAgentsAcrossProjectBranches, listAgentsPaginated, updateAgent, upsertAgent };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { agents, artifactComponents, dataComponents, functionTools, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentFunctionToolRelations, subAgentToolRelations, subAgents, tools } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { getLogger } from "../../utils/logger.js";
|
|
2
3
|
import { generateId } from "../../utils/conversations.js";
|
|
4
|
+
import { getProjectMainBranchName } from "./projectLifecycle.js";
|
|
3
5
|
import { getContextConfigById } from "./contextConfigs.js";
|
|
4
6
|
import { getExternalAgent } from "./externalAgents.js";
|
|
5
7
|
import { getFunction } from "./functions.js";
|
|
@@ -10,7 +12,7 @@ import { getSubAgentById } from "./subAgents.js";
|
|
|
10
12
|
import { getSubAgentTeamAgentRelationsByAgent } from "./subAgentTeamAgentRelations.js";
|
|
11
13
|
import { listTools } from "./tools.js";
|
|
12
14
|
import { listTriggers } from "./triggers.js";
|
|
13
|
-
import { and, count, desc, eq, inArray } from "drizzle-orm";
|
|
15
|
+
import { and, count, desc, eq, inArray, sql } from "drizzle-orm";
|
|
14
16
|
|
|
15
17
|
//#region src/data-access/manage/agents.ts
|
|
16
18
|
const getAgentById = (db) => async (params) => {
|
|
@@ -43,6 +45,35 @@ const listAgentsPaginated = (db) => async (params) => {
|
|
|
43
45
|
}
|
|
44
46
|
};
|
|
45
47
|
};
|
|
48
|
+
const agentsLogger = getLogger("agents-data-access");
|
|
49
|
+
/**
|
|
50
|
+
* List agents across multiple project branches for a tenant.
|
|
51
|
+
*
|
|
52
|
+
* Use this when you need to query agents across projects without middleware-provided db.
|
|
53
|
+
*
|
|
54
|
+
* @param db - Database client
|
|
55
|
+
* @param params - Tenant and project IDs
|
|
56
|
+
*/
|
|
57
|
+
async function listAgentsAcrossProjectBranches(db, params) {
|
|
58
|
+
const { tenantId, projectIds } = params;
|
|
59
|
+
const allAgents = [];
|
|
60
|
+
for (const projectId of projectIds) try {
|
|
61
|
+
const branchName = getProjectMainBranchName(tenantId, projectId);
|
|
62
|
+
const result = await db.execute(sql`
|
|
63
|
+
SELECT id as "agentId", name as "agentName", project_id as "projectId"
|
|
64
|
+
FROM agent AS OF ${branchName}
|
|
65
|
+
WHERE tenant_id = ${tenantId} AND project_id = ${projectId}
|
|
66
|
+
ORDER BY name
|
|
67
|
+
`);
|
|
68
|
+
allAgents.push(...result.rows);
|
|
69
|
+
} catch (error) {
|
|
70
|
+
agentsLogger.warn({
|
|
71
|
+
error,
|
|
72
|
+
projectId
|
|
73
|
+
}, "Failed to fetch agents for project, skipping");
|
|
74
|
+
}
|
|
75
|
+
return allAgents;
|
|
76
|
+
}
|
|
46
77
|
const createAgent = (db) => async (data) => {
|
|
47
78
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
48
79
|
const insertData = {
|
|
@@ -527,4 +558,4 @@ const upsertAgent = (db) => async (params) => {
|
|
|
527
558
|
};
|
|
528
559
|
|
|
529
560
|
//#endregion
|
|
530
|
-
export { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, listAgents, listAgentsPaginated, updateAgent, upsertAgent };
|
|
561
|
+
export { createAgent, deleteAgent, fetchComponentRelationships, getAgentById, getAgentSubAgentInfos, getAgentWithDefaultSubAgent, getFullAgentDefinition, getFullAgentDefinitionWithRelationIds, listAgents, listAgentsAcrossProjectBranches, listAgentsPaginated, updateAgent, upsertAgent };
|
|
@@ -7,13 +7,13 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
7
7
|
scopes: ProjectScopeConfig;
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<{
|
|
10
|
+
tenantId: string;
|
|
11
|
+
projectId: string;
|
|
10
12
|
id: string;
|
|
11
13
|
name: string;
|
|
14
|
+
description: string | null;
|
|
12
15
|
createdAt: string;
|
|
13
16
|
updatedAt: string;
|
|
14
|
-
description: string | null;
|
|
15
|
-
projectId: string;
|
|
16
|
-
tenantId: string;
|
|
17
17
|
props: Record<string, unknown> | null;
|
|
18
18
|
render: {
|
|
19
19
|
component: string;
|
|
@@ -49,13 +49,13 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
49
49
|
};
|
|
50
50
|
}>;
|
|
51
51
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
52
|
+
tenantId: string;
|
|
53
|
+
projectId: string;
|
|
52
54
|
id: string;
|
|
53
55
|
name: string;
|
|
56
|
+
description: string | null;
|
|
54
57
|
createdAt: string;
|
|
55
58
|
updatedAt: string;
|
|
56
|
-
description: string | null;
|
|
57
|
-
projectId: string;
|
|
58
|
-
tenantId: string;
|
|
59
59
|
props: Record<string, unknown> | null;
|
|
60
60
|
render: {
|
|
61
61
|
component: string;
|
|
@@ -104,11 +104,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
104
104
|
scopes: SubAgentScopeConfig;
|
|
105
105
|
artifactComponentId: string;
|
|
106
106
|
}) => Promise<{
|
|
107
|
+
tenantId: string;
|
|
108
|
+
projectId: string;
|
|
107
109
|
id: string;
|
|
108
|
-
createdAt: string;
|
|
109
110
|
agentId: string;
|
|
110
|
-
|
|
111
|
-
tenantId: string;
|
|
111
|
+
createdAt: string;
|
|
112
112
|
subAgentId: string;
|
|
113
113
|
artifactComponentId: string;
|
|
114
114
|
}>;
|
|
@@ -147,11 +147,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
147
147
|
scopes: SubAgentScopeConfig;
|
|
148
148
|
artifactComponentId: string;
|
|
149
149
|
}) => Promise<{
|
|
150
|
+
tenantId: string;
|
|
151
|
+
projectId: string;
|
|
150
152
|
id: string;
|
|
151
|
-
createdAt: string;
|
|
152
153
|
agentId: string;
|
|
153
|
-
|
|
154
|
-
tenantId: string;
|
|
154
|
+
createdAt: string;
|
|
155
155
|
subAgentId: string;
|
|
156
156
|
artifactComponentId: string;
|
|
157
157
|
} | null>;
|
|
@@ -8,26 +8,26 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
8
8
|
scopes: AgentScopeConfig;
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
+
tenantId: string;
|
|
12
|
+
projectId: string;
|
|
11
13
|
id: string;
|
|
14
|
+
agentId: string;
|
|
12
15
|
createdAt: string;
|
|
13
16
|
updatedAt: string;
|
|
14
17
|
headersSchema: unknown;
|
|
15
18
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
16
|
-
agentId: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
19
|
} | undefined>;
|
|
20
20
|
declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
22
22
|
}) => Promise<{
|
|
23
|
+
tenantId: string;
|
|
24
|
+
projectId: string;
|
|
23
25
|
id: string;
|
|
26
|
+
agentId: string;
|
|
24
27
|
createdAt: string;
|
|
25
28
|
updatedAt: string;
|
|
26
29
|
headersSchema: unknown;
|
|
27
30
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
28
|
-
agentId: string;
|
|
29
|
-
projectId: string;
|
|
30
|
-
tenantId: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
33
33
|
scopes: AgentScopeConfig;
|
|
@@ -42,14 +42,14 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
42
42
|
};
|
|
43
43
|
}>;
|
|
44
44
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
45
|
+
tenantId: string;
|
|
46
|
+
projectId: string;
|
|
45
47
|
id: string;
|
|
48
|
+
agentId: string;
|
|
46
49
|
createdAt: string;
|
|
47
50
|
updatedAt: string;
|
|
48
51
|
headersSchema: unknown;
|
|
49
52
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
50
|
-
agentId: string;
|
|
51
|
-
projectId: string;
|
|
52
|
-
tenantId: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const updateContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
@@ -82,14 +82,14 @@ declare const countContextConfigs: (db: AgentsManageDatabaseClient) => (params:
|
|
|
82
82
|
declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params: {
|
|
83
83
|
data: ContextConfigInsert;
|
|
84
84
|
}) => Promise<{
|
|
85
|
+
tenantId: string;
|
|
86
|
+
projectId: string;
|
|
85
87
|
id: string;
|
|
88
|
+
agentId: string;
|
|
86
89
|
createdAt: string;
|
|
87
90
|
updatedAt: string;
|
|
88
91
|
headersSchema: unknown;
|
|
89
92
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
90
|
-
agentId: string;
|
|
91
|
-
projectId: string;
|
|
92
|
-
tenantId: string;
|
|
93
93
|
}>;
|
|
94
94
|
//#endregion
|
|
95
95
|
export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
|
|
@@ -64,11 +64,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
64
64
|
scopes: SubAgentScopeConfig;
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
67
|
+
tenantId: string;
|
|
68
|
+
projectId: string;
|
|
67
69
|
id: string;
|
|
68
|
-
createdAt: string;
|
|
69
70
|
agentId: string;
|
|
70
|
-
|
|
71
|
-
tenantId: string;
|
|
71
|
+
createdAt: string;
|
|
72
72
|
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
@@ -106,11 +106,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
106
106
|
scopes: SubAgentScopeConfig;
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
109
|
+
tenantId: string;
|
|
110
|
+
projectId: string;
|
|
109
111
|
id: string;
|
|
110
|
-
createdAt: string;
|
|
111
112
|
agentId: string;
|
|
112
|
-
|
|
113
|
-
tenantId: string;
|
|
113
|
+
createdAt: string;
|
|
114
114
|
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
@@ -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;
|
|
56
58
|
id: string;
|
|
57
59
|
name: string;
|
|
58
|
-
createdAt: string;
|
|
59
|
-
updatedAt: string;
|
|
60
60
|
description: string | null;
|
|
61
61
|
agentId: string;
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: 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;
|
|
98
100
|
id: string;
|
|
99
101
|
name: string;
|
|
100
|
-
createdAt: string;
|
|
101
|
-
updatedAt: string;
|
|
102
102
|
description: string | null;
|
|
103
103
|
agentId: string;
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
createdAt: string;
|
|
105
|
+
updatedAt: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -161,17 +161,17 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
161
161
|
needsApproval?: boolean;
|
|
162
162
|
}> | null;
|
|
163
163
|
}) => Promise<{
|
|
164
|
+
tenantId: string;
|
|
165
|
+
projectId: string;
|
|
164
166
|
id: string;
|
|
167
|
+
agentId: string;
|
|
165
168
|
createdAt: string;
|
|
166
169
|
updatedAt: string;
|
|
167
|
-
agentId: string;
|
|
168
|
-
projectId: string;
|
|
169
|
-
tenantId: string;
|
|
170
|
-
functionToolId: string;
|
|
171
170
|
toolPolicies: Record<string, {
|
|
172
171
|
needsApproval?: boolean;
|
|
173
172
|
}> | null;
|
|
174
173
|
subAgentId: string;
|
|
174
|
+
functionToolId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -226,17 +226,17 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
226
226
|
needsApproval?: boolean;
|
|
227
227
|
}> | null;
|
|
228
228
|
}) => Promise<{
|
|
229
|
+
tenantId: string;
|
|
230
|
+
projectId: string;
|
|
229
231
|
id: string;
|
|
232
|
+
agentId: string;
|
|
230
233
|
createdAt: string;
|
|
231
234
|
updatedAt: string;
|
|
232
|
-
agentId: string;
|
|
233
|
-
projectId: string;
|
|
234
|
-
tenantId: string;
|
|
235
|
-
functionToolId: string;
|
|
236
235
|
toolPolicies: Record<string, {
|
|
237
236
|
needsApproval?: boolean;
|
|
238
237
|
}> | null;
|
|
239
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 };
|
|
@@ -8,15 +8,15 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
8
8
|
scopes: SubAgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
+
tenantId: string;
|
|
12
|
+
projectId: string;
|
|
11
13
|
id: string;
|
|
14
|
+
agentId: string;
|
|
12
15
|
createdAt: string;
|
|
13
16
|
updatedAt: string;
|
|
14
17
|
headers: Record<string, string> | null;
|
|
15
|
-
agentId: string;
|
|
16
|
-
projectId: string;
|
|
17
|
-
tenantId: string;
|
|
18
|
-
subAgentId: string;
|
|
19
18
|
externalAgentId: string;
|
|
19
|
+
subAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
21
21
|
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
22
22
|
scopes: SubAgentScopeConfig;
|
|
@@ -43,28 +43,28 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
|
|
|
43
43
|
declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
|
+
tenantId: string;
|
|
47
|
+
projectId: string;
|
|
46
48
|
id: string;
|
|
49
|
+
agentId: string;
|
|
47
50
|
createdAt: string;
|
|
48
51
|
updatedAt: string;
|
|
49
52
|
headers: Record<string, string> | null;
|
|
50
|
-
agentId: string;
|
|
51
|
-
projectId: string;
|
|
52
|
-
tenantId: string;
|
|
53
|
-
subAgentId: string;
|
|
54
53
|
externalAgentId: string;
|
|
54
|
+
subAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
|
+
tenantId: string;
|
|
60
|
+
projectId: string;
|
|
59
61
|
id: string;
|
|
62
|
+
agentId: string;
|
|
60
63
|
createdAt: string;
|
|
61
64
|
updatedAt: string;
|
|
62
65
|
headers: Record<string, string> | null;
|
|
63
|
-
agentId: string;
|
|
64
|
-
projectId: string;
|
|
65
|
-
tenantId: string;
|
|
66
|
-
subAgentId: string;
|
|
67
66
|
externalAgentId: string;
|
|
67
|
+
subAgentId: string;
|
|
68
68
|
}[]>;
|
|
69
69
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
70
70
|
scopes: AgentScopeConfig;
|
|
@@ -179,15 +179,15 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
179
179
|
headers?: Record<string, string> | null;
|
|
180
180
|
};
|
|
181
181
|
}) => Promise<{
|
|
182
|
+
tenantId: string;
|
|
183
|
+
projectId: string;
|
|
182
184
|
id: string;
|
|
185
|
+
agentId: string;
|
|
183
186
|
createdAt: string;
|
|
184
187
|
updatedAt: string;
|
|
185
188
|
headers: Record<string, string> | null;
|
|
186
|
-
agentId: string;
|
|
187
|
-
projectId: string;
|
|
188
|
-
tenantId: string;
|
|
189
|
-
subAgentId: string;
|
|
190
189
|
externalAgentId: string;
|
|
190
|
+
subAgentId: string;
|
|
191
191
|
}>;
|
|
192
192
|
/**
|
|
193
193
|
* Check if sub-agent external agent relation exists by params
|
|
@@ -196,15 +196,15 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
196
196
|
scopes: SubAgentScopeConfig;
|
|
197
197
|
externalAgentId: string;
|
|
198
198
|
}) => Promise<{
|
|
199
|
+
tenantId: string;
|
|
200
|
+
projectId: string;
|
|
199
201
|
id: string;
|
|
202
|
+
agentId: string;
|
|
200
203
|
createdAt: string;
|
|
201
204
|
updatedAt: string;
|
|
202
205
|
headers: Record<string, string> | null;
|
|
203
|
-
agentId: string;
|
|
204
|
-
projectId: string;
|
|
205
|
-
tenantId: string;
|
|
206
|
-
subAgentId: string;
|
|
207
206
|
externalAgentId: string;
|
|
207
|
+
subAgentId: string;
|
|
208
208
|
} | undefined>;
|
|
209
209
|
/**
|
|
210
210
|
* Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
|
|
@@ -217,15 +217,15 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
217
217
|
headers?: Record<string, string> | null;
|
|
218
218
|
};
|
|
219
219
|
}) => Promise<{
|
|
220
|
+
tenantId: string;
|
|
221
|
+
projectId: string;
|
|
220
222
|
id: string;
|
|
223
|
+
agentId: string;
|
|
221
224
|
createdAt: string;
|
|
222
225
|
updatedAt: string;
|
|
223
226
|
headers: Record<string, string> | null;
|
|
224
|
-
agentId: string;
|
|
225
|
-
projectId: string;
|
|
226
|
-
tenantId: string;
|
|
227
|
-
subAgentId: string;
|
|
228
227
|
externalAgentId: string;
|
|
228
|
+
subAgentId: string;
|
|
229
229
|
}>;
|
|
230
230
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
231
231
|
scopes: SubAgentScopeConfig;
|