@inkeep/agents-core 0.58.18 → 0.58.20
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 +3 -3
- package/dist/constants/models.d.ts +2 -0
- package/dist/constants/models.js +2 -0
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +2 -2
- package/dist/data-access/manage/agents.d.ts +24 -24
- package/dist/data-access/manage/artifactComponents.d.ts +6 -6
- package/dist/data-access/manage/contextConfigs.d.ts +4 -4
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +10 -10
- package/dist/data-access/manage/skills.d.ts +12 -12
- 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 +12 -12
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/manage/tools.js +4 -2
- 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 +29 -16
- package/dist/data-access/runtime/apps.js +14 -7
- package/dist/data-access/runtime/cascade-delete.d.ts +4 -0
- package/dist/data-access/runtime/cascade-delete.js +27 -1
- package/dist/data-access/runtime/conversations.d.ts +20 -20
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +15 -0
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/data-access/runtime/triggerInvocations.d.ts +5 -0
- package/dist/db/manage/manage-schema.d.ts +453 -453
- package/dist/db/runtime/runtime-schema.d.ts +434 -326
- package/dist/db/runtime/runtime-schema.js +4 -0
- package/dist/env.js +7 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/utils/env-detection.d.ts +6 -0
- package/dist/utils/env-detection.js +13 -0
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/work-app-mcp.d.ts +8 -0
- package/dist/utils/work-app-mcp.js +18 -0
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +2945 -4751
- package/dist/validation/schemas.js +10 -9
- package/drizzle/runtime/0023_bumpy_vampiro.sql +4 -0
- package/drizzle/runtime/meta/0023_snapshot.json +4264 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -10,12 +10,12 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
metadata: Record<string, string> | null;
|
|
16
13
|
description: string;
|
|
17
14
|
tenantId: string;
|
|
18
15
|
projectId: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
metadata: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
47
|
-
updatedAt: string;
|
|
48
|
-
metadata: Record<string, string> | null;
|
|
49
46
|
description: string;
|
|
50
47
|
tenantId: string;
|
|
51
48
|
projectId: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
metadata: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
58
|
-
updatedAt: string;
|
|
59
|
-
metadata: Record<string, string> | null;
|
|
60
57
|
description: string;
|
|
61
58
|
tenantId: string;
|
|
62
59
|
projectId: string;
|
|
60
|
+
createdAt: string;
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
metadata: Record<string, string> | null;
|
|
63
63
|
content: string;
|
|
64
64
|
}>;
|
|
65
65
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -92,14 +92,14 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
92
92
|
alwaysLoaded?: boolean;
|
|
93
93
|
}) => Promise<{
|
|
94
94
|
id: string;
|
|
95
|
-
createdAt: string;
|
|
96
|
-
updatedAt: string;
|
|
97
95
|
tenantId: string;
|
|
98
96
|
projectId: string;
|
|
99
97
|
agentId: string;
|
|
100
|
-
|
|
98
|
+
createdAt: string;
|
|
99
|
+
updatedAt: string;
|
|
101
100
|
index: number;
|
|
102
101
|
alwaysLoaded: boolean;
|
|
102
|
+
subAgentId: string;
|
|
103
103
|
skillId: string;
|
|
104
104
|
}>;
|
|
105
105
|
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -10,14 +10,14 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
headers: Record<string, string> | null;
|
|
16
13
|
tenantId: string;
|
|
17
14
|
projectId: string;
|
|
18
15
|
agentId: string;
|
|
19
|
-
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
49
|
-
updatedAt: string;
|
|
50
|
-
headers: Record<string, string> | null;
|
|
51
48
|
tenantId: string;
|
|
52
49
|
projectId: string;
|
|
53
50
|
agentId: string;
|
|
54
|
-
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
62
|
-
updatedAt: string;
|
|
63
|
-
headers: Record<string, string> | null;
|
|
64
61
|
tenantId: string;
|
|
65
62
|
projectId: string;
|
|
66
63
|
agentId: string;
|
|
67
|
-
|
|
64
|
+
createdAt: string;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
185
|
-
updatedAt: string;
|
|
186
|
-
headers: Record<string, string> | null;
|
|
187
184
|
tenantId: string;
|
|
188
185
|
projectId: string;
|
|
189
186
|
agentId: string;
|
|
190
|
-
|
|
187
|
+
createdAt: string;
|
|
188
|
+
updatedAt: string;
|
|
189
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
202
|
-
updatedAt: string;
|
|
203
|
-
headers: Record<string, string> | null;
|
|
204
201
|
tenantId: string;
|
|
205
202
|
projectId: string;
|
|
206
203
|
agentId: string;
|
|
207
|
-
|
|
204
|
+
createdAt: string;
|
|
205
|
+
updatedAt: string;
|
|
206
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
223
|
-
updatedAt: string;
|
|
224
|
-
headers: Record<string, string> | null;
|
|
225
222
|
tenantId: string;
|
|
226
223
|
projectId: string;
|
|
227
224
|
agentId: string;
|
|
228
|
-
|
|
225
|
+
createdAt: string;
|
|
226
|
+
updatedAt: string;
|
|
227
|
+
headers: Record<string, string> | null;
|
|
229
228
|
externalAgentId: string;
|
|
229
|
+
subAgentId: string;
|
|
230
230
|
}>;
|
|
231
231
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
232
232
|
scopes: SubAgentScopeConfig;
|
|
@@ -10,14 +10,14 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
13
|
tenantId: string;
|
|
16
14
|
projectId: string;
|
|
17
15
|
agentId: string;
|
|
18
|
-
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
19
18
|
sourceSubAgentId: string;
|
|
20
19
|
targetSubAgentId: string | null;
|
|
20
|
+
relationType: string | null;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
23
|
scopes: AgentScopeConfig;
|
|
@@ -45,27 +45,27 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
47
|
id: string;
|
|
48
|
-
createdAt: string;
|
|
49
|
-
updatedAt: string;
|
|
50
48
|
tenantId: string;
|
|
51
49
|
projectId: string;
|
|
52
50
|
agentId: string;
|
|
53
|
-
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
54
53
|
sourceSubAgentId: string;
|
|
55
54
|
targetSubAgentId: string | null;
|
|
55
|
+
relationType: string | null;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
60
|
id: string;
|
|
61
|
-
createdAt: string;
|
|
62
|
-
updatedAt: string;
|
|
63
61
|
tenantId: string;
|
|
64
62
|
projectId: string;
|
|
65
63
|
agentId: string;
|
|
66
|
-
|
|
64
|
+
createdAt: string;
|
|
65
|
+
updatedAt: string;
|
|
67
66
|
sourceSubAgentId: string;
|
|
68
67
|
targetSubAgentId: string | null;
|
|
68
|
+
relationType: string | null;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getAgentRelationsBySource: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -127,14 +127,14 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
127
127
|
}>;
|
|
128
128
|
declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
129
129
|
id: string;
|
|
130
|
-
createdAt: string;
|
|
131
|
-
updatedAt: string;
|
|
132
130
|
tenantId: string;
|
|
133
131
|
projectId: string;
|
|
134
132
|
agentId: string;
|
|
135
|
-
|
|
133
|
+
createdAt: string;
|
|
134
|
+
updatedAt: string;
|
|
136
135
|
sourceSubAgentId: string;
|
|
137
136
|
targetSubAgentId: string | null;
|
|
137
|
+
relationType: string | null;
|
|
138
138
|
}>;
|
|
139
139
|
/**
|
|
140
140
|
* Check if sub-agent relation exists by agent, source, target, and relation type
|
|
@@ -146,28 +146,28 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
146
146
|
relationType: string;
|
|
147
147
|
}) => Promise<{
|
|
148
148
|
id: string;
|
|
149
|
-
createdAt: string;
|
|
150
|
-
updatedAt: string;
|
|
151
149
|
tenantId: string;
|
|
152
150
|
projectId: string;
|
|
153
151
|
agentId: string;
|
|
154
|
-
|
|
152
|
+
createdAt: string;
|
|
153
|
+
updatedAt: string;
|
|
155
154
|
sourceSubAgentId: string;
|
|
156
155
|
targetSubAgentId: string | null;
|
|
156
|
+
relationType: string | null;
|
|
157
157
|
} | undefined>;
|
|
158
158
|
/**
|
|
159
159
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
160
160
|
*/
|
|
161
161
|
declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
162
162
|
id: string;
|
|
163
|
-
createdAt: string;
|
|
164
|
-
updatedAt: string;
|
|
165
163
|
tenantId: string;
|
|
166
164
|
projectId: string;
|
|
167
165
|
agentId: string;
|
|
168
|
-
|
|
166
|
+
createdAt: string;
|
|
167
|
+
updatedAt: string;
|
|
169
168
|
sourceSubAgentId: string;
|
|
170
169
|
targetSubAgentId: string | null;
|
|
170
|
+
relationType: string | null;
|
|
171
171
|
}>;
|
|
172
172
|
declare const updateAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
173
173
|
scopes: AgentScopeConfig;
|
|
@@ -205,17 +205,17 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
205
205
|
};
|
|
206
206
|
}) => Promise<{
|
|
207
207
|
id: string;
|
|
208
|
-
createdAt: string;
|
|
209
|
-
updatedAt: string;
|
|
210
|
-
headers: Record<string, string> | null;
|
|
211
208
|
tenantId: string;
|
|
212
209
|
projectId: string;
|
|
213
210
|
agentId: string;
|
|
214
|
-
|
|
211
|
+
createdAt: string;
|
|
212
|
+
updatedAt: string;
|
|
215
213
|
toolId: string;
|
|
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
|
-
createdAt: string;
|
|
253
|
-
updatedAt: string;
|
|
254
|
-
headers: Record<string, string> | null;
|
|
255
252
|
tenantId: string;
|
|
256
253
|
projectId: string;
|
|
257
254
|
agentId: string;
|
|
258
|
-
|
|
255
|
+
createdAt: string;
|
|
256
|
+
updatedAt: string;
|
|
259
257
|
toolId: string;
|
|
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
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
headers: Record<string, string> | null;
|
|
16
13
|
tenantId: string;
|
|
17
14
|
projectId: string;
|
|
18
15
|
agentId: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
49
|
-
updatedAt: string;
|
|
50
|
-
headers: Record<string, string> | null;
|
|
51
48
|
tenantId: string;
|
|
52
49
|
projectId: string;
|
|
53
50
|
agentId: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
62
|
-
updatedAt: string;
|
|
63
|
-
headers: Record<string, string> | null;
|
|
64
61
|
tenantId: string;
|
|
65
62
|
projectId: string;
|
|
66
63
|
agentId: string;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
215
|
-
updatedAt: string;
|
|
216
|
-
headers: Record<string, string> | null;
|
|
217
214
|
tenantId: string;
|
|
218
215
|
projectId: string;
|
|
219
216
|
agentId: string;
|
|
217
|
+
createdAt: string;
|
|
218
|
+
updatedAt: string;
|
|
219
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
232
|
-
updatedAt: string;
|
|
233
|
-
headers: Record<string, string> | null;
|
|
234
231
|
tenantId: string;
|
|
235
232
|
projectId: string;
|
|
236
233
|
agentId: string;
|
|
234
|
+
createdAt: string;
|
|
235
|
+
updatedAt: string;
|
|
236
|
+
headers: Record<string, string> | null;
|
|
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
|
-
createdAt: string;
|
|
253
|
-
updatedAt: string;
|
|
254
|
-
headers: Record<string, string> | null;
|
|
255
252
|
tenantId: string;
|
|
256
253
|
projectId: string;
|
|
257
254
|
agentId: string;
|
|
255
|
+
createdAt: string;
|
|
256
|
+
updatedAt: string;
|
|
257
|
+
headers: Record<string, string> | null;
|
|
258
258
|
subAgentId: string;
|
|
259
259
|
targetAgentId: string;
|
|
260
260
|
}>;
|
|
@@ -11,12 +11,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
16
14
|
description: string | null;
|
|
17
15
|
tenantId: string;
|
|
18
16
|
projectId: string;
|
|
19
17
|
agentId: string;
|
|
18
|
+
prompt: string | null;
|
|
19
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
20
20
|
models: {
|
|
21
21
|
base?: {
|
|
22
22
|
model?: string | undefined;
|
|
@@ -34,20 +34,20 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
34
34
|
stopWhen: {
|
|
35
35
|
stepCountIs?: number | undefined;
|
|
36
36
|
} | null;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
41
41
|
scopes: AgentScopeConfig;
|
|
42
42
|
}) => Promise<{
|
|
43
43
|
id: string;
|
|
44
44
|
name: string;
|
|
45
|
-
createdAt: string;
|
|
46
|
-
updatedAt: string;
|
|
47
45
|
description: string | null;
|
|
48
46
|
tenantId: string;
|
|
49
47
|
projectId: string;
|
|
50
48
|
agentId: string;
|
|
49
|
+
prompt: string | null;
|
|
50
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
51
51
|
models: {
|
|
52
52
|
base?: {
|
|
53
53
|
model?: string | undefined;
|
|
@@ -65,8 +65,8 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
65
65
|
stopWhen: {
|
|
66
66
|
stepCountIs?: number | undefined;
|
|
67
67
|
} | null;
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
createdAt: string;
|
|
69
|
+
updatedAt: string;
|
|
70
70
|
}[]>;
|
|
71
71
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
72
72
|
scopes: AgentScopeConfig;
|
|
@@ -111,12 +111,12 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
111
111
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
112
112
|
id: string;
|
|
113
113
|
name: string;
|
|
114
|
-
createdAt: string;
|
|
115
|
-
updatedAt: string;
|
|
116
114
|
description: string | null;
|
|
117
115
|
tenantId: string;
|
|
118
116
|
projectId: string;
|
|
119
117
|
agentId: string;
|
|
118
|
+
prompt: string | null;
|
|
119
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
120
120
|
models: {
|
|
121
121
|
base?: {
|
|
122
122
|
model?: string | undefined;
|
|
@@ -134,8 +134,8 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
134
134
|
stopWhen: {
|
|
135
135
|
stepCountIs?: number | undefined;
|
|
136
136
|
} | null;
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
createdAt: string;
|
|
138
|
+
updatedAt: string;
|
|
139
139
|
}>;
|
|
140
140
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
141
141
|
scopes: AgentScopeConfig;
|
|
@@ -22,12 +22,12 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
createdAt: string;
|
|
26
|
-
updatedAt: string;
|
|
27
25
|
description: string | null;
|
|
28
|
-
headers: Record<string, string> | null;
|
|
29
26
|
tenantId: string;
|
|
30
27
|
projectId: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
31
31
|
config: {
|
|
32
32
|
type: "mcp";
|
|
33
33
|
mcp: ToolMcpConfig;
|
|
@@ -80,12 +80,12 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
81
|
id: string;
|
|
82
82
|
name: string;
|
|
83
|
-
createdAt: string;
|
|
84
|
-
updatedAt: string;
|
|
85
83
|
description: string | null;
|
|
86
|
-
headers: Record<string, string> | null;
|
|
87
84
|
tenantId: string;
|
|
88
85
|
projectId: string;
|
|
86
|
+
createdAt: string;
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
headers: Record<string, string> | null;
|
|
89
89
|
config: {
|
|
90
90
|
type: "mcp";
|
|
91
91
|
mcp: ToolMcpConfig;
|
|
@@ -136,17 +136,17 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
136
136
|
}> | null;
|
|
137
137
|
}) => Promise<{
|
|
138
138
|
id: string;
|
|
139
|
-
createdAt: string;
|
|
140
|
-
updatedAt: string;
|
|
141
|
-
headers: Record<string, string> | null;
|
|
142
139
|
tenantId: string;
|
|
143
140
|
projectId: string;
|
|
144
141
|
agentId: string;
|
|
145
|
-
|
|
142
|
+
createdAt: string;
|
|
143
|
+
updatedAt: string;
|
|
146
144
|
toolId: string;
|
|
145
|
+
headers: Record<string, string> | null;
|
|
147
146
|
toolPolicies: Record<string, {
|
|
148
147
|
needsApproval?: boolean;
|
|
149
148
|
}> | null;
|
|
149
|
+
subAgentId: string;
|
|
150
150
|
selectedTools: string[] | null;
|
|
151
151
|
}>;
|
|
152
152
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -155,17 +155,17 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
155
155
|
toolId: string;
|
|
156
156
|
}) => Promise<{
|
|
157
157
|
id: string;
|
|
158
|
-
createdAt: string;
|
|
159
|
-
updatedAt: string;
|
|
160
|
-
headers: Record<string, string> | null;
|
|
161
158
|
tenantId: string;
|
|
162
159
|
projectId: string;
|
|
163
160
|
agentId: string;
|
|
164
|
-
|
|
161
|
+
createdAt: string;
|
|
162
|
+
updatedAt: string;
|
|
165
163
|
toolId: string;
|
|
164
|
+
headers: Record<string, string> | null;
|
|
166
165
|
toolPolicies: Record<string, {
|
|
167
166
|
needsApproval?: boolean;
|
|
168
167
|
}> | null;
|
|
168
|
+
subAgentId: string;
|
|
169
169
|
selectedTools: string[] | null;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
@@ -183,17 +183,17 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
183
183
|
relationId?: string;
|
|
184
184
|
}) => Promise<{
|
|
185
185
|
id: string;
|
|
186
|
-
createdAt: string;
|
|
187
|
-
updatedAt: string;
|
|
188
|
-
headers: Record<string, string> | null;
|
|
189
186
|
tenantId: string;
|
|
190
187
|
projectId: string;
|
|
191
188
|
agentId: string;
|
|
192
|
-
|
|
189
|
+
createdAt: string;
|
|
190
|
+
updatedAt: string;
|
|
193
191
|
toolId: string;
|
|
192
|
+
headers: Record<string, string> | null;
|
|
194
193
|
toolPolicies: Record<string, {
|
|
195
194
|
needsApproval?: boolean;
|
|
196
195
|
}> | null;
|
|
196
|
+
subAgentId: string;
|
|
197
197
|
selectedTools: string[] | null;
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
@@ -204,12 +204,12 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
204
204
|
}) => Promise<{
|
|
205
205
|
id: string;
|
|
206
206
|
name: string;
|
|
207
|
-
createdAt: string;
|
|
208
|
-
updatedAt: string;
|
|
209
207
|
description: string | null;
|
|
210
|
-
headers: Record<string, string> | null;
|
|
211
208
|
tenantId: string;
|
|
212
209
|
projectId: string;
|
|
210
|
+
createdAt: string;
|
|
211
|
+
updatedAt: string;
|
|
212
|
+
headers: Record<string, string> | null;
|
|
213
213
|
config: {
|
|
214
214
|
type: "mcp";
|
|
215
215
|
mcp: ToolMcpConfig;
|
|
@@ -18,6 +18,7 @@ import { toISODateString } from "../../utils/date.js";
|
|
|
18
18
|
import { McpClient } from "../../utils/mcp-client.js";
|
|
19
19
|
import { configureComposioMCPServer } from "../../utils/third-party-mcp-servers/composio-client.js";
|
|
20
20
|
import { isThirdPartyMCPServerAuthenticated } from "../../utils/third-party-mcp-servers/third-party-check.js";
|
|
21
|
+
import { TRUSTED_WORK_APP_MCP_PATHS, isTrustedWorkAppMcpUrl } from "../../utils/work-app-mcp.js";
|
|
21
22
|
import "../../utils/index.js";
|
|
22
23
|
import { isGithubWorkAppTool } from "../runtime/github-work-app-installations.js";
|
|
23
24
|
import { getCredentialReference, getUserScopedCredentialReference } from "./credentialReferences.js";
|
|
@@ -122,14 +123,15 @@ const discoverToolsFromServer = async (tool, credentialReference, credentialStor
|
|
|
122
123
|
sessionId: tool.config.mcp.transport?.sessionId
|
|
123
124
|
};
|
|
124
125
|
configureComposioMCPServer(serverConfig, tool.tenantId, tool.projectId, tool.credentialScope === "user" ? "user" : "project", userId);
|
|
125
|
-
|
|
126
|
+
const urlString = String(serverConfig.url);
|
|
127
|
+
if (isGithubWorkAppTool(tool) && isTrustedWorkAppMcpUrl(urlString, TRUSTED_WORK_APP_MCP_PATHS.github, env.INKEEP_AGENTS_API_URL)) serverConfig.headers = {
|
|
126
128
|
...serverConfig.headers,
|
|
127
129
|
"x-inkeep-tool-id": tool.id,
|
|
128
130
|
"x-inkeep-tenant-id": tool.tenantId,
|
|
129
131
|
"x-inkeep-project-id": tool.projectId,
|
|
130
132
|
Authorization: `Bearer ${env.GITHUB_MCP_API_KEY}`
|
|
131
133
|
};
|
|
132
|
-
if (isSlackWorkAppTool(tool)) serverConfig.headers = {
|
|
134
|
+
if (isSlackWorkAppTool(tool) && isTrustedWorkAppMcpUrl(urlString, TRUSTED_WORK_APP_MCP_PATHS.slack, env.INKEEP_AGENTS_API_URL)) serverConfig.headers = {
|
|
133
135
|
...serverConfig.headers,
|
|
134
136
|
"x-inkeep-tool-id": tool.id,
|
|
135
137
|
"x-inkeep-tenant-id": tool.tenantId,
|
|
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
|
|
|
40
40
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
41
41
|
encoding: "hex" | "base64";
|
|
42
42
|
signature: {
|
|
43
|
-
source: "query" | "
|
|
43
|
+
source: "query" | "header" | "body";
|
|
44
44
|
key: string;
|
|
45
45
|
prefix?: string | undefined;
|
|
46
46
|
regex?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
signedComponents: {
|
|
49
|
-
source: "literal" | "
|
|
49
|
+
source: "literal" | "header" | "body";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|