@inkeep/agents-core 0.0.0-dev-20260406151446 → 0.0.0-dev-20260406161920
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 +108 -108
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/permissions.d.ts +9 -9
- 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 +21 -21
- package/dist/data-access/manage/artifactComponents.d.ts +6 -6
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +6 -6
- package/dist/data-access/manage/projectLifecycle.d.ts +6 -6
- package/dist/data-access/manage/projectLifecycle.js +42 -21
- package/dist/data-access/manage/skills.d.ts +10 -10
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +18 -18
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +8 -8
- package/dist/data-access/runtime/cascade-delete.d.ts +2 -3
- package/dist/data-access/runtime/cascade-delete.js +10 -10
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/dolt-safe-jsonb.d.ts +2 -2
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +395 -395
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +37 -37
- package/dist/validation/schemas.d.ts +1910 -1910
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getLogger } from "../../utils/logger.js";
|
|
2
|
-
import { doltBranch, doltBranchExists, doltCheckout, doltDeleteBranch } from "../../dolt/branch.js";
|
|
2
|
+
import { doltBranch, doltBranchExists, doltCheckout, doltDeleteBranch, doltListBranches } from "../../dolt/branch.js";
|
|
3
3
|
import { createProjectMetadata, deleteProjectMetadata, getProjectMetadata, listProjectsMetadataPaginated } from "../runtime/projects.js";
|
|
4
4
|
import { sql } from "drizzle-orm";
|
|
5
5
|
|
|
@@ -66,11 +66,11 @@ const createProjectMetadataAndBranch = (runDb, configDb) => async (params) => {
|
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
* Delete a project and its
|
|
69
|
+
* Delete a project and ALL its branches
|
|
70
70
|
*
|
|
71
71
|
* This utility:
|
|
72
|
-
* 1. Gets the project from runtime DB
|
|
73
|
-
* 2.
|
|
72
|
+
* 1. Gets the project from runtime DB
|
|
73
|
+
* 2. Lists and deletes ALL branches matching the project prefix from config DB (Doltgres)
|
|
74
74
|
* 3. Deletes the project record from runtime DB
|
|
75
75
|
*
|
|
76
76
|
* Note: Callers should handle cascade deletion of runtime entities (conversations, etc.)
|
|
@@ -79,36 +79,58 @@ const createProjectMetadataAndBranch = (runDb, configDb) => async (params) => {
|
|
|
79
79
|
* @param runDb - Runtime database client (Postgres)
|
|
80
80
|
* @param configDb - Config database client (Doltgres)
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const deleteProjectAndBranches = (runDb, configDb) => async (params) => {
|
|
83
83
|
const { tenantId, projectId } = params;
|
|
84
84
|
logger.info({
|
|
85
85
|
tenantId,
|
|
86
86
|
projectId
|
|
87
|
-
}, "Deleting project with
|
|
88
|
-
|
|
87
|
+
}, "Deleting project with all branches");
|
|
88
|
+
if (!await getProjectMetadata(runDb)({
|
|
89
89
|
tenantId,
|
|
90
90
|
projectId
|
|
91
|
-
})
|
|
92
|
-
if (!project) {
|
|
91
|
+
})) {
|
|
93
92
|
logger.warn({
|
|
94
93
|
tenantId,
|
|
95
94
|
projectId
|
|
96
95
|
}, "Project not found in runtime DB");
|
|
97
96
|
return false;
|
|
98
97
|
}
|
|
99
|
-
const { mainBranchName } = project;
|
|
100
98
|
try {
|
|
101
99
|
await doltCheckout(configDb)({ branch: "main" });
|
|
102
|
-
await
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
const allBranches = await doltListBranches(configDb)();
|
|
101
|
+
const prefix = `${tenantId}_${projectId}_`;
|
|
102
|
+
const projectBranches = allBranches.filter((b) => b.name.startsWith(prefix));
|
|
103
|
+
const failedBranches = [];
|
|
104
|
+
for (const branch of projectBranches) try {
|
|
105
|
+
await doltDeleteBranch(configDb)({
|
|
106
|
+
name: branch.name,
|
|
107
|
+
force: true
|
|
108
|
+
});
|
|
109
|
+
logger.debug({ branchName: branch.name }, "Deleted project branch");
|
|
110
|
+
} catch (error) {
|
|
111
|
+
failedBranches.push(branch.name);
|
|
112
|
+
logger.error({
|
|
113
|
+
error,
|
|
114
|
+
branchName: branch.name
|
|
115
|
+
}, "Failed to delete project branch, continuing with remaining branches");
|
|
116
|
+
}
|
|
117
|
+
if (failedBranches.length > 0) logger.warn({
|
|
118
|
+
tenantId,
|
|
119
|
+
projectId,
|
|
120
|
+
failedBranches,
|
|
121
|
+
successCount: projectBranches.length - failedBranches.length
|
|
122
|
+
}, "Some project branches could not be deleted");
|
|
123
|
+
else logger.info({
|
|
124
|
+
tenantId,
|
|
125
|
+
projectId,
|
|
126
|
+
branchCount: projectBranches.length
|
|
127
|
+
}, "Deleted all project branches");
|
|
107
128
|
} catch (error) {
|
|
108
129
|
logger.error({
|
|
109
130
|
error,
|
|
110
|
-
|
|
111
|
-
|
|
131
|
+
tenantId,
|
|
132
|
+
projectId
|
|
133
|
+
}, "Failed to list/delete project branches, continuing with runtime cleanup");
|
|
112
134
|
}
|
|
113
135
|
const deleted = await deleteProjectMetadata(runDb)({
|
|
114
136
|
tenantId,
|
|
@@ -116,9 +138,8 @@ const deleteProjectWithBranch = (runDb, configDb) => async (params) => {
|
|
|
116
138
|
});
|
|
117
139
|
if (deleted) logger.info({
|
|
118
140
|
tenantId,
|
|
119
|
-
projectId
|
|
120
|
-
|
|
121
|
-
}, "Successfully deleted project with branch");
|
|
141
|
+
projectId
|
|
142
|
+
}, "Successfully deleted project with all branches");
|
|
122
143
|
else logger.warn({
|
|
123
144
|
tenantId,
|
|
124
145
|
projectId
|
|
@@ -231,4 +252,4 @@ const getProjectWithMetadata = (runDb, configDb) => async (params) => {
|
|
|
231
252
|
};
|
|
232
253
|
|
|
233
254
|
//#endregion
|
|
234
|
-
export { createProjectMetadataAndBranch,
|
|
255
|
+
export { createProjectMetadataAndBranch, deleteProjectAndBranches, getProjectMainBranchName, getProjectWithBranchInfo, getProjectWithMetadata, listProjectsWithMetadataPaginated };
|
|
@@ -17,13 +17,13 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
17
17
|
}) => Promise<{
|
|
18
18
|
id: string;
|
|
19
19
|
name: string;
|
|
20
|
+
description: string;
|
|
20
21
|
createdAt: string;
|
|
21
22
|
updatedAt: string;
|
|
22
|
-
metadata: Record<string, string> | null;
|
|
23
|
-
description: string;
|
|
24
|
-
content: string;
|
|
25
|
-
projectId: string;
|
|
26
23
|
tenantId: string;
|
|
24
|
+
projectId: string;
|
|
25
|
+
content: string;
|
|
26
|
+
metadata: Record<string, string> | null;
|
|
27
27
|
} | null>;
|
|
28
28
|
declare const getSkillByIdWithFiles: (db: AgentsManageDatabaseClient) => (params: {
|
|
29
29
|
scopes: ProjectScopeConfig;
|
|
@@ -112,13 +112,13 @@ declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiIn
|
|
|
112
112
|
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillApiInsert & WithTenantIdProjectId) => Promise<{
|
|
113
113
|
id: string;
|
|
114
114
|
name: string;
|
|
115
|
+
description: string;
|
|
115
116
|
createdAt: string;
|
|
116
117
|
updatedAt: string;
|
|
117
|
-
metadata: Record<string, string> | null;
|
|
118
|
-
description: string;
|
|
119
|
-
content: string;
|
|
120
|
-
projectId: string;
|
|
121
118
|
tenantId: string;
|
|
119
|
+
projectId: string;
|
|
120
|
+
content: string;
|
|
121
|
+
metadata: Record<string, string> | null;
|
|
122
122
|
}>;
|
|
123
123
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
124
124
|
scopes: ProjectScopeConfig;
|
|
@@ -142,13 +142,13 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
142
142
|
id: string;
|
|
143
143
|
createdAt: string;
|
|
144
144
|
updatedAt: string;
|
|
145
|
-
projectId: string;
|
|
146
145
|
tenantId: string;
|
|
146
|
+
projectId: string;
|
|
147
147
|
agentId: string;
|
|
148
148
|
skillId: string;
|
|
149
|
-
subAgentId: string;
|
|
150
149
|
index: number;
|
|
151
150
|
alwaysLoaded: boolean;
|
|
151
|
+
subAgentId: string;
|
|
152
152
|
}>;
|
|
153
153
|
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
154
154
|
scopes: AgentScopeConfig;
|
|
@@ -12,11 +12,11 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
projectId: string;
|
|
16
15
|
tenantId: string;
|
|
16
|
+
projectId: string;
|
|
17
17
|
agentId: string;
|
|
18
|
-
headers: Record<string, string> | null;
|
|
19
18
|
subAgentId: string;
|
|
19
|
+
headers: Record<string, string> | null;
|
|
20
20
|
externalAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -47,11 +47,11 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
47
47
|
id: string;
|
|
48
48
|
createdAt: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
projectId: string;
|
|
51
50
|
tenantId: string;
|
|
51
|
+
projectId: string;
|
|
52
52
|
agentId: string;
|
|
53
|
-
headers: Record<string, string> | null;
|
|
54
53
|
subAgentId: string;
|
|
54
|
+
headers: Record<string, string> | null;
|
|
55
55
|
externalAgentId: string;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -60,11 +60,11 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
|
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
|
-
projectId: string;
|
|
64
63
|
tenantId: string;
|
|
64
|
+
projectId: string;
|
|
65
65
|
agentId: string;
|
|
66
|
-
headers: Record<string, string> | null;
|
|
67
66
|
subAgentId: string;
|
|
67
|
+
headers: Record<string, string> | null;
|
|
68
68
|
externalAgentId: string;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -189,11 +189,11 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
189
189
|
id: string;
|
|
190
190
|
createdAt: string;
|
|
191
191
|
updatedAt: string;
|
|
192
|
-
projectId: string;
|
|
193
192
|
tenantId: string;
|
|
193
|
+
projectId: string;
|
|
194
194
|
agentId: string;
|
|
195
|
-
headers: Record<string, string> | null;
|
|
196
195
|
subAgentId: string;
|
|
196
|
+
headers: Record<string, string> | null;
|
|
197
197
|
externalAgentId: string;
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
@@ -206,11 +206,11 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
206
206
|
id: string;
|
|
207
207
|
createdAt: string;
|
|
208
208
|
updatedAt: string;
|
|
209
|
-
projectId: string;
|
|
210
209
|
tenantId: string;
|
|
210
|
+
projectId: string;
|
|
211
211
|
agentId: string;
|
|
212
|
-
headers: Record<string, string> | null;
|
|
213
212
|
subAgentId: string;
|
|
213
|
+
headers: Record<string, string> | null;
|
|
214
214
|
externalAgentId: string;
|
|
215
215
|
} | undefined>;
|
|
216
216
|
/**
|
|
@@ -227,11 +227,11 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
227
227
|
id: string;
|
|
228
228
|
createdAt: string;
|
|
229
229
|
updatedAt: string;
|
|
230
|
-
projectId: string;
|
|
231
230
|
tenantId: string;
|
|
231
|
+
projectId: string;
|
|
232
232
|
agentId: string;
|
|
233
|
-
headers: Record<string, string> | null;
|
|
234
233
|
subAgentId: string;
|
|
234
|
+
headers: Record<string, string> | null;
|
|
235
235
|
externalAgentId: string;
|
|
236
236
|
}>;
|
|
237
237
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -12,8 +12,8 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
projectId: string;
|
|
16
15
|
tenantId: string;
|
|
16
|
+
projectId: string;
|
|
17
17
|
agentId: string;
|
|
18
18
|
sourceSubAgentId: string;
|
|
19
19
|
targetSubAgentId: string | null;
|
|
@@ -47,8 +47,8 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
47
47
|
id: string;
|
|
48
48
|
createdAt: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
projectId: string;
|
|
51
50
|
tenantId: string;
|
|
51
|
+
projectId: string;
|
|
52
52
|
agentId: string;
|
|
53
53
|
sourceSubAgentId: string;
|
|
54
54
|
targetSubAgentId: string | null;
|
|
@@ -60,8 +60,8 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
|
-
projectId: string;
|
|
64
63
|
tenantId: string;
|
|
64
|
+
projectId: string;
|
|
65
65
|
agentId: string;
|
|
66
66
|
sourceSubAgentId: string;
|
|
67
67
|
targetSubAgentId: string | null;
|
|
@@ -129,8 +129,8 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
129
129
|
id: string;
|
|
130
130
|
createdAt: string;
|
|
131
131
|
updatedAt: string;
|
|
132
|
-
projectId: string;
|
|
133
132
|
tenantId: string;
|
|
133
|
+
projectId: string;
|
|
134
134
|
agentId: string;
|
|
135
135
|
sourceSubAgentId: string;
|
|
136
136
|
targetSubAgentId: string | null;
|
|
@@ -148,8 +148,8 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
148
148
|
id: string;
|
|
149
149
|
createdAt: string;
|
|
150
150
|
updatedAt: string;
|
|
151
|
-
projectId: string;
|
|
152
151
|
tenantId: string;
|
|
152
|
+
projectId: string;
|
|
153
153
|
agentId: string;
|
|
154
154
|
sourceSubAgentId: string;
|
|
155
155
|
targetSubAgentId: string | null;
|
|
@@ -162,8 +162,8 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
162
162
|
id: string;
|
|
163
163
|
createdAt: string;
|
|
164
164
|
updatedAt: string;
|
|
165
|
-
projectId: string;
|
|
166
165
|
tenantId: string;
|
|
166
|
+
projectId: string;
|
|
167
167
|
agentId: string;
|
|
168
168
|
sourceSubAgentId: string;
|
|
169
169
|
targetSubAgentId: string | null;
|
|
@@ -207,12 +207,12 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
207
207
|
id: string;
|
|
208
208
|
createdAt: string;
|
|
209
209
|
updatedAt: string;
|
|
210
|
-
projectId: string;
|
|
211
210
|
tenantId: string;
|
|
211
|
+
projectId: string;
|
|
212
212
|
agentId: string;
|
|
213
|
-
headers: Record<string, string> | null;
|
|
214
|
-
subAgentId: string;
|
|
215
213
|
toolId: string;
|
|
214
|
+
subAgentId: string;
|
|
215
|
+
headers: Record<string, string> | null;
|
|
216
216
|
selectedTools: string[] | null;
|
|
217
217
|
toolPolicies: Record<string, {
|
|
218
218
|
needsApproval?: boolean;
|
|
@@ -251,12 +251,12 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
251
251
|
id: string;
|
|
252
252
|
createdAt: string;
|
|
253
253
|
updatedAt: string;
|
|
254
|
-
projectId: string;
|
|
255
254
|
tenantId: string;
|
|
255
|
+
projectId: string;
|
|
256
256
|
agentId: string;
|
|
257
|
-
headers: Record<string, string> | null;
|
|
258
|
-
subAgentId: string;
|
|
259
257
|
toolId: string;
|
|
258
|
+
subAgentId: string;
|
|
259
|
+
headers: Record<string, string> | null;
|
|
260
260
|
selectedTools: string[] | null;
|
|
261
261
|
toolPolicies: Record<string, {
|
|
262
262
|
needsApproval?: boolean;
|
|
@@ -12,11 +12,11 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
projectId: string;
|
|
16
15
|
tenantId: string;
|
|
16
|
+
projectId: string;
|
|
17
17
|
agentId: string;
|
|
18
|
-
headers: Record<string, string> | null;
|
|
19
18
|
subAgentId: string;
|
|
19
|
+
headers: Record<string, string> | null;
|
|
20
20
|
targetAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -47,11 +47,11 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
47
47
|
id: string;
|
|
48
48
|
createdAt: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
projectId: string;
|
|
51
50
|
tenantId: string;
|
|
51
|
+
projectId: string;
|
|
52
52
|
agentId: string;
|
|
53
|
-
headers: Record<string, string> | null;
|
|
54
53
|
subAgentId: string;
|
|
54
|
+
headers: Record<string, string> | null;
|
|
55
55
|
targetAgentId: string;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -60,11 +60,11 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
|
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
|
-
projectId: string;
|
|
64
63
|
tenantId: string;
|
|
64
|
+
projectId: string;
|
|
65
65
|
agentId: string;
|
|
66
|
-
headers: Record<string, string> | null;
|
|
67
66
|
subAgentId: string;
|
|
67
|
+
headers: Record<string, string> | null;
|
|
68
68
|
targetAgentId: string;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -225,11 +225,11 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
225
225
|
id: string;
|
|
226
226
|
createdAt: string;
|
|
227
227
|
updatedAt: string;
|
|
228
|
-
projectId: string;
|
|
229
228
|
tenantId: string;
|
|
229
|
+
projectId: string;
|
|
230
230
|
agentId: string;
|
|
231
|
-
headers: Record<string, string> | null;
|
|
232
231
|
subAgentId: string;
|
|
232
|
+
headers: Record<string, string> | null;
|
|
233
233
|
targetAgentId: string;
|
|
234
234
|
}>;
|
|
235
235
|
/**
|
|
@@ -242,11 +242,11 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
242
242
|
id: string;
|
|
243
243
|
createdAt: string;
|
|
244
244
|
updatedAt: string;
|
|
245
|
-
projectId: string;
|
|
246
245
|
tenantId: string;
|
|
246
|
+
projectId: string;
|
|
247
247
|
agentId: string;
|
|
248
|
-
headers: Record<string, string> | null;
|
|
249
248
|
subAgentId: string;
|
|
249
|
+
headers: Record<string, string> | null;
|
|
250
250
|
targetAgentId: string;
|
|
251
251
|
} | undefined>;
|
|
252
252
|
/**
|
|
@@ -263,11 +263,11 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
263
263
|
id: string;
|
|
264
264
|
createdAt: string;
|
|
265
265
|
updatedAt: string;
|
|
266
|
-
projectId: string;
|
|
267
266
|
tenantId: string;
|
|
267
|
+
projectId: string;
|
|
268
268
|
agentId: string;
|
|
269
|
-
headers: Record<string, string> | null;
|
|
270
269
|
subAgentId: string;
|
|
270
|
+
headers: Record<string, string> | null;
|
|
271
271
|
targetAgentId: string;
|
|
272
272
|
}>;
|
|
273
273
|
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
|
-
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
15
|
models: {
|
|
20
16
|
base?: {
|
|
21
17
|
model?: string | undefined;
|
|
@@ -39,8 +35,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
39
35
|
stopWhen: {
|
|
40
36
|
stepCountIs?: number | undefined;
|
|
41
37
|
} | null;
|
|
42
|
-
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
tenantId: string;
|
|
43
41
|
prompt: string | null;
|
|
42
|
+
projectId: string;
|
|
43
|
+
agentId: string;
|
|
44
44
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
45
45
|
} | undefined>;
|
|
46
46
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -48,11 +48,7 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
48
48
|
}) => Promise<{
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
-
createdAt: string;
|
|
52
|
-
updatedAt: string;
|
|
53
51
|
description: string | null;
|
|
54
|
-
projectId: string;
|
|
55
|
-
tenantId: string;
|
|
56
52
|
models: {
|
|
57
53
|
base?: {
|
|
58
54
|
model?: string | undefined;
|
|
@@ -76,8 +72,12 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
76
72
|
stopWhen: {
|
|
77
73
|
stepCountIs?: number | undefined;
|
|
78
74
|
} | null;
|
|
79
|
-
|
|
75
|
+
createdAt: string;
|
|
76
|
+
updatedAt: string;
|
|
77
|
+
tenantId: string;
|
|
80
78
|
prompt: string | null;
|
|
79
|
+
projectId: string;
|
|
80
|
+
agentId: string;
|
|
81
81
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
82
82
|
}[]>;
|
|
83
83
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -129,11 +129,7 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
129
129
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
130
130
|
id: string;
|
|
131
131
|
name: string;
|
|
132
|
-
createdAt: string;
|
|
133
|
-
updatedAt: string;
|
|
134
132
|
description: string | null;
|
|
135
|
-
projectId: string;
|
|
136
|
-
tenantId: string;
|
|
137
133
|
models: {
|
|
138
134
|
base?: {
|
|
139
135
|
model?: string | undefined;
|
|
@@ -157,8 +153,12 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
157
153
|
stopWhen: {
|
|
158
154
|
stepCountIs?: number | undefined;
|
|
159
155
|
} | null;
|
|
160
|
-
|
|
156
|
+
createdAt: string;
|
|
157
|
+
updatedAt: string;
|
|
158
|
+
tenantId: string;
|
|
161
159
|
prompt: string | null;
|
|
160
|
+
projectId: string;
|
|
161
|
+
agentId: string;
|
|
162
162
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
163
163
|
}>;
|
|
164
164
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -22,18 +22,18 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
+
description: string | null;
|
|
25
26
|
createdAt: string;
|
|
26
27
|
updatedAt: string;
|
|
27
|
-
description: string | null;
|
|
28
|
-
projectId: string;
|
|
29
28
|
tenantId: string;
|
|
30
|
-
|
|
29
|
+
projectId: string;
|
|
31
30
|
credentialReferenceId: string | null;
|
|
32
31
|
config: {
|
|
33
32
|
type: "mcp";
|
|
34
33
|
mcp: ToolMcpConfig;
|
|
35
34
|
};
|
|
36
35
|
credentialScope: string;
|
|
36
|
+
headers: Record<string, string> | null;
|
|
37
37
|
imageUrl: string | null;
|
|
38
38
|
capabilities: ToolServerCapabilities | null;
|
|
39
39
|
lastError: string | null;
|
|
@@ -80,18 +80,18 @@ 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
|
+
description: string | null;
|
|
83
84
|
createdAt: string;
|
|
84
85
|
updatedAt: string;
|
|
85
|
-
description: string | null;
|
|
86
|
-
projectId: string;
|
|
87
86
|
tenantId: string;
|
|
88
|
-
|
|
87
|
+
projectId: string;
|
|
89
88
|
credentialReferenceId: string | null;
|
|
90
89
|
config: {
|
|
91
90
|
type: "mcp";
|
|
92
91
|
mcp: ToolMcpConfig;
|
|
93
92
|
};
|
|
94
93
|
credentialScope: string;
|
|
94
|
+
headers: Record<string, string> | null;
|
|
95
95
|
imageUrl: string | null;
|
|
96
96
|
capabilities: ToolServerCapabilities | null;
|
|
97
97
|
lastError: string | null;
|
|
@@ -138,12 +138,12 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
138
138
|
id: string;
|
|
139
139
|
createdAt: string;
|
|
140
140
|
updatedAt: string;
|
|
141
|
-
projectId: string;
|
|
142
141
|
tenantId: string;
|
|
142
|
+
projectId: string;
|
|
143
143
|
agentId: string;
|
|
144
|
-
headers: Record<string, string> | null;
|
|
145
|
-
subAgentId: string;
|
|
146
144
|
toolId: string;
|
|
145
|
+
subAgentId: string;
|
|
146
|
+
headers: Record<string, string> | null;
|
|
147
147
|
selectedTools: string[] | null;
|
|
148
148
|
toolPolicies: Record<string, {
|
|
149
149
|
needsApproval?: boolean;
|
|
@@ -157,12 +157,12 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
157
157
|
id: string;
|
|
158
158
|
createdAt: string;
|
|
159
159
|
updatedAt: string;
|
|
160
|
-
projectId: string;
|
|
161
160
|
tenantId: string;
|
|
161
|
+
projectId: string;
|
|
162
162
|
agentId: string;
|
|
163
|
-
headers: Record<string, string> | null;
|
|
164
|
-
subAgentId: string;
|
|
165
163
|
toolId: string;
|
|
164
|
+
subAgentId: string;
|
|
165
|
+
headers: Record<string, string> | null;
|
|
166
166
|
selectedTools: string[] | null;
|
|
167
167
|
toolPolicies: Record<string, {
|
|
168
168
|
needsApproval?: boolean;
|
|
@@ -185,12 +185,12 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
185
185
|
id: string;
|
|
186
186
|
createdAt: string;
|
|
187
187
|
updatedAt: string;
|
|
188
|
-
projectId: string;
|
|
189
188
|
tenantId: string;
|
|
189
|
+
projectId: string;
|
|
190
190
|
agentId: string;
|
|
191
|
-
headers: Record<string, string> | null;
|
|
192
|
-
subAgentId: string;
|
|
193
191
|
toolId: string;
|
|
192
|
+
subAgentId: string;
|
|
193
|
+
headers: Record<string, string> | null;
|
|
194
194
|
selectedTools: string[] | null;
|
|
195
195
|
toolPolicies: Record<string, {
|
|
196
196
|
needsApproval?: boolean;
|
|
@@ -204,18 +204,18 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
204
204
|
}) => Promise<{
|
|
205
205
|
id: string;
|
|
206
206
|
name: string;
|
|
207
|
+
description: string | null;
|
|
207
208
|
createdAt: string;
|
|
208
209
|
updatedAt: string;
|
|
209
|
-
description: string | null;
|
|
210
|
-
projectId: string;
|
|
211
210
|
tenantId: string;
|
|
212
|
-
|
|
211
|
+
projectId: string;
|
|
213
212
|
credentialReferenceId: string | null;
|
|
214
213
|
config: {
|
|
215
214
|
type: "mcp";
|
|
216
215
|
mcp: ToolMcpConfig;
|
|
217
216
|
};
|
|
218
217
|
credentialScope: string;
|
|
218
|
+
headers: Record<string, string> | null;
|
|
219
219
|
imageUrl: string | null;
|
|
220
220
|
capabilities: ToolServerCapabilities | null;
|
|
221
221
|
lastError: string | null;
|
|
@@ -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: "
|
|
43
|
+
source: "header" | "query" | "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;
|
|
@@ -12,28 +12,28 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
12
12
|
name: string | null;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
expiresAt: string | null;
|
|
16
|
-
projectId: string;
|
|
17
15
|
tenantId: string;
|
|
16
|
+
projectId: string;
|
|
18
17
|
agentId: string;
|
|
18
|
+
lastUsedAt: string | null;
|
|
19
|
+
expiresAt: string | null;
|
|
19
20
|
publicId: string;
|
|
20
21
|
keyHash: string;
|
|
21
22
|
keyPrefix: string;
|
|
22
|
-
lastUsedAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
25
|
id: string;
|
|
26
26
|
name: string | null;
|
|
27
27
|
createdAt: string;
|
|
28
28
|
updatedAt: string;
|
|
29
|
-
expiresAt: string | null;
|
|
30
|
-
projectId: string;
|
|
31
29
|
tenantId: string;
|
|
30
|
+
projectId: string;
|
|
32
31
|
agentId: string;
|
|
32
|
+
lastUsedAt: string | null;
|
|
33
|
+
expiresAt: string | null;
|
|
33
34
|
publicId: string;
|
|
34
35
|
keyHash: string;
|
|
35
36
|
keyPrefix: string;
|
|
36
|
-
lastUsedAt: string | null;
|
|
37
37
|
} | undefined>;
|
|
38
38
|
declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
@@ -43,14 +43,14 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
43
43
|
name: string | null;
|
|
44
44
|
createdAt: string;
|
|
45
45
|
updatedAt: string;
|
|
46
|
-
expiresAt: string | null;
|
|
47
|
-
projectId: string;
|
|
48
46
|
tenantId: string;
|
|
47
|
+
projectId: string;
|
|
49
48
|
agentId: string;
|
|
49
|
+
lastUsedAt: string | null;
|
|
50
|
+
expiresAt: string | null;
|
|
50
51
|
publicId: string;
|
|
51
52
|
keyHash: string;
|
|
52
53
|
keyPrefix: string;
|
|
53
|
-
lastUsedAt: string | null;
|
|
54
54
|
}[]>;
|
|
55
55
|
declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
56
56
|
scopes: ProjectScopeConfig;
|
|
@@ -70,14 +70,14 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
|
|
|
70
70
|
name: string | null;
|
|
71
71
|
createdAt: string;
|
|
72
72
|
updatedAt: string;
|
|
73
|
-
expiresAt: string | null;
|
|
74
|
-
projectId: string;
|
|
75
73
|
tenantId: string;
|
|
74
|
+
projectId: string;
|
|
76
75
|
agentId: string;
|
|
76
|
+
lastUsedAt: string | null;
|
|
77
|
+
expiresAt: string | null;
|
|
77
78
|
publicId: string;
|
|
78
79
|
keyHash: string;
|
|
79
80
|
keyPrefix: string;
|
|
80
|
-
lastUsedAt: string | null;
|
|
81
81
|
}>;
|
|
82
82
|
declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
83
|
scopes: ProjectScopeConfig;
|