@inkeep/agents-core 0.55.2 → 0.56.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-schema.d.ts +107 -107
- package/dist/auth/auth-validation-schemas.d.ts +135 -135
- package/dist/auth/auth.d.ts +9 -9
- package/dist/auth/auth.js +2 -2
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +3 -3
- package/dist/data-access/index.js +3 -3
- package/dist/data-access/manage/agents.d.ts +25 -25
- package/dist/data-access/manage/agents.js +25 -11
- package/dist/data-access/manage/artifactComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +6 -6
- package/dist/data-access/manage/skills.d.ts +7 -7
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgentRelations.d.ts +4 -4
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +9 -9
- package/dist/data-access/manage/triggerCleanup.d.ts +12 -0
- package/dist/data-access/manage/triggerCleanup.js +51 -0
- package/dist/data-access/manage/triggers.d.ts +14 -3
- package/dist/data-access/manage/triggers.js +8 -1
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/data-access/runtime/conversations.d.ts +28 -28
- package/dist/data-access/runtime/messages.d.ts +15 -15
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +3 -3
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/data-access/runtime/users.d.ts +5 -1
- package/dist/data-access/runtime/users.js +14 -1
- package/dist/db/manage/manage-schema.d.ts +489 -451
- package/dist/db/manage/manage-schema.js +2 -0
- package/dist/db/runtime/runtime-schema.d.ts +294 -294
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas.d.ts +1788 -1619
- package/dist/validation/schemas.js +18 -5
- package/drizzle/manage/0012_petite_weapon_omega.sql +2 -0
- package/drizzle/manage/meta/0012_snapshot.json +3697 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/dist/auth/cleanup.d.ts +0 -12
- package/dist/auth/cleanup.js +0 -43
|
@@ -11,11 +11,7 @@ declare const getAgentById: (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
|
-
tenantId: string;
|
|
18
|
-
projectId: string;
|
|
19
15
|
models: {
|
|
20
16
|
base?: {
|
|
21
17
|
model?: string | undefined;
|
|
@@ -33,9 +29,13 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
33
29
|
stopWhen: {
|
|
34
30
|
transferCountIs?: number | undefined;
|
|
35
31
|
} | null;
|
|
36
|
-
|
|
32
|
+
createdAt: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
tenantId: string;
|
|
35
|
+
projectId: string;
|
|
37
36
|
defaultSubAgentId: string | null;
|
|
38
37
|
contextConfigId: string | null;
|
|
38
|
+
prompt: string | null;
|
|
39
39
|
statusUpdates: {
|
|
40
40
|
enabled?: boolean | undefined;
|
|
41
41
|
numEvents?: number | undefined;
|
|
@@ -57,11 +57,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
57
57
|
}) => Promise<{
|
|
58
58
|
id: string;
|
|
59
59
|
name: string;
|
|
60
|
-
createdAt: string;
|
|
61
|
-
updatedAt: string;
|
|
62
60
|
description: string | null;
|
|
63
|
-
tenantId: string;
|
|
64
|
-
projectId: string;
|
|
65
61
|
models: {
|
|
66
62
|
base?: {
|
|
67
63
|
model?: string | undefined;
|
|
@@ -79,9 +75,13 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
79
75
|
stopWhen: {
|
|
80
76
|
transferCountIs?: number | undefined;
|
|
81
77
|
} | null;
|
|
82
|
-
|
|
78
|
+
createdAt: string;
|
|
79
|
+
updatedAt: string;
|
|
80
|
+
tenantId: string;
|
|
81
|
+
projectId: string;
|
|
83
82
|
defaultSubAgentId: string | null;
|
|
84
83
|
contextConfigId: string | null;
|
|
84
|
+
prompt: string | null;
|
|
85
85
|
statusUpdates: {
|
|
86
86
|
enabled?: boolean | undefined;
|
|
87
87
|
numEvents?: number | undefined;
|
|
@@ -100,11 +100,7 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
100
100
|
defaultSubAgent: {
|
|
101
101
|
id: string;
|
|
102
102
|
name: string;
|
|
103
|
-
createdAt: string;
|
|
104
|
-
updatedAt: string;
|
|
105
103
|
description: string | null;
|
|
106
|
-
tenantId: string;
|
|
107
|
-
projectId: string;
|
|
108
104
|
models: {
|
|
109
105
|
base?: {
|
|
110
106
|
model?: string | undefined;
|
|
@@ -122,8 +118,12 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
122
118
|
stopWhen: {
|
|
123
119
|
stepCountIs?: number | undefined;
|
|
124
120
|
} | null;
|
|
125
|
-
|
|
121
|
+
createdAt: string;
|
|
122
|
+
updatedAt: string;
|
|
123
|
+
tenantId: string;
|
|
124
|
+
projectId: string;
|
|
126
125
|
prompt: string | null;
|
|
126
|
+
agentId: string;
|
|
127
127
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
128
128
|
} | null;
|
|
129
129
|
} | null>;
|
|
@@ -132,11 +132,7 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
132
132
|
}) => Promise<{
|
|
133
133
|
id: string;
|
|
134
134
|
name: string;
|
|
135
|
-
createdAt: string;
|
|
136
|
-
updatedAt: string;
|
|
137
135
|
description: string | null;
|
|
138
|
-
tenantId: string;
|
|
139
|
-
projectId: string;
|
|
140
136
|
models: {
|
|
141
137
|
base?: {
|
|
142
138
|
model?: string | undefined;
|
|
@@ -154,9 +150,13 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
154
150
|
stopWhen: {
|
|
155
151
|
transferCountIs?: number | undefined;
|
|
156
152
|
} | null;
|
|
157
|
-
|
|
153
|
+
createdAt: string;
|
|
154
|
+
updatedAt: string;
|
|
155
|
+
tenantId: string;
|
|
156
|
+
projectId: string;
|
|
158
157
|
defaultSubAgentId: string | null;
|
|
159
158
|
contextConfigId: string | null;
|
|
159
|
+
prompt: string | null;
|
|
160
160
|
statusUpdates: {
|
|
161
161
|
enabled?: boolean | undefined;
|
|
162
162
|
numEvents?: number | undefined;
|
|
@@ -248,11 +248,7 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
248
248
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
249
249
|
id: string;
|
|
250
250
|
name: string;
|
|
251
|
-
createdAt: string;
|
|
252
|
-
updatedAt: string;
|
|
253
251
|
description: string | null;
|
|
254
|
-
tenantId: string;
|
|
255
|
-
projectId: string;
|
|
256
252
|
models: {
|
|
257
253
|
base?: {
|
|
258
254
|
model?: string | undefined;
|
|
@@ -270,9 +266,13 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
270
266
|
stopWhen: {
|
|
271
267
|
transferCountIs?: number | undefined;
|
|
272
268
|
} | null;
|
|
273
|
-
|
|
269
|
+
createdAt: string;
|
|
270
|
+
updatedAt: string;
|
|
271
|
+
tenantId: string;
|
|
272
|
+
projectId: string;
|
|
274
273
|
defaultSubAgentId: string | null;
|
|
275
274
|
contextConfigId: string | null;
|
|
275
|
+
prompt: string | null;
|
|
276
276
|
statusUpdates: {
|
|
277
277
|
enabled?: boolean | undefined;
|
|
278
278
|
numEvents?: number | undefined;
|
|
@@ -365,7 +365,10 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
365
365
|
id: agent.contextConfigId
|
|
366
366
|
});
|
|
367
367
|
} catch (error) {
|
|
368
|
-
|
|
368
|
+
agentsLogger.warn({
|
|
369
|
+
error,
|
|
370
|
+
contextConfigId: agent.contextConfigId
|
|
371
|
+
}, "Failed to retrieve contextConfig");
|
|
369
372
|
}
|
|
370
373
|
try {
|
|
371
374
|
await fetchComponentRelationships(db)({
|
|
@@ -386,7 +389,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
386
389
|
}
|
|
387
390
|
});
|
|
388
391
|
} catch (error) {
|
|
389
|
-
|
|
392
|
+
agentsLogger.warn({ error }, "Failed to retrieve dataComponents");
|
|
390
393
|
}
|
|
391
394
|
try {
|
|
392
395
|
await fetchComponentRelationships(db)({
|
|
@@ -407,7 +410,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
407
410
|
}
|
|
408
411
|
});
|
|
409
412
|
} catch (error) {
|
|
410
|
-
|
|
413
|
+
agentsLogger.warn({ error }, "Failed to retrieve artifactComponents");
|
|
411
414
|
}
|
|
412
415
|
const result = {
|
|
413
416
|
id: agent.id,
|
|
@@ -455,7 +458,10 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
455
458
|
stopWhen: agent$1.stopWhen
|
|
456
459
|
};
|
|
457
460
|
} catch (dbError) {
|
|
458
|
-
|
|
461
|
+
agentsLogger.warn({
|
|
462
|
+
error: dbError,
|
|
463
|
+
subAgentId
|
|
464
|
+
}, "Failed to persist stopWhen for agent");
|
|
459
465
|
}
|
|
460
466
|
}
|
|
461
467
|
}
|
|
@@ -463,7 +469,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
463
469
|
}
|
|
464
470
|
}
|
|
465
471
|
} catch (error) {
|
|
466
|
-
|
|
472
|
+
agentsLogger.warn({ error }, "Failed to apply agent stepCountIs inheritance");
|
|
467
473
|
}
|
|
468
474
|
try {
|
|
469
475
|
const usedToolIds = new Set(Object.values(agentsObject).flatMap((a) => Array.isArray(a?.canUse) ? a.canUse : []).map((ref) => ref?.toolId).filter(Boolean));
|
|
@@ -532,7 +538,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
532
538
|
result.functions = Object.fromEntries(functions);
|
|
533
539
|
}
|
|
534
540
|
} catch (error) {
|
|
535
|
-
|
|
541
|
+
agentsLogger.warn({ error }, "Failed to load tools/functions lookups");
|
|
536
542
|
}
|
|
537
543
|
try {
|
|
538
544
|
const triggersList = await listTriggers(db)({ scopes: {
|
|
@@ -540,7 +546,10 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
540
546
|
projectId,
|
|
541
547
|
agentId
|
|
542
548
|
} });
|
|
543
|
-
|
|
549
|
+
agentsLogger.debug({
|
|
550
|
+
agentId,
|
|
551
|
+
count: triggersList.length
|
|
552
|
+
}, "Fetched triggers for agent");
|
|
544
553
|
if (triggersList.length > 0) {
|
|
545
554
|
const triggersObject = {};
|
|
546
555
|
for (const trigger of triggersList) triggersObject[trigger.id] = {
|
|
@@ -553,13 +562,18 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
553
562
|
messageTemplate: trigger.messageTemplate,
|
|
554
563
|
authentication: trigger.authentication,
|
|
555
564
|
signingSecretCredentialReferenceId: trigger.signingSecretCredentialReferenceId,
|
|
556
|
-
signatureVerification: trigger.signatureVerification
|
|
565
|
+
signatureVerification: trigger.signatureVerification,
|
|
566
|
+
runAsUserId: trigger.runAsUserId,
|
|
567
|
+
createdBy: trigger.createdBy
|
|
557
568
|
};
|
|
558
569
|
result.triggers = triggersObject;
|
|
559
|
-
|
|
570
|
+
agentsLogger.debug({
|
|
571
|
+
agentId,
|
|
572
|
+
triggerIds: Object.keys(triggersObject)
|
|
573
|
+
}, "Added triggers to result");
|
|
560
574
|
}
|
|
561
575
|
} catch (error) {
|
|
562
|
-
|
|
576
|
+
agentsLogger.warn({ error }, "Failed to load triggers");
|
|
563
577
|
}
|
|
564
578
|
try {
|
|
565
579
|
const scheduledTriggersList = await listScheduledTriggers(db)({ scopes: {
|
|
@@ -588,7 +602,7 @@ const getFullAgentDefinitionInternal = (db) => async ({ scopes: { tenantId, proj
|
|
|
588
602
|
result.scheduledTriggers = scheduledTriggersObject;
|
|
589
603
|
}
|
|
590
604
|
} catch (error) {
|
|
591
|
-
|
|
605
|
+
agentsLogger.warn({ error }, "Failed to load scheduled triggers");
|
|
592
606
|
}
|
|
593
607
|
return result;
|
|
594
608
|
};
|
|
@@ -11,9 +11,9 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
+
description: string | null;
|
|
14
15
|
createdAt: string;
|
|
15
16
|
updatedAt: string;
|
|
16
|
-
description: string | null;
|
|
17
17
|
tenantId: string;
|
|
18
18
|
projectId: string;
|
|
19
19
|
props: {
|
|
@@ -67,9 +67,9 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
67
67
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
68
68
|
id: string;
|
|
69
69
|
name: string;
|
|
70
|
+
description: string | null;
|
|
70
71
|
createdAt: string;
|
|
71
72
|
updatedAt: string;
|
|
72
|
-
description: string | null;
|
|
73
73
|
tenantId: string;
|
|
74
74
|
projectId: string;
|
|
75
75
|
props: {
|
|
@@ -55,9 +55,9 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
55
55
|
}) => Promise<{
|
|
56
56
|
id: string;
|
|
57
57
|
name: string;
|
|
58
|
+
description: string | null;
|
|
58
59
|
createdAt: string;
|
|
59
60
|
updatedAt: string;
|
|
60
|
-
description: string | null;
|
|
61
61
|
tenantId: string;
|
|
62
62
|
projectId: string;
|
|
63
63
|
agentId: string;
|
|
@@ -97,9 +97,9 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
97
97
|
}) => Promise<{
|
|
98
98
|
id: string;
|
|
99
99
|
name: string;
|
|
100
|
+
description: string | null;
|
|
100
101
|
createdAt: string;
|
|
101
102
|
updatedAt: string;
|
|
102
|
-
description: string | null;
|
|
103
103
|
tenantId: string;
|
|
104
104
|
projectId: string;
|
|
105
105
|
agentId: string;
|
|
@@ -167,11 +167,11 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
167
167
|
tenantId: string;
|
|
168
168
|
projectId: string;
|
|
169
169
|
agentId: string;
|
|
170
|
-
subAgentId: string;
|
|
171
|
-
functionToolId: string;
|
|
172
170
|
toolPolicies: Record<string, {
|
|
173
171
|
needsApproval?: boolean;
|
|
174
172
|
}> | null;
|
|
173
|
+
subAgentId: string;
|
|
174
|
+
functionToolId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -232,11 +232,11 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
232
232
|
tenantId: string;
|
|
233
233
|
projectId: string;
|
|
234
234
|
agentId: string;
|
|
235
|
-
subAgentId: string;
|
|
236
|
-
functionToolId: string;
|
|
237
235
|
toolPolicies: Record<string, {
|
|
238
236
|
needsApproval?: boolean;
|
|
239
237
|
}> | null;
|
|
238
|
+
subAgentId: string;
|
|
239
|
+
functionToolId: string;
|
|
240
240
|
}>;
|
|
241
241
|
//#endregion
|
|
242
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -10,12 +10,12 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
+
description: string;
|
|
13
14
|
createdAt: string;
|
|
14
15
|
updatedAt: string;
|
|
15
|
-
metadata: Record<string, string> | null;
|
|
16
|
-
description: string;
|
|
17
16
|
tenantId: string;
|
|
18
17
|
projectId: 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
|
+
description: string;
|
|
46
47
|
createdAt: string;
|
|
47
48
|
updatedAt: string;
|
|
48
|
-
metadata: Record<string, string> | null;
|
|
49
|
-
description: string;
|
|
50
49
|
tenantId: string;
|
|
51
50
|
projectId: 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
|
+
description: string;
|
|
57
58
|
createdAt: string;
|
|
58
59
|
updatedAt: string;
|
|
59
|
-
metadata: Record<string, string> | null;
|
|
60
|
-
description: string;
|
|
61
60
|
tenantId: string;
|
|
62
61
|
projectId: string;
|
|
62
|
+
metadata: Record<string, string> | null;
|
|
63
63
|
content: string;
|
|
64
64
|
}>;
|
|
65
65
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -98,9 +98,9 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
98
98
|
projectId: string;
|
|
99
99
|
agentId: string;
|
|
100
100
|
subAgentId: string;
|
|
101
|
-
skillId: string;
|
|
102
101
|
index: number;
|
|
103
102
|
alwaysLoaded: boolean;
|
|
103
|
+
skillId: string;
|
|
104
104
|
}>;
|
|
105
105
|
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
106
106
|
scopes: AgentScopeConfig;
|
|
@@ -15,9 +15,9 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
15
15
|
tenantId: string;
|
|
16
16
|
projectId: string;
|
|
17
17
|
agentId: string;
|
|
18
|
-
subAgentId: string;
|
|
19
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;
|
|
@@ -50,9 +50,9 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
50
50
|
tenantId: string;
|
|
51
51
|
projectId: string;
|
|
52
52
|
agentId: string;
|
|
53
|
-
subAgentId: string;
|
|
54
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;
|
|
@@ -63,9 +63,9 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
|
|
|
63
63
|
tenantId: string;
|
|
64
64
|
projectId: string;
|
|
65
65
|
agentId: string;
|
|
66
|
-
subAgentId: string;
|
|
67
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;
|
|
@@ -186,9 +186,9 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
186
186
|
tenantId: string;
|
|
187
187
|
projectId: string;
|
|
188
188
|
agentId: string;
|
|
189
|
-
subAgentId: string;
|
|
190
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
|
|
@@ -203,9 +203,9 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
203
203
|
tenantId: string;
|
|
204
204
|
projectId: string;
|
|
205
205
|
agentId: string;
|
|
206
|
-
subAgentId: string;
|
|
207
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)
|
|
@@ -224,9 +224,9 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
224
224
|
tenantId: string;
|
|
225
225
|
projectId: string;
|
|
226
226
|
agentId: string;
|
|
227
|
-
subAgentId: string;
|
|
228
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;
|
|
@@ -210,12 +210,12 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
210
210
|
tenantId: string;
|
|
211
211
|
projectId: string;
|
|
212
212
|
agentId: string;
|
|
213
|
-
subAgentId: string;
|
|
214
|
-
headers: Record<string, string> | null;
|
|
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: {
|
|
@@ -254,12 +254,12 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
254
254
|
tenantId: string;
|
|
255
255
|
projectId: string;
|
|
256
256
|
agentId: string;
|
|
257
|
-
subAgentId: string;
|
|
258
|
-
headers: Record<string, string> | null;
|
|
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: {
|
|
@@ -15,8 +15,8 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
15
15
|
tenantId: string;
|
|
16
16
|
projectId: string;
|
|
17
17
|
agentId: string;
|
|
18
|
-
subAgentId: string;
|
|
19
18
|
headers: Record<string, string> | null;
|
|
19
|
+
subAgentId: string;
|
|
20
20
|
targetAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -50,8 +50,8 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
50
50
|
tenantId: string;
|
|
51
51
|
projectId: string;
|
|
52
52
|
agentId: string;
|
|
53
|
-
subAgentId: string;
|
|
54
53
|
headers: Record<string, string> | null;
|
|
54
|
+
subAgentId: string;
|
|
55
55
|
targetAgentId: string;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -63,8 +63,8 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
|
|
|
63
63
|
tenantId: string;
|
|
64
64
|
projectId: string;
|
|
65
65
|
agentId: string;
|
|
66
|
-
subAgentId: string;
|
|
67
66
|
headers: Record<string, string> | null;
|
|
67
|
+
subAgentId: string;
|
|
68
68
|
targetAgentId: string;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -216,8 +216,8 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
216
216
|
tenantId: string;
|
|
217
217
|
projectId: string;
|
|
218
218
|
agentId: string;
|
|
219
|
-
subAgentId: string;
|
|
220
219
|
headers: Record<string, string> | null;
|
|
220
|
+
subAgentId: string;
|
|
221
221
|
targetAgentId: string;
|
|
222
222
|
}>;
|
|
223
223
|
/**
|
|
@@ -233,8 +233,8 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
233
233
|
tenantId: string;
|
|
234
234
|
projectId: string;
|
|
235
235
|
agentId: string;
|
|
236
|
-
subAgentId: string;
|
|
237
236
|
headers: Record<string, string> | null;
|
|
237
|
+
subAgentId: string;
|
|
238
238
|
targetAgentId: string;
|
|
239
239
|
} | undefined>;
|
|
240
240
|
/**
|
|
@@ -254,8 +254,8 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
254
254
|
tenantId: string;
|
|
255
255
|
projectId: string;
|
|
256
256
|
agentId: string;
|
|
257
|
-
subAgentId: string;
|
|
258
257
|
headers: Record<string, string> | null;
|
|
258
|
+
subAgentId: string;
|
|
259
259
|
targetAgentId: string;
|
|
260
260
|
}>;
|
|
261
261
|
declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -11,11 +11,7 @@ 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
|
-
tenantId: string;
|
|
18
|
-
projectId: string;
|
|
19
15
|
models: {
|
|
20
16
|
base?: {
|
|
21
17
|
model?: string | undefined;
|
|
@@ -33,8 +29,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
33
29
|
stopWhen: {
|
|
34
30
|
stepCountIs?: number | undefined;
|
|
35
31
|
} | null;
|
|
36
|
-
|
|
32
|
+
createdAt: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
tenantId: string;
|
|
35
|
+
projectId: string;
|
|
37
36
|
prompt: string | null;
|
|
37
|
+
agentId: string;
|
|
38
38
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -42,11 +42,7 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
42
42
|
}) => Promise<{
|
|
43
43
|
id: string;
|
|
44
44
|
name: string;
|
|
45
|
-
createdAt: string;
|
|
46
|
-
updatedAt: string;
|
|
47
45
|
description: string | null;
|
|
48
|
-
tenantId: string;
|
|
49
|
-
projectId: string;
|
|
50
46
|
models: {
|
|
51
47
|
base?: {
|
|
52
48
|
model?: string | undefined;
|
|
@@ -64,8 +60,12 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
64
60
|
stopWhen: {
|
|
65
61
|
stepCountIs?: number | undefined;
|
|
66
62
|
} | null;
|
|
67
|
-
|
|
63
|
+
createdAt: string;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
tenantId: string;
|
|
66
|
+
projectId: string;
|
|
68
67
|
prompt: string | null;
|
|
68
|
+
agentId: string;
|
|
69
69
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
70
70
|
}[]>;
|
|
71
71
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -111,11 +111,7 @@ 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
|
-
tenantId: string;
|
|
118
|
-
projectId: string;
|
|
119
115
|
models: {
|
|
120
116
|
base?: {
|
|
121
117
|
model?: string | undefined;
|
|
@@ -133,8 +129,12 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
133
129
|
stopWhen: {
|
|
134
130
|
stepCountIs?: number | undefined;
|
|
135
131
|
} | null;
|
|
136
|
-
|
|
132
|
+
createdAt: string;
|
|
133
|
+
updatedAt: string;
|
|
134
|
+
tenantId: string;
|
|
135
|
+
projectId: string;
|
|
137
136
|
prompt: string | null;
|
|
137
|
+
agentId: string;
|
|
138
138
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
139
139
|
}>;
|
|
140
140
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -21,9 +21,9 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
21
21
|
}) => Promise<{
|
|
22
22
|
id: string;
|
|
23
23
|
name: string;
|
|
24
|
+
description: string | null;
|
|
24
25
|
createdAt: string;
|
|
25
26
|
updatedAt: string;
|
|
26
|
-
description: string | null;
|
|
27
27
|
tenantId: string;
|
|
28
28
|
projectId: string;
|
|
29
29
|
headers: Record<string, string> | null;
|
|
@@ -79,9 +79,9 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
79
79
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
80
80
|
id: string;
|
|
81
81
|
name: string;
|
|
82
|
+
description: string | null;
|
|
82
83
|
createdAt: string;
|
|
83
84
|
updatedAt: string;
|
|
84
|
-
description: string | null;
|
|
85
85
|
tenantId: string;
|
|
86
86
|
projectId: string;
|
|
87
87
|
headers: Record<string, string> | null;
|
|
@@ -140,12 +140,12 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
140
140
|
tenantId: string;
|
|
141
141
|
projectId: string;
|
|
142
142
|
agentId: string;
|
|
143
|
-
subAgentId: string;
|
|
144
|
-
headers: Record<string, string> | null;
|
|
145
143
|
toolId: string;
|
|
144
|
+
headers: Record<string, string> | null;
|
|
146
145
|
toolPolicies: Record<string, {
|
|
147
146
|
needsApproval?: boolean;
|
|
148
147
|
}> | null;
|
|
148
|
+
subAgentId: string;
|
|
149
149
|
selectedTools: string[] | null;
|
|
150
150
|
}>;
|
|
151
151
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -159,12 +159,12 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
159
159
|
tenantId: string;
|
|
160
160
|
projectId: string;
|
|
161
161
|
agentId: string;
|
|
162
|
-
subAgentId: string;
|
|
163
|
-
headers: Record<string, string> | null;
|
|
164
162
|
toolId: string;
|
|
163
|
+
headers: Record<string, string> | null;
|
|
165
164
|
toolPolicies: Record<string, {
|
|
166
165
|
needsApproval?: boolean;
|
|
167
166
|
}> | null;
|
|
167
|
+
subAgentId: string;
|
|
168
168
|
selectedTools: string[] | null;
|
|
169
169
|
}>;
|
|
170
170
|
/**
|
|
@@ -187,12 +187,12 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
187
187
|
tenantId: string;
|
|
188
188
|
projectId: string;
|
|
189
189
|
agentId: string;
|
|
190
|
-
subAgentId: string;
|
|
191
|
-
headers: Record<string, string> | null;
|
|
192
190
|
toolId: string;
|
|
191
|
+
headers: Record<string, string> | null;
|
|
193
192
|
toolPolicies: Record<string, {
|
|
194
193
|
needsApproval?: boolean;
|
|
195
194
|
}> | null;
|
|
195
|
+
subAgentId: string;
|
|
196
196
|
selectedTools: string[] | null;
|
|
197
197
|
}>;
|
|
198
198
|
/**
|
|
@@ -203,9 +203,9 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
203
203
|
}) => Promise<{
|
|
204
204
|
id: string;
|
|
205
205
|
name: string;
|
|
206
|
+
description: string | null;
|
|
206
207
|
createdAt: string;
|
|
207
208
|
updatedAt: string;
|
|
208
|
-
description: string | null;
|
|
209
209
|
tenantId: string;
|
|
210
210
|
projectId: string;
|
|
211
211
|
headers: Record<string, string> | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
2
|
+
import { Pool } from "pg";
|
|
3
|
+
|
|
4
|
+
//#region src/data-access/manage/triggerCleanup.d.ts
|
|
5
|
+
declare function cleanupUserTriggers(params: {
|
|
6
|
+
tenantId: string;
|
|
7
|
+
userId: string;
|
|
8
|
+
runDb: AgentsRunDatabaseClient;
|
|
9
|
+
manageDbPool: Pool;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { cleanupUserTriggers };
|