@inkeep/agents-core 0.0.0-dev-20260105192809 → 0.0.0-dev-20260105194521
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.d.ts +18 -18
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +1 -2
- package/dist/constants/otel-attributes.d.ts +2 -0
- package/dist/constants/otel-attributes.js +4 -2
- package/dist/constants/signoz-queries.d.ts +1 -0
- package/dist/constants/signoz-queries.js +2 -1
- package/dist/data-access/agents.d.ts +41 -41
- package/dist/data-access/apiKeys.d.ts +20 -20
- package/dist/data-access/artifactComponents.d.ts +12 -12
- package/dist/data-access/contextConfigs.d.ts +12 -12
- package/dist/data-access/conversations.d.ts +12 -12
- package/dist/data-access/dataComponents.d.ts +6 -6
- package/dist/data-access/functionTools.d.ts +8 -8
- package/dist/data-access/ledgerArtifacts.d.ts +4 -2
- package/dist/data-access/ledgerArtifacts.js +10 -6
- package/dist/data-access/messages.d.ts +18 -18
- package/dist/data-access/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/subAgentRelations.d.ts +26 -26
- package/dist/data-access/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/subAgents.d.ts +15 -15
- package/dist/data-access/tasks.d.ts +4 -4
- package/dist/data-access/tools.d.ts +27 -27
- package/dist/db/schema.d.ts +288 -288
- package/dist/types/a2a.d.ts +1 -0
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1011 -1011
- package/package.json +1 -1
|
@@ -14,14 +14,14 @@ declare const listConversations: (db: DatabaseClient) => (params: {
|
|
|
14
14
|
total: number;
|
|
15
15
|
}>;
|
|
16
16
|
declare const createConversation: (db: DatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
17
|
-
tenantId: string;
|
|
18
|
-
projectId: string;
|
|
19
17
|
id: string;
|
|
20
|
-
title: string | null;
|
|
21
18
|
createdAt: string;
|
|
22
19
|
updatedAt: string;
|
|
23
20
|
userId: string | null;
|
|
24
21
|
metadata: ConversationMetadata | null;
|
|
22
|
+
projectId: string;
|
|
23
|
+
tenantId: string;
|
|
24
|
+
title: string | null;
|
|
25
25
|
activeSubAgentId: string;
|
|
26
26
|
lastContextResolution: string | null;
|
|
27
27
|
}>;
|
|
@@ -65,14 +65,14 @@ declare const getConversation: (db: DatabaseClient) => (params: {
|
|
|
65
65
|
scopes: ProjectScopeConfig;
|
|
66
66
|
conversationId: string;
|
|
67
67
|
}) => Promise<{
|
|
68
|
-
tenantId: string;
|
|
69
|
-
projectId: string;
|
|
70
68
|
id: string;
|
|
71
|
-
title: string | null;
|
|
72
69
|
createdAt: string;
|
|
73
70
|
updatedAt: string;
|
|
74
71
|
userId: string | null;
|
|
75
72
|
metadata: ConversationMetadata | null;
|
|
73
|
+
projectId: string;
|
|
74
|
+
tenantId: string;
|
|
75
|
+
title: string | null;
|
|
76
76
|
activeSubAgentId: string;
|
|
77
77
|
lastContextResolution: string | null;
|
|
78
78
|
} | undefined>;
|
|
@@ -89,14 +89,14 @@ declare const createOrGetConversation: (db: DatabaseClient) => (input: Conversat
|
|
|
89
89
|
metadata?: ConversationMetadata | null | undefined;
|
|
90
90
|
contextConfigId?: string | undefined;
|
|
91
91
|
} | {
|
|
92
|
-
tenantId: string;
|
|
93
|
-
projectId: string;
|
|
94
92
|
id: string;
|
|
95
|
-
title: string | null;
|
|
96
93
|
createdAt: string;
|
|
97
94
|
updatedAt: string;
|
|
98
95
|
userId: string | null;
|
|
99
96
|
metadata: ConversationMetadata | null;
|
|
97
|
+
projectId: string;
|
|
98
|
+
tenantId: string;
|
|
99
|
+
title: string | null;
|
|
100
100
|
activeSubAgentId: string;
|
|
101
101
|
lastContextResolution: string | null;
|
|
102
102
|
}>;
|
|
@@ -115,14 +115,14 @@ declare const getActiveAgentForConversation: (db: DatabaseClient) => (params: {
|
|
|
115
115
|
scopes: ProjectScopeConfig;
|
|
116
116
|
conversationId: string;
|
|
117
117
|
}) => Promise<{
|
|
118
|
-
tenantId: string;
|
|
119
|
-
projectId: string;
|
|
120
118
|
id: string;
|
|
121
|
-
title: string | null;
|
|
122
119
|
createdAt: string;
|
|
123
120
|
updatedAt: string;
|
|
124
121
|
userId: string | null;
|
|
125
122
|
metadata: ConversationMetadata | null;
|
|
123
|
+
projectId: string;
|
|
124
|
+
tenantId: string;
|
|
125
|
+
title: string | null;
|
|
126
126
|
activeSubAgentId: string;
|
|
127
127
|
lastContextResolution: string | null;
|
|
128
128
|
} | undefined>;
|
|
@@ -64,11 +64,11 @@ declare const associateDataComponentWithAgent: (db: DatabaseClient) => (params:
|
|
|
64
64
|
scopes: SubAgentScopeConfig;
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
67
|
-
tenantId: string;
|
|
68
|
-
projectId: string;
|
|
69
67
|
id: string;
|
|
70
|
-
agentId: string;
|
|
71
68
|
createdAt: string;
|
|
69
|
+
agentId: string;
|
|
70
|
+
projectId: string;
|
|
71
|
+
tenantId: string;
|
|
72
72
|
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
@@ -106,11 +106,11 @@ declare const upsertAgentDataComponentRelation: (db: DatabaseClient) => (params:
|
|
|
106
106
|
scopes: SubAgentScopeConfig;
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
109
|
-
tenantId: string;
|
|
110
|
-
projectId: string;
|
|
111
109
|
id: string;
|
|
112
|
-
agentId: string;
|
|
113
110
|
createdAt: string;
|
|
111
|
+
agentId: string;
|
|
112
|
+
projectId: string;
|
|
113
|
+
tenantId: string;
|
|
114
114
|
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: DatabaseClient) => (params: {
|
|
|
53
53
|
data: FunctionToolApiInsert;
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
|
-
tenantId: string;
|
|
57
|
-
projectId: string;
|
|
58
56
|
id: string;
|
|
59
57
|
name: string;
|
|
60
|
-
description: string | null;
|
|
61
|
-
agentId: string;
|
|
62
58
|
createdAt: string;
|
|
63
59
|
updatedAt: string;
|
|
60
|
+
description: string | null;
|
|
61
|
+
agentId: string;
|
|
62
|
+
projectId: string;
|
|
63
|
+
tenantId: string;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: DatabaseClient) => (params: {
|
|
|
95
95
|
data: FunctionToolApiInsert;
|
|
96
96
|
scopes: AgentScopeConfig;
|
|
97
97
|
}) => Promise<{
|
|
98
|
-
tenantId: string;
|
|
99
|
-
projectId: string;
|
|
100
98
|
id: string;
|
|
101
99
|
name: string;
|
|
102
|
-
description: string | null;
|
|
103
|
-
agentId: string;
|
|
104
100
|
createdAt: string;
|
|
105
101
|
updatedAt: string;
|
|
102
|
+
description: string | null;
|
|
103
|
+
agentId: string;
|
|
104
|
+
projectId: string;
|
|
105
|
+
tenantId: string;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: DatabaseClient) => (params: {
|
|
@@ -29,13 +29,15 @@ declare const addLedgerArtifacts: (db: DatabaseClient) => (params: {
|
|
|
29
29
|
artifacts: Artifact[];
|
|
30
30
|
}) => Promise<void>;
|
|
31
31
|
/**
|
|
32
|
-
* Retrieve artifacts by taskId, toolCallId, and/or artifactId.
|
|
33
|
-
* At least one of taskId, toolCallId, or artifactId must be provided.
|
|
32
|
+
* Retrieve artifacts by taskId, toolCallId, toolCallIds, and/or artifactId.
|
|
33
|
+
* At least one of taskId, toolCallId, toolCallIds, or artifactId must be provided.
|
|
34
|
+
* Use toolCallIds for batch queries to avoid N+1 query problems.
|
|
34
35
|
*/
|
|
35
36
|
declare const getLedgerArtifacts: (db: DatabaseClient) => (params: {
|
|
36
37
|
scopes: ProjectScopeConfig;
|
|
37
38
|
taskId?: string;
|
|
38
39
|
toolCallId?: string;
|
|
40
|
+
toolCallIds?: string[];
|
|
39
41
|
artifactId?: string;
|
|
40
42
|
}) => Promise<Artifact[]>;
|
|
41
43
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ledgerArtifacts } from "../db/schema.js";
|
|
2
2
|
import { generateId } from "../utils/conversations.js";
|
|
3
|
-
import { and, count, eq } from "drizzle-orm";
|
|
3
|
+
import { and, count, eq, inArray } from "drizzle-orm";
|
|
4
4
|
|
|
5
5
|
//#region src/data-access/ledgerArtifacts.ts
|
|
6
6
|
/**
|
|
@@ -195,16 +195,19 @@ const addLedgerArtifacts = (db) => async (params) => {
|
|
|
195
195
|
throw sanitizedError;
|
|
196
196
|
};
|
|
197
197
|
/**
|
|
198
|
-
* Retrieve artifacts by taskId, toolCallId, and/or artifactId.
|
|
199
|
-
* At least one of taskId, toolCallId, or artifactId must be provided.
|
|
198
|
+
* Retrieve artifacts by taskId, toolCallId, toolCallIds, and/or artifactId.
|
|
199
|
+
* At least one of taskId, toolCallId, toolCallIds, or artifactId must be provided.
|
|
200
|
+
* Use toolCallIds for batch queries to avoid N+1 query problems.
|
|
200
201
|
*/
|
|
201
202
|
const getLedgerArtifacts = (db) => async (params) => {
|
|
202
|
-
const { scopes, taskId, toolCallId, artifactId } = params;
|
|
203
|
-
if (!taskId && !toolCallId && !artifactId) throw new Error("At least one of taskId, toolCallId, or artifactId must be provided");
|
|
203
|
+
const { scopes, taskId, toolCallId, toolCallIds, artifactId } = params;
|
|
204
|
+
if (!taskId && !toolCallId && !toolCallIds && !artifactId) throw new Error("At least one of taskId, toolCallId, toolCallIds, or artifactId must be provided");
|
|
205
|
+
if (toolCallId && toolCallIds) throw new Error("Cannot provide both toolCallId and toolCallIds. Use toolCallIds for batch queries.");
|
|
204
206
|
const conditions = [eq(ledgerArtifacts.tenantId, scopes.tenantId), eq(ledgerArtifacts.projectId, scopes.projectId)];
|
|
205
207
|
if (artifactId) conditions.push(eq(ledgerArtifacts.id, artifactId));
|
|
206
208
|
if (taskId) conditions.push(eq(ledgerArtifacts.taskId, taskId));
|
|
207
209
|
if (toolCallId) conditions.push(eq(ledgerArtifacts.toolCallId, toolCallId));
|
|
210
|
+
if (toolCallIds && toolCallIds.length > 0) conditions.push(inArray(ledgerArtifacts.toolCallId, toolCallIds));
|
|
208
211
|
return (await db.select().from(ledgerArtifacts).where(conditions.length > 1 ? and(...conditions) : conditions[0])).map((row) => ({
|
|
209
212
|
artifactId: row.id,
|
|
210
213
|
type: row.type ?? "source",
|
|
@@ -213,7 +216,8 @@ const getLedgerArtifacts = (db) => async (params) => {
|
|
|
213
216
|
name: row.name ?? void 0,
|
|
214
217
|
description: row.description ?? void 0,
|
|
215
218
|
parts: row.parts ?? [],
|
|
216
|
-
metadata: row.metadata || {}
|
|
219
|
+
metadata: row.metadata || {},
|
|
220
|
+
createdAt: row.createdAt
|
|
217
221
|
}));
|
|
218
222
|
};
|
|
219
223
|
/**
|
|
@@ -9,26 +9,26 @@ declare const getMessageById: (db: DatabaseClient) => (params: {
|
|
|
9
9
|
scopes: ProjectScopeConfig;
|
|
10
10
|
messageId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
12
|
id: string;
|
|
15
13
|
createdAt: string;
|
|
16
14
|
updatedAt: string;
|
|
17
15
|
metadata: MessageMetadata | null;
|
|
16
|
+
role: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
18
19
|
content: MessageContent;
|
|
20
|
+
taskId: string | null;
|
|
21
|
+
visibility: string;
|
|
19
22
|
conversationId: string;
|
|
20
23
|
fromSubAgentId: string | null;
|
|
21
24
|
toSubAgentId: string | null;
|
|
22
25
|
fromExternalAgentId: string | null;
|
|
23
26
|
toExternalAgentId: string | null;
|
|
24
|
-
taskId: string | null;
|
|
25
|
-
a2aTaskId: string | null;
|
|
26
|
-
role: string;
|
|
27
27
|
fromTeamAgentId: string | null;
|
|
28
28
|
toTeamAgentId: string | null;
|
|
29
|
-
visibility: string;
|
|
30
29
|
messageType: string;
|
|
31
30
|
parentMessageId: string | null;
|
|
31
|
+
a2aTaskId: string | null;
|
|
32
32
|
a2aSessionId: string | null;
|
|
33
33
|
} | undefined>;
|
|
34
34
|
declare const listMessages: (db: DatabaseClient) => (params: {
|
|
@@ -140,26 +140,26 @@ declare const getVisibleMessages: (db: DatabaseClient) => (params: {
|
|
|
140
140
|
id: string;
|
|
141
141
|
}[]>;
|
|
142
142
|
declare const createMessage: (db: DatabaseClient) => (params: MessageInsert) => Promise<{
|
|
143
|
-
tenantId: string;
|
|
144
|
-
projectId: string;
|
|
145
143
|
id: string;
|
|
146
144
|
createdAt: string;
|
|
147
145
|
updatedAt: string;
|
|
148
146
|
metadata: MessageMetadata | null;
|
|
147
|
+
role: string;
|
|
148
|
+
projectId: string;
|
|
149
|
+
tenantId: string;
|
|
149
150
|
content: MessageContent;
|
|
151
|
+
taskId: string | null;
|
|
152
|
+
visibility: string;
|
|
150
153
|
conversationId: string;
|
|
151
154
|
fromSubAgentId: string | null;
|
|
152
155
|
toSubAgentId: string | null;
|
|
153
156
|
fromExternalAgentId: string | null;
|
|
154
157
|
toExternalAgentId: string | null;
|
|
155
|
-
taskId: string | null;
|
|
156
|
-
a2aTaskId: string | null;
|
|
157
|
-
role: string;
|
|
158
158
|
fromTeamAgentId: string | null;
|
|
159
159
|
toTeamAgentId: string | null;
|
|
160
|
-
visibility: string;
|
|
161
160
|
messageType: string;
|
|
162
161
|
parentMessageId: string | null;
|
|
162
|
+
a2aTaskId: string | null;
|
|
163
163
|
a2aSessionId: string | null;
|
|
164
164
|
}>;
|
|
165
165
|
declare const updateMessage: (db: DatabaseClient) => (params: {
|
|
@@ -193,26 +193,26 @@ declare const deleteMessage: (db: DatabaseClient) => (params: {
|
|
|
193
193
|
scopes: ProjectScopeConfig;
|
|
194
194
|
messageId: string;
|
|
195
195
|
}) => Promise<{
|
|
196
|
-
tenantId: string;
|
|
197
|
-
projectId: string;
|
|
198
196
|
id: string;
|
|
199
197
|
createdAt: string;
|
|
200
198
|
updatedAt: string;
|
|
201
199
|
metadata: MessageMetadata | null;
|
|
200
|
+
role: string;
|
|
201
|
+
projectId: string;
|
|
202
|
+
tenantId: string;
|
|
202
203
|
content: MessageContent;
|
|
204
|
+
taskId: string | null;
|
|
205
|
+
visibility: string;
|
|
203
206
|
conversationId: string;
|
|
204
207
|
fromSubAgentId: string | null;
|
|
205
208
|
toSubAgentId: string | null;
|
|
206
209
|
fromExternalAgentId: string | null;
|
|
207
210
|
toExternalAgentId: string | null;
|
|
208
|
-
taskId: string | null;
|
|
209
|
-
a2aTaskId: string | null;
|
|
210
|
-
role: string;
|
|
211
211
|
fromTeamAgentId: string | null;
|
|
212
212
|
toTeamAgentId: string | null;
|
|
213
|
-
visibility: string;
|
|
214
213
|
messageType: string;
|
|
215
214
|
parentMessageId: string | null;
|
|
215
|
+
a2aTaskId: string | null;
|
|
216
216
|
a2aSessionId: string | null;
|
|
217
217
|
}>;
|
|
218
218
|
declare const countMessagesByConversation: (db: DatabaseClient) => (params: {
|
|
@@ -8,13 +8,13 @@ declare const getSubAgentExternalAgentRelationById: (db: DatabaseClient) => (par
|
|
|
8
8
|
scopes: SubAgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headers: Record<string, string> | null;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
externalAgentId: string;
|
|
19
19
|
subAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
@@ -43,26 +43,26 @@ declare const listSubAgentExternalAgentRelations: (db: DatabaseClient) => (param
|
|
|
43
43
|
declare const getSubAgentExternalAgentRelations: (db: DatabaseClient) => (params: {
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
48
46
|
id: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
52
49
|
headers: Record<string, string> | null;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
externalAgentId: string;
|
|
54
54
|
subAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: DatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
|
-
tenantId: string;
|
|
60
|
-
projectId: string;
|
|
61
59
|
id: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
65
62
|
headers: Record<string, string> | null;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
externalAgentId: string;
|
|
67
67
|
subAgentId: string;
|
|
68
68
|
}[]>;
|
|
@@ -179,13 +179,13 @@ declare const createSubAgentExternalAgentRelation: (db: DatabaseClient) => (para
|
|
|
179
179
|
headers?: Record<string, string> | null;
|
|
180
180
|
};
|
|
181
181
|
}) => Promise<{
|
|
182
|
-
tenantId: string;
|
|
183
|
-
projectId: string;
|
|
184
182
|
id: string;
|
|
185
|
-
agentId: string;
|
|
186
183
|
createdAt: string;
|
|
187
184
|
updatedAt: string;
|
|
188
185
|
headers: Record<string, string> | null;
|
|
186
|
+
agentId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
tenantId: string;
|
|
189
189
|
externalAgentId: string;
|
|
190
190
|
subAgentId: string;
|
|
191
191
|
}>;
|
|
@@ -196,13 +196,13 @@ declare const getSubAgentExternalAgentRelationByParams: (db: DatabaseClient) =>
|
|
|
196
196
|
scopes: SubAgentScopeConfig;
|
|
197
197
|
externalAgentId: string;
|
|
198
198
|
}) => Promise<{
|
|
199
|
-
tenantId: string;
|
|
200
|
-
projectId: string;
|
|
201
199
|
id: string;
|
|
202
|
-
agentId: string;
|
|
203
200
|
createdAt: string;
|
|
204
201
|
updatedAt: string;
|
|
205
202
|
headers: Record<string, string> | null;
|
|
203
|
+
agentId: string;
|
|
204
|
+
projectId: string;
|
|
205
|
+
tenantId: string;
|
|
206
206
|
externalAgentId: string;
|
|
207
207
|
subAgentId: string;
|
|
208
208
|
} | undefined>;
|
|
@@ -217,13 +217,13 @@ declare const upsertSubAgentExternalAgentRelation: (db: DatabaseClient) => (para
|
|
|
217
217
|
headers?: Record<string, string> | null;
|
|
218
218
|
};
|
|
219
219
|
}) => Promise<{
|
|
220
|
-
tenantId: string;
|
|
221
|
-
projectId: string;
|
|
222
220
|
id: string;
|
|
223
|
-
agentId: string;
|
|
224
221
|
createdAt: string;
|
|
225
222
|
updatedAt: string;
|
|
226
223
|
headers: Record<string, string> | null;
|
|
224
|
+
agentId: string;
|
|
225
|
+
projectId: string;
|
|
226
|
+
tenantId: string;
|
|
227
227
|
externalAgentId: string;
|
|
228
228
|
subAgentId: string;
|
|
229
229
|
}>;
|
|
@@ -8,12 +8,12 @@ declare const getAgentRelationById: (db: DatabaseClient) => (params: {
|
|
|
8
8
|
scopes: AgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
14
|
+
agentId: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
17
|
sourceSubAgentId: string;
|
|
18
18
|
targetSubAgentId: string | null;
|
|
19
19
|
relationType: string | null;
|
|
@@ -43,12 +43,12 @@ declare const listAgentRelations: (db: DatabaseClient) => (params: {
|
|
|
43
43
|
declare const getAgentRelations: (db: DatabaseClient) => (params: {
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
48
46
|
id: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
49
|
+
agentId: string;
|
|
50
|
+
projectId: string;
|
|
51
|
+
tenantId: string;
|
|
52
52
|
sourceSubAgentId: string;
|
|
53
53
|
targetSubAgentId: string | null;
|
|
54
54
|
relationType: string | null;
|
|
@@ -56,12 +56,12 @@ declare const getAgentRelations: (db: DatabaseClient) => (params: {
|
|
|
56
56
|
declare const getAgentRelationsByAgent: (db: DatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
|
-
tenantId: string;
|
|
60
|
-
projectId: string;
|
|
61
59
|
id: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
62
|
+
agentId: string;
|
|
63
|
+
projectId: string;
|
|
64
|
+
tenantId: string;
|
|
65
65
|
sourceSubAgentId: string;
|
|
66
66
|
targetSubAgentId: string | null;
|
|
67
67
|
relationType: string | null;
|
|
@@ -125,12 +125,12 @@ declare const getRelatedAgentsForAgent: (db: DatabaseClient) => (params: {
|
|
|
125
125
|
}[];
|
|
126
126
|
}>;
|
|
127
127
|
declare const createSubAgentRelation: (db: DatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
128
|
-
tenantId: string;
|
|
129
|
-
projectId: string;
|
|
130
128
|
id: string;
|
|
131
|
-
agentId: string;
|
|
132
129
|
createdAt: string;
|
|
133
130
|
updatedAt: string;
|
|
131
|
+
agentId: string;
|
|
132
|
+
projectId: string;
|
|
133
|
+
tenantId: string;
|
|
134
134
|
sourceSubAgentId: string;
|
|
135
135
|
targetSubAgentId: string | null;
|
|
136
136
|
relationType: string | null;
|
|
@@ -144,12 +144,12 @@ declare const getAgentRelationByParams: (db: DatabaseClient) => (params: {
|
|
|
144
144
|
targetSubAgentId?: string;
|
|
145
145
|
relationType: string;
|
|
146
146
|
}) => Promise<{
|
|
147
|
-
tenantId: string;
|
|
148
|
-
projectId: string;
|
|
149
147
|
id: string;
|
|
150
|
-
agentId: string;
|
|
151
148
|
createdAt: string;
|
|
152
149
|
updatedAt: string;
|
|
150
|
+
agentId: string;
|
|
151
|
+
projectId: string;
|
|
152
|
+
tenantId: string;
|
|
153
153
|
sourceSubAgentId: string;
|
|
154
154
|
targetSubAgentId: string | null;
|
|
155
155
|
relationType: string | null;
|
|
@@ -158,12 +158,12 @@ declare const getAgentRelationByParams: (db: DatabaseClient) => (params: {
|
|
|
158
158
|
* Upsert agent relation (create if it doesn't exist, no-op if it does)
|
|
159
159
|
*/
|
|
160
160
|
declare const upsertSubAgentRelation: (db: DatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
161
|
-
tenantId: string;
|
|
162
|
-
projectId: string;
|
|
163
161
|
id: string;
|
|
164
|
-
agentId: string;
|
|
165
162
|
createdAt: string;
|
|
166
163
|
updatedAt: string;
|
|
164
|
+
agentId: string;
|
|
165
|
+
projectId: string;
|
|
166
|
+
tenantId: string;
|
|
167
167
|
sourceSubAgentId: string;
|
|
168
168
|
targetSubAgentId: string | null;
|
|
169
169
|
relationType: string | null;
|
|
@@ -203,14 +203,14 @@ declare const createAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
|
203
203
|
}> | null;
|
|
204
204
|
};
|
|
205
205
|
}) => Promise<{
|
|
206
|
-
tenantId: string;
|
|
207
|
-
projectId: string;
|
|
208
206
|
id: string;
|
|
209
|
-
agentId: string;
|
|
210
207
|
createdAt: string;
|
|
211
208
|
updatedAt: string;
|
|
212
|
-
toolId: string;
|
|
213
209
|
headers: Record<string, string> | null;
|
|
210
|
+
agentId: string;
|
|
211
|
+
projectId: string;
|
|
212
|
+
tenantId: string;
|
|
213
|
+
toolId: string;
|
|
214
214
|
toolPolicies: Record<string, {
|
|
215
215
|
needsApproval?: boolean;
|
|
216
216
|
}> | null;
|
|
@@ -247,14 +247,14 @@ declare const getAgentToolRelationById: (db: DatabaseClient) => (params: {
|
|
|
247
247
|
scopes: SubAgentScopeConfig;
|
|
248
248
|
relationId: string;
|
|
249
249
|
}) => Promise<{
|
|
250
|
-
tenantId: string;
|
|
251
|
-
projectId: string;
|
|
252
250
|
id: string;
|
|
253
|
-
agentId: string;
|
|
254
251
|
createdAt: string;
|
|
255
252
|
updatedAt: string;
|
|
256
|
-
toolId: string;
|
|
257
253
|
headers: Record<string, string> | null;
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
257
|
+
toolId: string;
|
|
258
258
|
toolPolicies: Record<string, {
|
|
259
259
|
needsApproval?: boolean;
|
|
260
260
|
}> | null;
|
|
@@ -8,13 +8,13 @@ declare const getSubAgentTeamAgentRelationById: (db: DatabaseClient) => (params:
|
|
|
8
8
|
scopes: SubAgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
11
|
id: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headers: Record<string, string> | null;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
subAgentId: string;
|
|
19
19
|
targetAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
@@ -43,26 +43,26 @@ declare const listSubAgentTeamAgentRelations: (db: DatabaseClient) => (params: {
|
|
|
43
43
|
declare const getSubAgentTeamAgentRelations: (db: DatabaseClient) => (params: {
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
48
46
|
id: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
52
49
|
headers: Record<string, string> | null;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
subAgentId: string;
|
|
54
54
|
targetAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentTeamAgentRelationsByAgent: (db: DatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
|
-
tenantId: string;
|
|
60
|
-
projectId: string;
|
|
61
59
|
id: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
65
62
|
headers: Record<string, string> | null;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
subAgentId: string;
|
|
67
67
|
targetAgentId: string;
|
|
68
68
|
}[]>;
|
|
@@ -209,13 +209,13 @@ declare const createSubAgentTeamAgentRelation: (db: DatabaseClient) => (params:
|
|
|
209
209
|
headers?: Record<string, string> | null;
|
|
210
210
|
};
|
|
211
211
|
}) => Promise<{
|
|
212
|
-
tenantId: string;
|
|
213
|
-
projectId: string;
|
|
214
212
|
id: string;
|
|
215
|
-
agentId: string;
|
|
216
213
|
createdAt: string;
|
|
217
214
|
updatedAt: string;
|
|
218
215
|
headers: Record<string, string> | null;
|
|
216
|
+
agentId: string;
|
|
217
|
+
projectId: string;
|
|
218
|
+
tenantId: string;
|
|
219
219
|
subAgentId: string;
|
|
220
220
|
targetAgentId: string;
|
|
221
221
|
}>;
|
|
@@ -226,13 +226,13 @@ declare const getSubAgentTeamAgentRelationByParams: (db: DatabaseClient) => (par
|
|
|
226
226
|
scopes: SubAgentScopeConfig;
|
|
227
227
|
targetAgentId: string;
|
|
228
228
|
}) => Promise<{
|
|
229
|
-
tenantId: string;
|
|
230
|
-
projectId: string;
|
|
231
229
|
id: string;
|
|
232
|
-
agentId: string;
|
|
233
230
|
createdAt: string;
|
|
234
231
|
updatedAt: string;
|
|
235
232
|
headers: Record<string, string> | null;
|
|
233
|
+
agentId: string;
|
|
234
|
+
projectId: string;
|
|
235
|
+
tenantId: string;
|
|
236
236
|
subAgentId: string;
|
|
237
237
|
targetAgentId: string;
|
|
238
238
|
} | undefined>;
|
|
@@ -247,13 +247,13 @@ declare const upsertSubAgentTeamAgentRelation: (db: DatabaseClient) => (params:
|
|
|
247
247
|
headers?: Record<string, string> | null;
|
|
248
248
|
};
|
|
249
249
|
}) => Promise<{
|
|
250
|
-
tenantId: string;
|
|
251
|
-
projectId: string;
|
|
252
250
|
id: string;
|
|
253
|
-
agentId: string;
|
|
254
251
|
createdAt: string;
|
|
255
252
|
updatedAt: string;
|
|
256
253
|
headers: Record<string, string> | null;
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
257
257
|
subAgentId: string;
|
|
258
258
|
targetAgentId: string;
|
|
259
259
|
}>;
|