@inkeep/agents-core 0.58.7 → 0.58.9
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 +135 -135
- package/dist/client-exports.d.ts +4 -2
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +2 -1
- package/dist/data-access/index.js +2 -1
- package/dist/data-access/manage/agents.d.ts +30 -30
- 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/credentialReferences.d.ts +3 -1
- package/dist/data-access/manage/credentialReferences.js +25 -4
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/skills.d.ts +7 -7
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +18 -18
- package/dist/data-access/manage/tools.d.ts +18 -18
- package/dist/data-access/runtime/apiKeys.d.ts +8 -8
- package/dist/data-access/runtime/apps.d.ts +113 -0
- package/dist/data-access/runtime/apps.js +86 -0
- package/dist/data-access/runtime/cascade-delete.d.ts +2 -0
- package/dist/data-access/runtime/cascade-delete.js +16 -4
- package/dist/data-access/runtime/conversations.d.ts +20 -19
- package/dist/data-access/runtime/conversations.js +1 -0
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/manage-schema.d.ts +357 -357
- package/dist/db/runtime/runtime-schema.d.ts +552 -291
- package/dist/db/runtime/runtime-schema.js +16 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.js +7 -4
- package/dist/setup/setup.js +10 -0
- package/dist/types/entities.d.ts +10 -2
- package/dist/types/index.d.ts +4 -4
- package/dist/types/utility.d.ts +9 -3
- package/dist/utils/apiKeys.d.ts +6 -1
- package/dist/utils/apiKeys.js +9 -1
- package/dist/utils/domain-validation.d.ts +4 -0
- package/dist/utils/domain-validation.js +25 -0
- package/dist/utils/index.d.ts +4 -2
- package/dist/utils/index.js +4 -2
- package/dist/utils/pow.d.ts +13 -0
- package/dist/utils/pow.js +52 -0
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas.d.ts +1949 -668
- package/dist/validation/schemas.js +57 -3
- package/drizzle/runtime/0022_superb_micromacro.sql +17 -0
- package/drizzle/runtime/meta/0022_snapshot.json +4240 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +3 -2
|
@@ -14,8 +14,8 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
16
|
description: string | null;
|
|
17
|
-
tenantId: string;
|
|
18
17
|
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
props: {
|
|
20
20
|
[x: string]: unknown;
|
|
21
21
|
type: "object";
|
|
@@ -70,8 +70,8 @@ declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (para
|
|
|
70
70
|
createdAt: string;
|
|
71
71
|
updatedAt: string;
|
|
72
72
|
description: string | null;
|
|
73
|
-
tenantId: string;
|
|
74
73
|
projectId: string;
|
|
74
|
+
tenantId: string;
|
|
75
75
|
props: {
|
|
76
76
|
[x: string]: unknown;
|
|
77
77
|
type: "object";
|
|
@@ -143,9 +143,9 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
143
143
|
}) => Promise<{
|
|
144
144
|
id: string;
|
|
145
145
|
createdAt: string;
|
|
146
|
-
tenantId: string;
|
|
147
|
-
projectId: string;
|
|
148
146
|
agentId: string;
|
|
147
|
+
projectId: string;
|
|
148
|
+
tenantId: string;
|
|
149
149
|
subAgentId: string;
|
|
150
150
|
artifactComponentId: string;
|
|
151
151
|
}>;
|
|
@@ -186,9 +186,9 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
186
186
|
}) => Promise<{
|
|
187
187
|
id: string;
|
|
188
188
|
createdAt: string;
|
|
189
|
-
tenantId: string;
|
|
190
|
-
projectId: string;
|
|
191
189
|
agentId: string;
|
|
190
|
+
projectId: string;
|
|
191
|
+
tenantId: string;
|
|
192
192
|
subAgentId: string;
|
|
193
193
|
artifactComponentId: string;
|
|
194
194
|
} | null>;
|
|
@@ -12,9 +12,9 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
tenantId: string;
|
|
16
|
-
projectId: string;
|
|
17
15
|
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
headersSchema: unknown;
|
|
19
19
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
20
20
|
} | undefined>;
|
|
@@ -24,9 +24,9 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
24
24
|
id: string;
|
|
25
25
|
createdAt: string;
|
|
26
26
|
updatedAt: string;
|
|
27
|
-
tenantId: string;
|
|
28
|
-
projectId: string;
|
|
29
27
|
agentId: string;
|
|
28
|
+
projectId: string;
|
|
29
|
+
tenantId: string;
|
|
30
30
|
headersSchema: unknown;
|
|
31
31
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
32
32
|
}[]>;
|
|
@@ -46,9 +46,9 @@ declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
46
46
|
id: string;
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
|
-
tenantId: string;
|
|
50
|
-
projectId: string;
|
|
51
49
|
agentId: string;
|
|
50
|
+
projectId: string;
|
|
51
|
+
tenantId: string;
|
|
52
52
|
headersSchema: unknown;
|
|
53
53
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
54
54
|
}>;
|
|
@@ -86,9 +86,9 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
86
86
|
id: string;
|
|
87
87
|
createdAt: string;
|
|
88
88
|
updatedAt: string;
|
|
89
|
-
tenantId: string;
|
|
90
|
-
projectId: string;
|
|
91
89
|
agentId: string;
|
|
90
|
+
projectId: string;
|
|
91
|
+
tenantId: string;
|
|
92
92
|
headersSchema: unknown;
|
|
93
93
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
94
94
|
}>;
|
|
@@ -92,7 +92,9 @@ declare const countCredentialReferences: (db: AgentsManageDatabaseClient) => (pa
|
|
|
92
92
|
scopes: ProjectScopeConfig;
|
|
93
93
|
}) => Promise<number>;
|
|
94
94
|
/**
|
|
95
|
-
* Upsert a credential reference (create if it doesn't exist, update if it does)
|
|
95
|
+
* Upsert a credential reference (create if it doesn't exist, update if it does).
|
|
96
|
+
* For user-scoped credentials (toolId + userId set), uses an atomic INSERT ... ON CONFLICT
|
|
97
|
+
* on the (toolId, userId) unique constraint to avoid TOCTOU races.
|
|
96
98
|
*/
|
|
97
99
|
declare const upsertCredentialReference: (db: AgentsManageDatabaseClient) => (params: {
|
|
98
100
|
data: CredentialReferenceInsert;
|
|
@@ -119,20 +119,24 @@ const countCredentialReferences = (db) => async (params) => {
|
|
|
119
119
|
return typeof total === "string" ? Number.parseInt(total, 10) : total;
|
|
120
120
|
};
|
|
121
121
|
/**
|
|
122
|
-
* Upsert a credential reference (create if it doesn't exist, update if it does)
|
|
122
|
+
* Upsert a credential reference (create if it doesn't exist, update if it does).
|
|
123
|
+
* For user-scoped credentials (toolId + userId set), uses an atomic INSERT ... ON CONFLICT
|
|
124
|
+
* on the (toolId, userId) unique constraint to avoid TOCTOU races.
|
|
123
125
|
*/
|
|
124
126
|
const upsertCredentialReference = (db) => async (params) => {
|
|
125
127
|
const scopes = {
|
|
126
128
|
tenantId: params.data.tenantId,
|
|
127
129
|
projectId: params.data.projectId
|
|
128
130
|
};
|
|
129
|
-
|
|
131
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
132
|
+
const existingById = await getCredentialReference(db)({
|
|
130
133
|
scopes,
|
|
131
134
|
id: params.data.id
|
|
132
|
-
})
|
|
135
|
+
});
|
|
136
|
+
if (existingById) {
|
|
133
137
|
const updated = await updateCredentialReference(db)({
|
|
134
138
|
scopes,
|
|
135
|
-
id:
|
|
139
|
+
id: existingById.id,
|
|
136
140
|
data: {
|
|
137
141
|
name: params.data.name,
|
|
138
142
|
type: params.data.type,
|
|
@@ -143,6 +147,23 @@ const upsertCredentialReference = (db) => async (params) => {
|
|
|
143
147
|
if (!updated) throw new Error("Failed to update credential reference - no rows affected");
|
|
144
148
|
return updated;
|
|
145
149
|
}
|
|
150
|
+
if (params.data.toolId && params.data.userId) {
|
|
151
|
+
const [result] = await db.insert(credentialReferences).values({
|
|
152
|
+
...params.data,
|
|
153
|
+
createdAt: now,
|
|
154
|
+
updatedAt: now
|
|
155
|
+
}).onConflictDoUpdate({
|
|
156
|
+
target: [credentialReferences.toolId, credentialReferences.userId],
|
|
157
|
+
set: {
|
|
158
|
+
name: params.data.name,
|
|
159
|
+
type: params.data.type,
|
|
160
|
+
credentialStoreId: params.data.credentialStoreId,
|
|
161
|
+
retrievalParams: params.data.retrievalParams,
|
|
162
|
+
updatedAt: now
|
|
163
|
+
}
|
|
164
|
+
}).returning();
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
146
167
|
return await createCredentialReference(db)(params.data);
|
|
147
168
|
};
|
|
148
169
|
|
|
@@ -67,9 +67,9 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
67
67
|
}) => Promise<{
|
|
68
68
|
id: string;
|
|
69
69
|
createdAt: string;
|
|
70
|
-
tenantId: string;
|
|
71
|
-
projectId: string;
|
|
72
70
|
agentId: string;
|
|
71
|
+
projectId: string;
|
|
72
|
+
tenantId: string;
|
|
73
73
|
subAgentId: string;
|
|
74
74
|
dataComponentId: string;
|
|
75
75
|
}>;
|
|
@@ -109,9 +109,9 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
109
109
|
}) => Promise<{
|
|
110
110
|
id: string;
|
|
111
111
|
createdAt: string;
|
|
112
|
-
tenantId: string;
|
|
113
|
-
projectId: string;
|
|
114
112
|
agentId: string;
|
|
113
|
+
projectId: string;
|
|
114
|
+
tenantId: string;
|
|
115
115
|
subAgentId: string;
|
|
116
116
|
dataComponentId: string;
|
|
117
117
|
} | null>;
|
|
@@ -58,9 +58,9 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
58
58
|
createdAt: string;
|
|
59
59
|
updatedAt: string;
|
|
60
60
|
description: string | null;
|
|
61
|
-
tenantId: string;
|
|
62
|
-
projectId: string;
|
|
63
61
|
agentId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
tenantId: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -100,9 +100,9 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
100
100
|
createdAt: string;
|
|
101
101
|
updatedAt: string;
|
|
102
102
|
description: string | null;
|
|
103
|
-
tenantId: string;
|
|
104
|
-
projectId: string;
|
|
105
103
|
agentId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
tenantId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -164,14 +164,14 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
164
164
|
id: string;
|
|
165
165
|
createdAt: string;
|
|
166
166
|
updatedAt: string;
|
|
167
|
-
tenantId: string;
|
|
168
|
-
projectId: string;
|
|
169
167
|
agentId: string;
|
|
168
|
+
projectId: string;
|
|
169
|
+
tenantId: string;
|
|
170
|
+
subAgentId: string;
|
|
171
|
+
functionToolId: string;
|
|
170
172
|
toolPolicies: Record<string, {
|
|
171
173
|
needsApproval?: boolean;
|
|
172
174
|
}> | null;
|
|
173
|
-
subAgentId: string;
|
|
174
|
-
functionToolId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -229,14 +229,14 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
229
229
|
id: string;
|
|
230
230
|
createdAt: string;
|
|
231
231
|
updatedAt: string;
|
|
232
|
-
tenantId: string;
|
|
233
|
-
projectId: string;
|
|
234
232
|
agentId: string;
|
|
233
|
+
projectId: string;
|
|
234
|
+
tenantId: string;
|
|
235
|
+
subAgentId: string;
|
|
236
|
+
functionToolId: string;
|
|
235
237
|
toolPolicies: Record<string, {
|
|
236
238
|
needsApproval?: boolean;
|
|
237
239
|
}> | 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 };
|
|
@@ -14,8 +14,8 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
14
14
|
updatedAt: string;
|
|
15
15
|
metadata: Record<string, string> | null;
|
|
16
16
|
description: string;
|
|
17
|
-
tenantId: string;
|
|
18
17
|
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
content: string;
|
|
20
20
|
} | null>;
|
|
21
21
|
declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -47,8 +47,8 @@ declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInser
|
|
|
47
47
|
updatedAt: string;
|
|
48
48
|
metadata: Record<string, string> | null;
|
|
49
49
|
description: string;
|
|
50
|
-
tenantId: string;
|
|
51
50
|
projectId: string;
|
|
51
|
+
tenantId: string;
|
|
52
52
|
content: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
@@ -58,8 +58,8 @@ declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInser
|
|
|
58
58
|
updatedAt: string;
|
|
59
59
|
metadata: Record<string, string> | null;
|
|
60
60
|
description: string;
|
|
61
|
-
tenantId: string;
|
|
62
61
|
projectId: string;
|
|
62
|
+
tenantId: string;
|
|
63
63
|
content: string;
|
|
64
64
|
}>;
|
|
65
65
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -94,13 +94,13 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
94
94
|
id: string;
|
|
95
95
|
createdAt: string;
|
|
96
96
|
updatedAt: string;
|
|
97
|
-
tenantId: string;
|
|
98
|
-
projectId: string;
|
|
99
97
|
agentId: string;
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
projectId: string;
|
|
99
|
+
tenantId: string;
|
|
102
100
|
subAgentId: string;
|
|
103
101
|
skillId: string;
|
|
102
|
+
index: number;
|
|
103
|
+
alwaysLoaded: boolean;
|
|
104
104
|
}>;
|
|
105
105
|
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
106
106
|
scopes: AgentScopeConfig;
|
|
@@ -12,12 +12,12 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
tenantId: string;
|
|
16
|
-
projectId: string;
|
|
17
|
-
agentId: string;
|
|
18
15
|
headers: Record<string, string> | null;
|
|
19
|
-
|
|
16
|
+
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
20
19
|
subAgentId: string;
|
|
20
|
+
externalAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
23
|
scopes: SubAgentScopeConfig;
|
|
@@ -47,12 +47,12 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
47
47
|
id: string;
|
|
48
48
|
createdAt: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
tenantId: string;
|
|
51
|
-
projectId: string;
|
|
52
|
-
agentId: string;
|
|
53
50
|
headers: Record<string, string> | null;
|
|
54
|
-
|
|
51
|
+
agentId: string;
|
|
52
|
+
projectId: string;
|
|
53
|
+
tenantId: string;
|
|
55
54
|
subAgentId: string;
|
|
55
|
+
externalAgentId: string;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
@@ -60,12 +60,12 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
|
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
|
-
tenantId: string;
|
|
64
|
-
projectId: string;
|
|
65
|
-
agentId: string;
|
|
66
63
|
headers: Record<string, string> | null;
|
|
67
|
-
|
|
64
|
+
agentId: string;
|
|
65
|
+
projectId: string;
|
|
66
|
+
tenantId: string;
|
|
68
67
|
subAgentId: string;
|
|
68
|
+
externalAgentId: string;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -183,12 +183,12 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
183
183
|
id: string;
|
|
184
184
|
createdAt: string;
|
|
185
185
|
updatedAt: string;
|
|
186
|
-
tenantId: string;
|
|
187
|
-
projectId: string;
|
|
188
|
-
agentId: string;
|
|
189
186
|
headers: Record<string, string> | null;
|
|
190
|
-
|
|
187
|
+
agentId: string;
|
|
188
|
+
projectId: string;
|
|
189
|
+
tenantId: string;
|
|
191
190
|
subAgentId: string;
|
|
191
|
+
externalAgentId: string;
|
|
192
192
|
}>;
|
|
193
193
|
/**
|
|
194
194
|
* Check if sub-agent external agent relation exists by params
|
|
@@ -200,12 +200,12 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
200
200
|
id: string;
|
|
201
201
|
createdAt: string;
|
|
202
202
|
updatedAt: string;
|
|
203
|
-
tenantId: string;
|
|
204
|
-
projectId: string;
|
|
205
|
-
agentId: string;
|
|
206
203
|
headers: Record<string, string> | null;
|
|
207
|
-
|
|
204
|
+
agentId: string;
|
|
205
|
+
projectId: string;
|
|
206
|
+
tenantId: string;
|
|
208
207
|
subAgentId: string;
|
|
208
|
+
externalAgentId: string;
|
|
209
209
|
} | undefined>;
|
|
210
210
|
/**
|
|
211
211
|
* Upsert sub-agent external agent relation (create if it doesn't exist, update if it does)
|
|
@@ -221,12 +221,12 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
221
221
|
id: string;
|
|
222
222
|
createdAt: string;
|
|
223
223
|
updatedAt: string;
|
|
224
|
-
tenantId: string;
|
|
225
|
-
projectId: string;
|
|
226
|
-
agentId: string;
|
|
227
224
|
headers: Record<string, string> | null;
|
|
228
|
-
|
|
225
|
+
agentId: string;
|
|
226
|
+
projectId: string;
|
|
227
|
+
tenantId: string;
|
|
229
228
|
subAgentId: string;
|
|
229
|
+
externalAgentId: string;
|
|
230
230
|
}>;
|
|
231
231
|
declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
232
232
|
scopes: SubAgentScopeConfig;
|
|
@@ -12,9 +12,9 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
tenantId: string;
|
|
16
|
-
projectId: string;
|
|
17
15
|
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
sourceSubAgentId: string;
|
|
19
19
|
targetSubAgentId: string | null;
|
|
20
20
|
relationType: string | null;
|
|
@@ -47,9 +47,9 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
47
47
|
id: string;
|
|
48
48
|
createdAt: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
tenantId: string;
|
|
51
|
-
projectId: string;
|
|
52
50
|
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
sourceSubAgentId: string;
|
|
54
54
|
targetSubAgentId: string | null;
|
|
55
55
|
relationType: string | null;
|
|
@@ -60,9 +60,9 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
|
-
tenantId: string;
|
|
64
|
-
projectId: string;
|
|
65
63
|
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
sourceSubAgentId: string;
|
|
67
67
|
targetSubAgentId: string | null;
|
|
68
68
|
relationType: string | null;
|
|
@@ -129,9 +129,9 @@ declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
129
129
|
id: string;
|
|
130
130
|
createdAt: string;
|
|
131
131
|
updatedAt: string;
|
|
132
|
-
tenantId: string;
|
|
133
|
-
projectId: string;
|
|
134
132
|
agentId: string;
|
|
133
|
+
projectId: string;
|
|
134
|
+
tenantId: string;
|
|
135
135
|
sourceSubAgentId: string;
|
|
136
136
|
targetSubAgentId: string | null;
|
|
137
137
|
relationType: string | null;
|
|
@@ -148,9 +148,9 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
148
148
|
id: string;
|
|
149
149
|
createdAt: string;
|
|
150
150
|
updatedAt: string;
|
|
151
|
-
tenantId: string;
|
|
152
|
-
projectId: string;
|
|
153
151
|
agentId: string;
|
|
152
|
+
projectId: string;
|
|
153
|
+
tenantId: string;
|
|
154
154
|
sourceSubAgentId: string;
|
|
155
155
|
targetSubAgentId: string | null;
|
|
156
156
|
relationType: string | null;
|
|
@@ -162,9 +162,9 @@ declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (param
|
|
|
162
162
|
id: string;
|
|
163
163
|
createdAt: string;
|
|
164
164
|
updatedAt: string;
|
|
165
|
-
tenantId: string;
|
|
166
|
-
projectId: string;
|
|
167
165
|
agentId: string;
|
|
166
|
+
projectId: string;
|
|
167
|
+
tenantId: string;
|
|
168
168
|
sourceSubAgentId: string;
|
|
169
169
|
targetSubAgentId: string | null;
|
|
170
170
|
relationType: string | null;
|
|
@@ -207,15 +207,15 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
207
207
|
id: string;
|
|
208
208
|
createdAt: string;
|
|
209
209
|
updatedAt: string;
|
|
210
|
-
|
|
211
|
-
projectId: string;
|
|
210
|
+
headers: Record<string, string> | null;
|
|
212
211
|
agentId: string;
|
|
212
|
+
projectId: string;
|
|
213
|
+
tenantId: string;
|
|
213
214
|
toolId: string;
|
|
214
|
-
|
|
215
|
+
subAgentId: string;
|
|
215
216
|
toolPolicies: Record<string, {
|
|
216
217
|
needsApproval?: boolean;
|
|
217
218
|
}> | null;
|
|
218
|
-
subAgentId: string;
|
|
219
219
|
selectedTools: string[] | null;
|
|
220
220
|
}>;
|
|
221
221
|
declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -251,15 +251,15 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
251
251
|
id: string;
|
|
252
252
|
createdAt: string;
|
|
253
253
|
updatedAt: string;
|
|
254
|
-
|
|
255
|
-
projectId: string;
|
|
254
|
+
headers: Record<string, string> | null;
|
|
256
255
|
agentId: string;
|
|
256
|
+
projectId: string;
|
|
257
|
+
tenantId: string;
|
|
257
258
|
toolId: string;
|
|
258
|
-
|
|
259
|
+
subAgentId: string;
|
|
259
260
|
toolPolicies: Record<string, {
|
|
260
261
|
needsApproval?: boolean;
|
|
261
262
|
}> | null;
|
|
262
|
-
subAgentId: string;
|
|
263
263
|
selectedTools: string[] | null;
|
|
264
264
|
} | undefined>;
|
|
265
265
|
declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -12,10 +12,10 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
tenantId: string;
|
|
16
|
-
projectId: string;
|
|
17
|
-
agentId: string;
|
|
18
15
|
headers: Record<string, string> | null;
|
|
16
|
+
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
subAgentId: string;
|
|
20
20
|
targetAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
@@ -47,10 +47,10 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
47
47
|
id: string;
|
|
48
48
|
createdAt: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
tenantId: string;
|
|
51
|
-
projectId: string;
|
|
52
|
-
agentId: string;
|
|
53
50
|
headers: Record<string, string> | null;
|
|
51
|
+
agentId: string;
|
|
52
|
+
projectId: string;
|
|
53
|
+
tenantId: string;
|
|
54
54
|
subAgentId: string;
|
|
55
55
|
targetAgentId: string;
|
|
56
56
|
}[]>;
|
|
@@ -60,10 +60,10 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
|
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
|
-
tenantId: string;
|
|
64
|
-
projectId: string;
|
|
65
|
-
agentId: string;
|
|
66
63
|
headers: Record<string, string> | null;
|
|
64
|
+
agentId: string;
|
|
65
|
+
projectId: string;
|
|
66
|
+
tenantId: string;
|
|
67
67
|
subAgentId: string;
|
|
68
68
|
targetAgentId: string;
|
|
69
69
|
}[]>;
|
|
@@ -213,10 +213,10 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
213
213
|
id: string;
|
|
214
214
|
createdAt: string;
|
|
215
215
|
updatedAt: string;
|
|
216
|
-
tenantId: string;
|
|
217
|
-
projectId: string;
|
|
218
|
-
agentId: string;
|
|
219
216
|
headers: Record<string, string> | null;
|
|
217
|
+
agentId: string;
|
|
218
|
+
projectId: string;
|
|
219
|
+
tenantId: string;
|
|
220
220
|
subAgentId: string;
|
|
221
221
|
targetAgentId: string;
|
|
222
222
|
}>;
|
|
@@ -230,10 +230,10 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
230
230
|
id: string;
|
|
231
231
|
createdAt: string;
|
|
232
232
|
updatedAt: string;
|
|
233
|
-
tenantId: string;
|
|
234
|
-
projectId: string;
|
|
235
|
-
agentId: string;
|
|
236
233
|
headers: Record<string, string> | null;
|
|
234
|
+
agentId: string;
|
|
235
|
+
projectId: string;
|
|
236
|
+
tenantId: string;
|
|
237
237
|
subAgentId: string;
|
|
238
238
|
targetAgentId: string;
|
|
239
239
|
} | undefined>;
|
|
@@ -251,10 +251,10 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
251
251
|
id: string;
|
|
252
252
|
createdAt: string;
|
|
253
253
|
updatedAt: string;
|
|
254
|
-
tenantId: string;
|
|
255
|
-
projectId: string;
|
|
256
|
-
agentId: string;
|
|
257
254
|
headers: Record<string, string> | null;
|
|
255
|
+
agentId: string;
|
|
256
|
+
projectId: string;
|
|
257
|
+
tenantId: string;
|
|
258
258
|
subAgentId: string;
|
|
259
259
|
targetAgentId: string;
|
|
260
260
|
}>;
|
|
@@ -14,9 +14,9 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
14
14
|
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
16
|
description: string | null;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
stopWhen: {
|
|
18
|
+
stepCountIs?: number | undefined;
|
|
19
|
+
} | null;
|
|
20
20
|
prompt: string | null;
|
|
21
21
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
22
22
|
models: {
|
|
@@ -33,9 +33,9 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
33
33
|
providerOptions?: Record<string, any> | undefined;
|
|
34
34
|
} | undefined;
|
|
35
35
|
} | null;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
agentId: string;
|
|
37
|
+
projectId: string;
|
|
38
|
+
tenantId: string;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
41
41
|
scopes: AgentScopeConfig;
|
|
@@ -45,9 +45,9 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
45
45
|
createdAt: string;
|
|
46
46
|
updatedAt: string;
|
|
47
47
|
description: string | null;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
stopWhen: {
|
|
49
|
+
stepCountIs?: number | undefined;
|
|
50
|
+
} | null;
|
|
51
51
|
prompt: string | null;
|
|
52
52
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
53
53
|
models: {
|
|
@@ -64,9 +64,9 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
64
64
|
providerOptions?: Record<string, any> | undefined;
|
|
65
65
|
} | undefined;
|
|
66
66
|
} | null;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
agentId: string;
|
|
68
|
+
projectId: string;
|
|
69
|
+
tenantId: string;
|
|
70
70
|
}[]>;
|
|
71
71
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
72
72
|
scopes: AgentScopeConfig;
|
|
@@ -114,9 +114,9 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
114
114
|
createdAt: string;
|
|
115
115
|
updatedAt: string;
|
|
116
116
|
description: string | null;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
stopWhen: {
|
|
118
|
+
stepCountIs?: number | undefined;
|
|
119
|
+
} | null;
|
|
120
120
|
prompt: string | null;
|
|
121
121
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
122
122
|
models: {
|
|
@@ -133,9 +133,9 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
133
133
|
providerOptions?: Record<string, any> | undefined;
|
|
134
134
|
} | undefined;
|
|
135
135
|
} | null;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
agentId: string;
|
|
137
|
+
projectId: string;
|
|
138
|
+
tenantId: string;
|
|
139
139
|
}>;
|
|
140
140
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
141
141
|
scopes: AgentScopeConfig;
|