@inkeep/agents-core 0.0.0-dev-20260227220655 → 0.0.0-dev-20260227232900
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 +152 -152
- package/dist/auth/auth.d.ts +9 -9
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +5 -5
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +3 -3
- package/dist/data-access/manage/agents.d.ts +29 -29
- package/dist/data-access/manage/agents.js +19 -1
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- package/dist/data-access/manage/contextConfigs.d.ts +4 -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 +8 -8
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
- 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/tools.js +1 -1
- package/dist/data-access/manage/triggers.d.ts +1 -1
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/cascade-delete.d.ts +2 -0
- package/dist/data-access/runtime/cascade-delete.js +19 -4
- package/dist/data-access/runtime/conversations.d.ts +16 -16
- 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 +5 -5
- package/dist/data-access/runtime/workAppSlack.d.ts +8 -2
- package/dist/data-access/runtime/workAppSlack.js +63 -2
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +348 -312
- package/dist/db/runtime/runtime-schema.js +12 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/utils/error.d.ts +51 -51
- 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 +2976 -1888
- package/dist/validation/schemas.js +12 -2
- package/drizzle/runtime/0016_white_eddie_brock.sql +1 -0
- package/drizzle/runtime/0017_remarkable_starfox.sql +3 -0
- package/drizzle/runtime/0018_orange_union_jack.sql +6 -0
- package/drizzle/runtime/meta/0016_snapshot.json +3766 -0
- package/drizzle/runtime/meta/0017_snapshot.json +3785 -0
- package/drizzle/runtime/meta/0018_snapshot.json +3929 -0
- package/drizzle/runtime/meta/_journal.json +21 -0
- package/package.json +1 -1
|
@@ -9,11 +9,14 @@ import { PgTable } from "drizzle-orm/pg-core";
|
|
|
9
9
|
declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
10
10
|
scopes: AgentScopeConfig;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
|
|
12
|
+
name: string;
|
|
13
13
|
description: string | null;
|
|
14
|
+
tenantId: string;
|
|
14
15
|
projectId: string;
|
|
15
16
|
id: string;
|
|
16
|
-
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
contextConfigId: string | null;
|
|
17
20
|
models: {
|
|
18
21
|
base?: {
|
|
19
22
|
model?: string | undefined;
|
|
@@ -31,11 +34,8 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
31
34
|
stopWhen: {
|
|
32
35
|
transferCountIs?: number | undefined;
|
|
33
36
|
} | null;
|
|
34
|
-
createdAt: string;
|
|
35
|
-
updatedAt: string;
|
|
36
|
-
prompt: string | null;
|
|
37
37
|
defaultSubAgentId: string | null;
|
|
38
|
-
|
|
38
|
+
prompt: string | null;
|
|
39
39
|
statusUpdates: {
|
|
40
40
|
enabled?: boolean | undefined;
|
|
41
41
|
numEvents?: number | undefined;
|
|
@@ -55,11 +55,14 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
55
55
|
declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
56
56
|
scopes: AgentScopeConfig;
|
|
57
57
|
}) => Promise<{
|
|
58
|
-
|
|
58
|
+
name: string;
|
|
59
59
|
description: string | null;
|
|
60
|
+
tenantId: string;
|
|
60
61
|
projectId: string;
|
|
61
62
|
id: string;
|
|
62
|
-
|
|
63
|
+
createdAt: string;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
contextConfigId: string | null;
|
|
63
66
|
models: {
|
|
64
67
|
base?: {
|
|
65
68
|
model?: string | undefined;
|
|
@@ -77,11 +80,8 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
77
80
|
stopWhen: {
|
|
78
81
|
transferCountIs?: number | undefined;
|
|
79
82
|
} | null;
|
|
80
|
-
createdAt: string;
|
|
81
|
-
updatedAt: string;
|
|
82
|
-
prompt: string | null;
|
|
83
83
|
defaultSubAgentId: string | null;
|
|
84
|
-
|
|
84
|
+
prompt: string | null;
|
|
85
85
|
statusUpdates: {
|
|
86
86
|
enabled?: boolean | undefined;
|
|
87
87
|
numEvents?: number | undefined;
|
|
@@ -98,12 +98,14 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
98
98
|
}[] | undefined;
|
|
99
99
|
} | null;
|
|
100
100
|
defaultSubAgent: {
|
|
101
|
-
|
|
101
|
+
name: string;
|
|
102
102
|
description: string | null;
|
|
103
|
-
|
|
103
|
+
tenantId: string;
|
|
104
104
|
projectId: string;
|
|
105
|
+
agentId: string;
|
|
105
106
|
id: string;
|
|
106
|
-
|
|
107
|
+
createdAt: string;
|
|
108
|
+
updatedAt: string;
|
|
107
109
|
models: {
|
|
108
110
|
base?: {
|
|
109
111
|
model?: string | undefined;
|
|
@@ -121,8 +123,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
121
123
|
stopWhen: {
|
|
122
124
|
stepCountIs?: number | undefined;
|
|
123
125
|
} | null;
|
|
124
|
-
createdAt: string;
|
|
125
|
-
updatedAt: string;
|
|
126
126
|
prompt: string | null;
|
|
127
127
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
128
128
|
} | null;
|
|
@@ -130,11 +130,14 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
|
|
|
130
130
|
declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
131
131
|
scopes: ProjectScopeConfig;
|
|
132
132
|
}) => Promise<{
|
|
133
|
-
|
|
133
|
+
name: string;
|
|
134
134
|
description: string | null;
|
|
135
|
+
tenantId: string;
|
|
135
136
|
projectId: string;
|
|
136
137
|
id: string;
|
|
137
|
-
|
|
138
|
+
createdAt: string;
|
|
139
|
+
updatedAt: string;
|
|
140
|
+
contextConfigId: string | null;
|
|
138
141
|
models: {
|
|
139
142
|
base?: {
|
|
140
143
|
model?: string | undefined;
|
|
@@ -152,11 +155,8 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
152
155
|
stopWhen: {
|
|
153
156
|
transferCountIs?: number | undefined;
|
|
154
157
|
} | null;
|
|
155
|
-
createdAt: string;
|
|
156
|
-
updatedAt: string;
|
|
157
|
-
prompt: string | null;
|
|
158
158
|
defaultSubAgentId: string | null;
|
|
159
|
-
|
|
159
|
+
prompt: string | null;
|
|
160
160
|
statusUpdates: {
|
|
161
161
|
enabled?: boolean | undefined;
|
|
162
162
|
numEvents?: number | undefined;
|
|
@@ -246,11 +246,14 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
|
|
|
246
246
|
projectIds: string[];
|
|
247
247
|
}): Promise<AvailableAgentInfo[]>;
|
|
248
248
|
declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
|
|
249
|
-
|
|
249
|
+
name: string;
|
|
250
250
|
description: string | null;
|
|
251
|
+
tenantId: string;
|
|
251
252
|
projectId: string;
|
|
252
253
|
id: string;
|
|
253
|
-
|
|
254
|
+
createdAt: string;
|
|
255
|
+
updatedAt: string;
|
|
256
|
+
contextConfigId: string | null;
|
|
254
257
|
models: {
|
|
255
258
|
base?: {
|
|
256
259
|
model?: string | undefined;
|
|
@@ -268,11 +271,8 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
|
|
|
268
271
|
stopWhen: {
|
|
269
272
|
transferCountIs?: number | undefined;
|
|
270
273
|
} | null;
|
|
271
|
-
createdAt: string;
|
|
272
|
-
updatedAt: string;
|
|
273
|
-
prompt: string | null;
|
|
274
274
|
defaultSubAgentId: string | null;
|
|
275
|
-
|
|
275
|
+
prompt: string | null;
|
|
276
276
|
statusUpdates: {
|
|
277
277
|
enabled?: boolean | undefined;
|
|
278
278
|
numEvents?: number | undefined;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { agents, artifactComponents, dataComponents, functionTools, projects, subAgentArtifactComponents, subAgentDataComponents, subAgentFunctionToolRelations, subAgentToolRelations, subAgents, tools } from "../../db/manage/manage-schema.js";
|
|
2
2
|
import { getLogger } from "../../utils/logger.js";
|
|
3
|
+
import { createAgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
3
4
|
import { generateId } from "../../utils/conversations.js";
|
|
5
|
+
import { getActiveBranch } from "../../dolt/schema-sync.js";
|
|
4
6
|
import { getProjectMainBranchName } from "./projectLifecycle.js";
|
|
7
|
+
import { cascadeDeleteByAgent } from "../runtime/cascade-delete.js";
|
|
5
8
|
import { getContextConfigById } from "./contextConfigs.js";
|
|
6
9
|
import { getExternalAgent } from "./externalAgents.js";
|
|
7
10
|
import { getFunction } from "./functions.js";
|
|
@@ -109,7 +112,22 @@ const updateAgent = (db) => async (params) => {
|
|
|
109
112
|
return (await db.update(agents).set(updateData).where(and(eq(agents.tenantId, params.scopes.tenantId), eq(agents.projectId, params.scopes.projectId), eq(agents.id, params.scopes.agentId))).returning())[0] ?? null;
|
|
110
113
|
};
|
|
111
114
|
const deleteAgent = (db) => async (params) => {
|
|
112
|
-
|
|
115
|
+
const { tenantId, projectId, agentId } = params.scopes;
|
|
116
|
+
try {
|
|
117
|
+
const currentBranch = await getActiveBranch(db)();
|
|
118
|
+
const subAgentIds = (await db.query.subAgents.findMany({ where: and(eq(subAgents.tenantId, tenantId), eq(subAgents.projectId, projectId), eq(subAgents.agentId, agentId)) })).map((sa) => sa.id);
|
|
119
|
+
await cascadeDeleteByAgent(createAgentsRunDatabaseClient())({
|
|
120
|
+
scopes: params.scopes,
|
|
121
|
+
fullBranchName: currentBranch,
|
|
122
|
+
subAgentIds
|
|
123
|
+
});
|
|
124
|
+
} catch (error) {
|
|
125
|
+
agentsLogger.debug({
|
|
126
|
+
error,
|
|
127
|
+
agentId
|
|
128
|
+
}, "Skipping runtime cascade delete - active_branch() not available");
|
|
129
|
+
}
|
|
130
|
+
return (await db.delete(agents).where(and(eq(agents.tenantId, tenantId), eq(agents.projectId, projectId), eq(agents.id, agentId))).returning()).length > 0;
|
|
113
131
|
};
|
|
114
132
|
/**
|
|
115
133
|
* Helper function to fetch component relationships using efficient joins
|
|
@@ -9,11 +9,11 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
|
|
|
9
9
|
scopes: ProjectScopeConfig;
|
|
10
10
|
id: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
|
|
12
|
+
name: string;
|
|
13
13
|
description: string | null;
|
|
14
|
+
tenantId: string;
|
|
14
15
|
projectId: string;
|
|
15
16
|
id: string;
|
|
16
|
-
name: string;
|
|
17
17
|
createdAt: string;
|
|
18
18
|
updatedAt: string;
|
|
19
19
|
props: {
|
|
@@ -65,11 +65,11 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
|
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
67
|
declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
68
|
-
|
|
68
|
+
name: string;
|
|
69
69
|
description: string | null;
|
|
70
|
+
tenantId: string;
|
|
70
71
|
projectId: string;
|
|
71
72
|
id: string;
|
|
72
|
-
name: string;
|
|
73
73
|
createdAt: string;
|
|
74
74
|
updatedAt: string;
|
|
75
75
|
props: {
|
|
@@ -142,11 +142,11 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
|
|
|
142
142
|
artifactComponentId: string;
|
|
143
143
|
}) => Promise<{
|
|
144
144
|
tenantId: string;
|
|
145
|
-
agentId: string;
|
|
146
145
|
projectId: string;
|
|
146
|
+
agentId: string;
|
|
147
|
+
subAgentId: string;
|
|
147
148
|
id: string;
|
|
148
149
|
createdAt: string;
|
|
149
|
-
subAgentId: string;
|
|
150
150
|
artifactComponentId: string;
|
|
151
151
|
}>;
|
|
152
152
|
declare const removeArtifactComponentFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -185,11 +185,11 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
|
|
|
185
185
|
artifactComponentId: string;
|
|
186
186
|
}) => Promise<{
|
|
187
187
|
tenantId: string;
|
|
188
|
-
agentId: string;
|
|
189
188
|
projectId: string;
|
|
189
|
+
agentId: string;
|
|
190
|
+
subAgentId: string;
|
|
190
191
|
id: string;
|
|
191
192
|
createdAt: string;
|
|
192
|
-
subAgentId: string;
|
|
193
193
|
artifactComponentId: string;
|
|
194
194
|
} | null>;
|
|
195
195
|
/**
|
|
@@ -10,8 +10,8 @@ declare const getContextConfigById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
10
10
|
id: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
tenantId: string;
|
|
13
|
-
agentId: string;
|
|
14
13
|
projectId: string;
|
|
14
|
+
agentId: string;
|
|
15
15
|
id: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
@@ -22,8 +22,8 @@ declare const listContextConfigs: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
22
22
|
scopes: AgentScopeConfig;
|
|
23
23
|
}) => Promise<{
|
|
24
24
|
tenantId: string;
|
|
25
|
-
agentId: string;
|
|
26
25
|
projectId: string;
|
|
26
|
+
agentId: string;
|
|
27
27
|
id: string;
|
|
28
28
|
createdAt: string;
|
|
29
29
|
updatedAt: string;
|
|
@@ -44,8 +44,8 @@ declare const listContextConfigsPaginated: (db: AgentsManageDatabaseClient) => (
|
|
|
44
44
|
}>;
|
|
45
45
|
declare const createContextConfig: (db: AgentsManageDatabaseClient) => (params: ContextConfigInsert) => Promise<{
|
|
46
46
|
tenantId: string;
|
|
47
|
-
agentId: string;
|
|
48
47
|
projectId: string;
|
|
48
|
+
agentId: string;
|
|
49
49
|
id: string;
|
|
50
50
|
createdAt: string;
|
|
51
51
|
updatedAt: string;
|
|
@@ -84,8 +84,8 @@ declare const upsertContextConfig: (db: AgentsManageDatabaseClient) => (params:
|
|
|
84
84
|
data: ContextConfigInsert;
|
|
85
85
|
}) => Promise<{
|
|
86
86
|
tenantId: string;
|
|
87
|
-
agentId: string;
|
|
88
87
|
projectId: string;
|
|
88
|
+
agentId: string;
|
|
89
89
|
id: string;
|
|
90
90
|
createdAt: string;
|
|
91
91
|
updatedAt: string;
|
|
@@ -66,11 +66,11 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
|
|
|
66
66
|
dataComponentId: string;
|
|
67
67
|
}) => Promise<{
|
|
68
68
|
tenantId: string;
|
|
69
|
-
agentId: string;
|
|
70
69
|
projectId: string;
|
|
70
|
+
agentId: string;
|
|
71
|
+
subAgentId: string;
|
|
71
72
|
id: string;
|
|
72
73
|
createdAt: string;
|
|
73
|
-
subAgentId: string;
|
|
74
74
|
dataComponentId: string;
|
|
75
75
|
}>;
|
|
76
76
|
/**
|
|
@@ -108,11 +108,11 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
|
|
|
108
108
|
dataComponentId: string;
|
|
109
109
|
}) => Promise<{
|
|
110
110
|
tenantId: string;
|
|
111
|
-
agentId: string;
|
|
112
111
|
projectId: string;
|
|
112
|
+
agentId: string;
|
|
113
|
+
subAgentId: string;
|
|
113
114
|
id: string;
|
|
114
115
|
createdAt: string;
|
|
115
|
-
subAgentId: string;
|
|
116
116
|
dataComponentId: string;
|
|
117
117
|
} | null>;
|
|
118
118
|
/**
|
|
@@ -53,12 +53,12 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
53
53
|
data: FunctionToolApiInsert;
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
|
-
|
|
56
|
+
name: string;
|
|
57
57
|
description: string | null;
|
|
58
|
-
|
|
58
|
+
tenantId: string;
|
|
59
59
|
projectId: string;
|
|
60
|
+
agentId: string;
|
|
60
61
|
id: string;
|
|
61
|
-
name: string;
|
|
62
62
|
createdAt: string;
|
|
63
63
|
updatedAt: string;
|
|
64
64
|
functionId: string;
|
|
@@ -95,12 +95,12 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
95
95
|
data: FunctionToolApiInsert;
|
|
96
96
|
scopes: AgentScopeConfig;
|
|
97
97
|
}) => Promise<{
|
|
98
|
-
|
|
98
|
+
name: string;
|
|
99
99
|
description: string | null;
|
|
100
|
-
|
|
100
|
+
tenantId: string;
|
|
101
101
|
projectId: string;
|
|
102
|
+
agentId: string;
|
|
102
103
|
id: string;
|
|
103
|
-
name: string;
|
|
104
104
|
createdAt: string;
|
|
105
105
|
updatedAt: string;
|
|
106
106
|
functionId: string;
|
|
@@ -162,16 +162,16 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
|
|
|
162
162
|
}> | null;
|
|
163
163
|
}) => Promise<{
|
|
164
164
|
tenantId: string;
|
|
165
|
-
agentId: string;
|
|
166
165
|
projectId: string;
|
|
166
|
+
agentId: string;
|
|
167
|
+
subAgentId: string;
|
|
167
168
|
id: string;
|
|
168
169
|
createdAt: string;
|
|
169
170
|
updatedAt: string;
|
|
170
|
-
subAgentId: string;
|
|
171
|
-
functionToolId: string;
|
|
172
171
|
toolPolicies: Record<string, {
|
|
173
172
|
needsApproval?: boolean;
|
|
174
173
|
}> | null;
|
|
174
|
+
functionToolId: string;
|
|
175
175
|
}>;
|
|
176
176
|
/**
|
|
177
177
|
* Update an agent-function tool relation
|
|
@@ -227,16 +227,16 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
|
|
|
227
227
|
}> | null;
|
|
228
228
|
}) => Promise<{
|
|
229
229
|
tenantId: string;
|
|
230
|
-
agentId: string;
|
|
231
230
|
projectId: string;
|
|
231
|
+
agentId: string;
|
|
232
|
+
subAgentId: string;
|
|
232
233
|
id: string;
|
|
233
234
|
createdAt: string;
|
|
234
235
|
updatedAt: string;
|
|
235
|
-
subAgentId: string;
|
|
236
|
-
functionToolId: string;
|
|
237
236
|
toolPolicies: Record<string, {
|
|
238
237
|
needsApproval?: boolean;
|
|
239
238
|
}> | null;
|
|
239
|
+
functionToolId: string;
|
|
240
240
|
}>;
|
|
241
241
|
//#endregion
|
|
242
242
|
export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
|
|
@@ -8,11 +8,11 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
8
8
|
scopes: ProjectScopeConfig;
|
|
9
9
|
skillId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
|
|
11
|
+
name: string;
|
|
12
12
|
description: string;
|
|
13
|
+
tenantId: string;
|
|
13
14
|
projectId: string;
|
|
14
15
|
id: string;
|
|
15
|
-
name: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
metadata: Record<string, string> | null;
|
|
@@ -41,22 +41,22 @@ declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
41
41
|
};
|
|
42
42
|
}>;
|
|
43
43
|
declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
44
|
-
|
|
44
|
+
name: string;
|
|
45
45
|
description: string;
|
|
46
|
+
tenantId: string;
|
|
46
47
|
projectId: string;
|
|
47
48
|
id: string;
|
|
48
|
-
name: string;
|
|
49
49
|
createdAt: string;
|
|
50
50
|
updatedAt: string;
|
|
51
51
|
metadata: Record<string, string> | null;
|
|
52
52
|
content: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
55
|
-
|
|
55
|
+
name: string;
|
|
56
56
|
description: string;
|
|
57
|
+
tenantId: string;
|
|
57
58
|
projectId: string;
|
|
58
59
|
id: string;
|
|
59
|
-
name: string;
|
|
60
60
|
createdAt: string;
|
|
61
61
|
updatedAt: string;
|
|
62
62
|
metadata: Record<string, string> | null;
|
|
@@ -92,12 +92,12 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
92
92
|
alwaysLoaded?: boolean;
|
|
93
93
|
}) => Promise<{
|
|
94
94
|
tenantId: string;
|
|
95
|
-
agentId: string;
|
|
96
95
|
projectId: string;
|
|
96
|
+
agentId: string;
|
|
97
|
+
subAgentId: string;
|
|
97
98
|
id: string;
|
|
98
99
|
createdAt: string;
|
|
99
100
|
updatedAt: string;
|
|
100
|
-
subAgentId: string;
|
|
101
101
|
skillId: string;
|
|
102
102
|
index: number;
|
|
103
103
|
alwaysLoaded: boolean;
|
|
@@ -10,12 +10,12 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
tenantId: string;
|
|
13
|
-
agentId: string;
|
|
14
13
|
projectId: string;
|
|
14
|
+
agentId: string;
|
|
15
|
+
subAgentId: string;
|
|
15
16
|
id: string;
|
|
16
17
|
createdAt: string;
|
|
17
18
|
updatedAt: string;
|
|
18
|
-
subAgentId: string;
|
|
19
19
|
headers: Record<string, string> | null;
|
|
20
20
|
externalAgentId: string;
|
|
21
21
|
} | undefined>;
|
|
@@ -45,12 +45,12 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
47
|
tenantId: string;
|
|
48
|
-
agentId: string;
|
|
49
48
|
projectId: string;
|
|
49
|
+
agentId: string;
|
|
50
|
+
subAgentId: string;
|
|
50
51
|
id: string;
|
|
51
52
|
createdAt: string;
|
|
52
53
|
updatedAt: string;
|
|
53
|
-
subAgentId: string;
|
|
54
54
|
headers: Record<string, string> | null;
|
|
55
55
|
externalAgentId: string;
|
|
56
56
|
}[]>;
|
|
@@ -58,12 +58,12 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
|
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
60
|
tenantId: string;
|
|
61
|
-
agentId: string;
|
|
62
61
|
projectId: string;
|
|
62
|
+
agentId: string;
|
|
63
|
+
subAgentId: string;
|
|
63
64
|
id: string;
|
|
64
65
|
createdAt: string;
|
|
65
66
|
updatedAt: string;
|
|
66
|
-
subAgentId: string;
|
|
67
67
|
headers: Record<string, string> | null;
|
|
68
68
|
externalAgentId: string;
|
|
69
69
|
}[]>;
|
|
@@ -181,12 +181,12 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
181
181
|
};
|
|
182
182
|
}) => Promise<{
|
|
183
183
|
tenantId: string;
|
|
184
|
-
agentId: string;
|
|
185
184
|
projectId: string;
|
|
185
|
+
agentId: string;
|
|
186
|
+
subAgentId: string;
|
|
186
187
|
id: string;
|
|
187
188
|
createdAt: string;
|
|
188
189
|
updatedAt: string;
|
|
189
|
-
subAgentId: string;
|
|
190
190
|
headers: Record<string, string> | null;
|
|
191
191
|
externalAgentId: string;
|
|
192
192
|
}>;
|
|
@@ -198,12 +198,12 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
198
198
|
externalAgentId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
200
|
tenantId: string;
|
|
201
|
-
agentId: string;
|
|
202
201
|
projectId: string;
|
|
202
|
+
agentId: string;
|
|
203
|
+
subAgentId: string;
|
|
203
204
|
id: string;
|
|
204
205
|
createdAt: string;
|
|
205
206
|
updatedAt: string;
|
|
206
|
-
subAgentId: string;
|
|
207
207
|
headers: Record<string, string> | null;
|
|
208
208
|
externalAgentId: string;
|
|
209
209
|
} | undefined>;
|
|
@@ -219,12 +219,12 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
219
219
|
};
|
|
220
220
|
}) => Promise<{
|
|
221
221
|
tenantId: string;
|
|
222
|
-
agentId: string;
|
|
223
222
|
projectId: string;
|
|
223
|
+
agentId: string;
|
|
224
|
+
subAgentId: string;
|
|
224
225
|
id: string;
|
|
225
226
|
createdAt: string;
|
|
226
227
|
updatedAt: string;
|
|
227
|
-
subAgentId: string;
|
|
228
228
|
headers: Record<string, string> | null;
|
|
229
229
|
externalAgentId: string;
|
|
230
230
|
}>;
|
|
@@ -10,14 +10,14 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
10
10
|
relationId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
tenantId: string;
|
|
13
|
-
agentId: string;
|
|
14
13
|
projectId: string;
|
|
14
|
+
agentId: string;
|
|
15
15
|
id: string;
|
|
16
16
|
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
|
+
relationType: string | null;
|
|
18
19
|
sourceSubAgentId: string;
|
|
19
20
|
targetSubAgentId: string | null;
|
|
20
|
-
relationType: string | null;
|
|
21
21
|
} | undefined>;
|
|
22
22
|
declare const listAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
23
|
scopes: AgentScopeConfig;
|
|
@@ -45,27 +45,27 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
45
45
|
scopes: SubAgentScopeConfig;
|
|
46
46
|
}) => Promise<{
|
|
47
47
|
tenantId: string;
|
|
48
|
-
agentId: string;
|
|
49
48
|
projectId: string;
|
|
49
|
+
agentId: string;
|
|
50
50
|
id: string;
|
|
51
51
|
createdAt: string;
|
|
52
52
|
updatedAt: string;
|
|
53
|
+
relationType: string | null;
|
|
53
54
|
sourceSubAgentId: string;
|
|
54
55
|
targetSubAgentId: string | null;
|
|
55
|
-
relationType: string | null;
|
|
56
56
|
}[]>;
|
|
57
57
|
declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
58
58
|
scopes: AgentScopeConfig;
|
|
59
59
|
}) => Promise<{
|
|
60
60
|
tenantId: string;
|
|
61
|
-
agentId: string;
|
|
62
61
|
projectId: string;
|
|
62
|
+
agentId: string;
|
|
63
63
|
id: string;
|
|
64
64
|
createdAt: string;
|
|
65
65
|
updatedAt: string;
|
|
66
|
+
relationType: string | null;
|
|
66
67
|
sourceSubAgentId: string;
|
|
67
68
|
targetSubAgentId: string | null;
|
|
68
|
-
relationType: string | null;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const getAgentRelationsBySource: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -127,14 +127,14 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
127
127
|
}>;
|
|
128
128
|
declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
129
129
|
tenantId: string;
|
|
130
|
-
agentId: string;
|
|
131
130
|
projectId: string;
|
|
131
|
+
agentId: string;
|
|
132
132
|
id: string;
|
|
133
133
|
createdAt: string;
|
|
134
134
|
updatedAt: string;
|
|
135
|
+
relationType: string | null;
|
|
135
136
|
sourceSubAgentId: string;
|
|
136
137
|
targetSubAgentId: string | null;
|
|
137
|
-
relationType: string | null;
|
|
138
138
|
}>;
|
|
139
139
|
/**
|
|
140
140
|
* Check if sub-agent relation exists by agent, source, target, and relation type
|
|
@@ -146,28 +146,28 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
146
146
|
relationType: string;
|
|
147
147
|
}) => Promise<{
|
|
148
148
|
tenantId: string;
|
|
149
|
-
agentId: string;
|
|
150
149
|
projectId: string;
|
|
150
|
+
agentId: string;
|
|
151
151
|
id: string;
|
|
152
152
|
createdAt: string;
|
|
153
153
|
updatedAt: string;
|
|
154
|
+
relationType: string | null;
|
|
154
155
|
sourceSubAgentId: string;
|
|
155
156
|
targetSubAgentId: string | null;
|
|
156
|
-
relationType: string | null;
|
|
157
157
|
} | undefined>;
|
|
158
158
|
/**
|
|
159
159
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
160
160
|
*/
|
|
161
161
|
declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
162
162
|
tenantId: string;
|
|
163
|
-
agentId: string;
|
|
164
163
|
projectId: string;
|
|
164
|
+
agentId: string;
|
|
165
165
|
id: string;
|
|
166
166
|
createdAt: string;
|
|
167
167
|
updatedAt: string;
|
|
168
|
+
relationType: string | null;
|
|
168
169
|
sourceSubAgentId: string;
|
|
169
170
|
targetSubAgentId: string | null;
|
|
170
|
-
relationType: string | null;
|
|
171
171
|
}>;
|
|
172
172
|
declare const updateAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
173
173
|
scopes: AgentScopeConfig;
|
|
@@ -205,18 +205,18 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
205
205
|
};
|
|
206
206
|
}) => Promise<{
|
|
207
207
|
tenantId: string;
|
|
208
|
-
agentId: string;
|
|
209
208
|
projectId: string;
|
|
209
|
+
agentId: string;
|
|
210
|
+
subAgentId: string;
|
|
210
211
|
id: string;
|
|
211
212
|
createdAt: string;
|
|
212
213
|
updatedAt: string;
|
|
213
|
-
subAgentId: string;
|
|
214
|
-
headers: Record<string, string> | null;
|
|
215
214
|
toolId: string;
|
|
215
|
+
headers: Record<string, string> | null;
|
|
216
|
+
selectedTools: string[] | null;
|
|
216
217
|
toolPolicies: Record<string, {
|
|
217
218
|
needsApproval?: boolean;
|
|
218
219
|
}> | null;
|
|
219
|
-
selectedTools: string[] | null;
|
|
220
220
|
}>;
|
|
221
221
|
declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
222
222
|
scopes: AgentScopeConfig;
|
|
@@ -249,18 +249,18 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
249
249
|
relationId: string;
|
|
250
250
|
}) => Promise<{
|
|
251
251
|
tenantId: string;
|
|
252
|
-
agentId: string;
|
|
253
252
|
projectId: string;
|
|
253
|
+
agentId: string;
|
|
254
|
+
subAgentId: string;
|
|
254
255
|
id: string;
|
|
255
256
|
createdAt: string;
|
|
256
257
|
updatedAt: string;
|
|
257
|
-
subAgentId: string;
|
|
258
|
-
headers: Record<string, string> | null;
|
|
259
258
|
toolId: string;
|
|
259
|
+
headers: Record<string, string> | null;
|
|
260
|
+
selectedTools: string[] | null;
|
|
260
261
|
toolPolicies: Record<string, {
|
|
261
262
|
needsApproval?: boolean;
|
|
262
263
|
}> | null;
|
|
263
|
-
selectedTools: string[] | null;
|
|
264
264
|
} | undefined>;
|
|
265
265
|
declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
266
266
|
scopes: SubAgentScopeConfig;
|