@inkeep/agents-core 0.0.0-dev-20260325103346 → 0.0.0-dev-20260325201121
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 +137 -137
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +3 -3
- package/dist/data-access/manage/agents.d.ts +42 -42
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- package/dist/data-access/manage/contextConfigs.d.ts +16 -16
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +14 -14
- package/dist/data-access/manage/skills.d.ts +15 -15
- 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 +18 -18
- package/dist/data-access/manage/tools.d.ts +27 -27
- package/dist/data-access/manage/triggers.d.ts +1 -1
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +12 -12
- package/dist/data-access/runtime/conversations.d.ts +18 -18
- package/dist/data-access/runtime/conversations.js +17 -1
- 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 +4 -4
- package/dist/db/manage/manage-schema.d.ts +451 -451
- package/dist/db/runtime/runtime-schema.d.ts +332 -332
- package/dist/types/utility.d.ts +1 -0
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/schemas.d.ts +1755 -1755
- package/package.json +1 -1
|
@@ -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,16 +207,16 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
207
207
|
id: string;
|
|
208
208
|
createdAt: string;
|
|
209
209
|
updatedAt: string;
|
|
210
|
-
tenantId: string;
|
|
211
|
-
projectId: string;
|
|
212
210
|
agentId: string;
|
|
213
|
-
|
|
211
|
+
projectId: string;
|
|
212
|
+
tenantId: string;
|
|
214
213
|
subAgentId: string;
|
|
214
|
+
toolId: string;
|
|
215
215
|
headers: Record<string, string> | null;
|
|
216
|
-
selectedTools: string[] | null;
|
|
217
216
|
toolPolicies: Record<string, {
|
|
218
217
|
needsApproval?: boolean;
|
|
219
218
|
}> | null;
|
|
219
|
+
selectedTools: string[] | null;
|
|
220
220
|
}>;
|
|
221
221
|
declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
|
|
222
222
|
scopes: AgentScopeConfig;
|
|
@@ -251,16 +251,16 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
251
251
|
id: string;
|
|
252
252
|
createdAt: string;
|
|
253
253
|
updatedAt: string;
|
|
254
|
-
tenantId: string;
|
|
255
|
-
projectId: string;
|
|
256
254
|
agentId: string;
|
|
257
|
-
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
258
257
|
subAgentId: string;
|
|
258
|
+
toolId: string;
|
|
259
259
|
headers: Record<string, string> | null;
|
|
260
|
-
selectedTools: string[] | null;
|
|
261
260
|
toolPolicies: Record<string, {
|
|
262
261
|
needsApproval?: boolean;
|
|
263
262
|
}> | null;
|
|
263
|
+
selectedTools: string[] | null;
|
|
264
264
|
} | undefined>;
|
|
265
265
|
declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
266
266
|
scopes: SubAgentScopeConfig;
|
|
@@ -12,9 +12,9 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
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
|
subAgentId: string;
|
|
19
19
|
headers: Record<string, string> | null;
|
|
20
20
|
targetAgentId: string;
|
|
@@ -47,9 +47,9 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
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
|
subAgentId: string;
|
|
54
54
|
headers: Record<string, string> | null;
|
|
55
55
|
targetAgentId: string;
|
|
@@ -60,9 +60,9 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
|
|
|
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
|
subAgentId: string;
|
|
67
67
|
headers: Record<string, string> | null;
|
|
68
68
|
targetAgentId: string;
|
|
@@ -213,9 +213,9 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
213
213
|
id: string;
|
|
214
214
|
createdAt: string;
|
|
215
215
|
updatedAt: string;
|
|
216
|
-
tenantId: string;
|
|
217
|
-
projectId: string;
|
|
218
216
|
agentId: string;
|
|
217
|
+
projectId: string;
|
|
218
|
+
tenantId: string;
|
|
219
219
|
subAgentId: string;
|
|
220
220
|
headers: Record<string, string> | null;
|
|
221
221
|
targetAgentId: string;
|
|
@@ -230,9 +230,9 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
230
230
|
id: string;
|
|
231
231
|
createdAt: string;
|
|
232
232
|
updatedAt: string;
|
|
233
|
-
tenantId: string;
|
|
234
|
-
projectId: string;
|
|
235
233
|
agentId: string;
|
|
234
|
+
projectId: string;
|
|
235
|
+
tenantId: string;
|
|
236
236
|
subAgentId: string;
|
|
237
237
|
headers: Record<string, string> | null;
|
|
238
238
|
targetAgentId: string;
|
|
@@ -251,9 +251,9 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
251
251
|
id: string;
|
|
252
252
|
createdAt: string;
|
|
253
253
|
updatedAt: string;
|
|
254
|
-
tenantId: string;
|
|
255
|
-
projectId: string;
|
|
256
254
|
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
257
257
|
subAgentId: string;
|
|
258
258
|
headers: Record<string, string> | null;
|
|
259
259
|
targetAgentId: string;
|
|
@@ -10,7 +10,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
subAgentId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
|
+
createdAt: string;
|
|
13
14
|
name: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
14
19
|
description: string | null;
|
|
15
20
|
models: {
|
|
16
21
|
base?: {
|
|
@@ -26,22 +31,22 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
26
31
|
providerOptions?: Record<string, any> | undefined;
|
|
27
32
|
} | undefined;
|
|
28
33
|
} | null;
|
|
34
|
+
prompt: string | null;
|
|
29
35
|
stopWhen: {
|
|
30
36
|
stepCountIs?: number | undefined;
|
|
31
37
|
} | null;
|
|
32
|
-
createdAt: string;
|
|
33
|
-
updatedAt: string;
|
|
34
|
-
tenantId: string;
|
|
35
|
-
prompt: string | null;
|
|
36
|
-
projectId: string;
|
|
37
|
-
agentId: string;
|
|
38
38
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
41
41
|
scopes: AgentScopeConfig;
|
|
42
42
|
}) => Promise<{
|
|
43
43
|
id: string;
|
|
44
|
+
createdAt: string;
|
|
44
45
|
name: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
agentId: string;
|
|
48
|
+
projectId: string;
|
|
49
|
+
tenantId: string;
|
|
45
50
|
description: string | null;
|
|
46
51
|
models: {
|
|
47
52
|
base?: {
|
|
@@ -57,15 +62,10 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
57
62
|
providerOptions?: Record<string, any> | undefined;
|
|
58
63
|
} | undefined;
|
|
59
64
|
} | null;
|
|
65
|
+
prompt: string | null;
|
|
60
66
|
stopWhen: {
|
|
61
67
|
stepCountIs?: number | undefined;
|
|
62
68
|
} | null;
|
|
63
|
-
createdAt: string;
|
|
64
|
-
updatedAt: string;
|
|
65
|
-
tenantId: string;
|
|
66
|
-
prompt: string | null;
|
|
67
|
-
projectId: string;
|
|
68
|
-
agentId: string;
|
|
69
69
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
70
70
|
}[]>;
|
|
71
71
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -110,7 +110,12 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
110
110
|
}>;
|
|
111
111
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
112
112
|
id: string;
|
|
113
|
+
createdAt: string;
|
|
113
114
|
name: string;
|
|
115
|
+
updatedAt: string;
|
|
116
|
+
agentId: string;
|
|
117
|
+
projectId: string;
|
|
118
|
+
tenantId: string;
|
|
114
119
|
description: string | null;
|
|
115
120
|
models: {
|
|
116
121
|
base?: {
|
|
@@ -126,15 +131,10 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
126
131
|
providerOptions?: Record<string, any> | undefined;
|
|
127
132
|
} | undefined;
|
|
128
133
|
} | null;
|
|
134
|
+
prompt: string | null;
|
|
129
135
|
stopWhen: {
|
|
130
136
|
stepCountIs?: number | undefined;
|
|
131
137
|
} | null;
|
|
132
|
-
createdAt: string;
|
|
133
|
-
updatedAt: string;
|
|
134
|
-
tenantId: string;
|
|
135
|
-
prompt: string | null;
|
|
136
|
-
projectId: string;
|
|
137
|
-
agentId: string;
|
|
138
138
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
139
139
|
}>;
|
|
140
140
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -21,19 +21,19 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
21
21
|
toolId: string;
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
description: string | null;
|
|
26
24
|
createdAt: string;
|
|
25
|
+
name: string;
|
|
27
26
|
updatedAt: string;
|
|
28
|
-
tenantId: string;
|
|
29
27
|
projectId: string;
|
|
30
|
-
|
|
28
|
+
tenantId: string;
|
|
29
|
+
description: string | null;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
31
31
|
config: {
|
|
32
32
|
type: "mcp";
|
|
33
33
|
mcp: ToolMcpConfig;
|
|
34
34
|
};
|
|
35
|
+
credentialReferenceId: string | null;
|
|
35
36
|
credentialScope: string;
|
|
36
|
-
headers: Record<string, string> | null;
|
|
37
37
|
imageUrl: string | null;
|
|
38
38
|
capabilities: ToolServerCapabilities | null;
|
|
39
39
|
lastError: string | null;
|
|
@@ -79,19 +79,19 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
79
79
|
}>;
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
81
|
id: string;
|
|
82
|
-
name: string;
|
|
83
|
-
description: string | null;
|
|
84
82
|
createdAt: string;
|
|
83
|
+
name: string;
|
|
85
84
|
updatedAt: string;
|
|
86
|
-
tenantId: string;
|
|
87
85
|
projectId: string;
|
|
88
|
-
|
|
86
|
+
tenantId: string;
|
|
87
|
+
description: string | null;
|
|
88
|
+
headers: Record<string, string> | null;
|
|
89
89
|
config: {
|
|
90
90
|
type: "mcp";
|
|
91
91
|
mcp: ToolMcpConfig;
|
|
92
92
|
};
|
|
93
|
+
credentialReferenceId: string | null;
|
|
93
94
|
credentialScope: string;
|
|
94
|
-
headers: Record<string, string> | null;
|
|
95
95
|
imageUrl: string | null;
|
|
96
96
|
capabilities: ToolServerCapabilities | null;
|
|
97
97
|
lastError: string | null;
|
|
@@ -138,16 +138,16 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
138
138
|
id: string;
|
|
139
139
|
createdAt: string;
|
|
140
140
|
updatedAt: string;
|
|
141
|
-
tenantId: string;
|
|
142
|
-
projectId: string;
|
|
143
141
|
agentId: string;
|
|
144
|
-
|
|
142
|
+
projectId: string;
|
|
143
|
+
tenantId: string;
|
|
145
144
|
subAgentId: string;
|
|
145
|
+
toolId: string;
|
|
146
146
|
headers: Record<string, string> | null;
|
|
147
|
-
selectedTools: string[] | null;
|
|
148
147
|
toolPolicies: Record<string, {
|
|
149
148
|
needsApproval?: boolean;
|
|
150
149
|
}> | null;
|
|
150
|
+
selectedTools: string[] | null;
|
|
151
151
|
}>;
|
|
152
152
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
153
153
|
scopes: AgentScopeConfig;
|
|
@@ -157,16 +157,16 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
157
157
|
id: string;
|
|
158
158
|
createdAt: string;
|
|
159
159
|
updatedAt: string;
|
|
160
|
-
tenantId: string;
|
|
161
|
-
projectId: string;
|
|
162
160
|
agentId: string;
|
|
163
|
-
|
|
161
|
+
projectId: string;
|
|
162
|
+
tenantId: string;
|
|
164
163
|
subAgentId: string;
|
|
164
|
+
toolId: string;
|
|
165
165
|
headers: Record<string, string> | null;
|
|
166
|
-
selectedTools: string[] | null;
|
|
167
166
|
toolPolicies: Record<string, {
|
|
168
167
|
needsApproval?: boolean;
|
|
169
168
|
}> | null;
|
|
169
|
+
selectedTools: string[] | null;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
172
172
|
* Upsert agent-tool relation (create if it doesn't exist, update if it does)
|
|
@@ -185,16 +185,16 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
185
185
|
id: string;
|
|
186
186
|
createdAt: string;
|
|
187
187
|
updatedAt: string;
|
|
188
|
-
tenantId: string;
|
|
189
|
-
projectId: string;
|
|
190
188
|
agentId: string;
|
|
191
|
-
|
|
189
|
+
projectId: string;
|
|
190
|
+
tenantId: string;
|
|
192
191
|
subAgentId: string;
|
|
192
|
+
toolId: string;
|
|
193
193
|
headers: Record<string, string> | null;
|
|
194
|
-
selectedTools: string[] | null;
|
|
195
194
|
toolPolicies: Record<string, {
|
|
196
195
|
needsApproval?: boolean;
|
|
197
196
|
}> | null;
|
|
197
|
+
selectedTools: string[] | null;
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
200
200
|
* Upsert a tool (create if it doesn't exist, update if it does)
|
|
@@ -203,19 +203,19 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
203
203
|
data: ToolInsert;
|
|
204
204
|
}) => Promise<{
|
|
205
205
|
id: string;
|
|
206
|
-
name: string;
|
|
207
|
-
description: string | null;
|
|
208
206
|
createdAt: string;
|
|
207
|
+
name: string;
|
|
209
208
|
updatedAt: string;
|
|
210
|
-
tenantId: string;
|
|
211
209
|
projectId: string;
|
|
212
|
-
|
|
210
|
+
tenantId: string;
|
|
211
|
+
description: string | null;
|
|
212
|
+
headers: Record<string, string> | null;
|
|
213
213
|
config: {
|
|
214
214
|
type: "mcp";
|
|
215
215
|
mcp: ToolMcpConfig;
|
|
216
216
|
};
|
|
217
|
+
credentialReferenceId: string | null;
|
|
217
218
|
credentialScope: string;
|
|
218
|
-
headers: Record<string, string> | null;
|
|
219
219
|
imageUrl: string | null;
|
|
220
220
|
capabilities: ToolServerCapabilities | null;
|
|
221
221
|
lastError: string | null;
|
|
@@ -40,7 +40,7 @@ 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: "query" | "header" | "body";
|
|
44
44
|
key: string;
|
|
45
45
|
prefix?: string | undefined;
|
|
46
46
|
regex?: string | undefined;
|
|
@@ -9,48 +9,48 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
name: string | null;
|
|
13
12
|
createdAt: string;
|
|
13
|
+
name: string | null;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
tenantId: string;
|
|
16
|
-
projectId: string;
|
|
17
15
|
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
expiresAt: string | null;
|
|
19
|
-
lastUsedAt: string | null;
|
|
20
19
|
publicId: string;
|
|
21
20
|
keyHash: string;
|
|
22
21
|
keyPrefix: string;
|
|
22
|
+
lastUsedAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
25
|
id: string;
|
|
26
|
-
name: string | null;
|
|
27
26
|
createdAt: string;
|
|
27
|
+
name: string | null;
|
|
28
28
|
updatedAt: string;
|
|
29
|
-
tenantId: string;
|
|
30
|
-
projectId: string;
|
|
31
29
|
agentId: string;
|
|
30
|
+
projectId: string;
|
|
31
|
+
tenantId: string;
|
|
32
32
|
expiresAt: string | null;
|
|
33
|
-
lastUsedAt: string | null;
|
|
34
33
|
publicId: string;
|
|
35
34
|
keyHash: string;
|
|
36
35
|
keyPrefix: string;
|
|
36
|
+
lastUsedAt: string | null;
|
|
37
37
|
} | undefined>;
|
|
38
38
|
declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
40
40
|
agentId?: string;
|
|
41
41
|
}) => Promise<{
|
|
42
42
|
id: string;
|
|
43
|
-
name: string | null;
|
|
44
43
|
createdAt: string;
|
|
44
|
+
name: string | null;
|
|
45
45
|
updatedAt: string;
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
48
46
|
agentId: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
tenantId: string;
|
|
49
49
|
expiresAt: string | null;
|
|
50
|
-
lastUsedAt: string | null;
|
|
51
50
|
publicId: string;
|
|
52
51
|
keyHash: string;
|
|
53
52
|
keyPrefix: string;
|
|
53
|
+
lastUsedAt: string | null;
|
|
54
54
|
}[]>;
|
|
55
55
|
declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
56
56
|
scopes: ProjectScopeConfig;
|
|
@@ -67,17 +67,17 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
67
67
|
}>;
|
|
68
68
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
69
69
|
id: string;
|
|
70
|
-
name: string | null;
|
|
71
70
|
createdAt: string;
|
|
71
|
+
name: string | null;
|
|
72
72
|
updatedAt: string;
|
|
73
|
-
tenantId: string;
|
|
74
|
-
projectId: string;
|
|
75
73
|
agentId: string;
|
|
74
|
+
projectId: string;
|
|
75
|
+
tenantId: string;
|
|
76
76
|
expiresAt: string | null;
|
|
77
|
-
lastUsedAt: string | null;
|
|
78
77
|
publicId: string;
|
|
79
78
|
keyHash: string;
|
|
80
79
|
keyPrefix: string;
|
|
80
|
+
lastUsedAt: string | null;
|
|
81
81
|
}>;
|
|
82
82
|
declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
83
|
scopes: ProjectScopeConfig;
|
|
@@ -5,15 +5,15 @@ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
|
|
|
5
5
|
|
|
6
6
|
//#region src/data-access/runtime/apps.d.ts
|
|
7
7
|
declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
|
|
8
|
-
type: AppType;
|
|
9
8
|
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
description: string | null;
|
|
12
9
|
createdAt: string;
|
|
10
|
+
name: string;
|
|
13
11
|
updatedAt: string;
|
|
12
|
+
projectId: string | null;
|
|
14
13
|
tenantId: string | null;
|
|
14
|
+
description: string | null;
|
|
15
|
+
type: AppType;
|
|
15
16
|
enabled: boolean;
|
|
16
|
-
projectId: string | null;
|
|
17
17
|
config: {
|
|
18
18
|
type: "web_client";
|
|
19
19
|
webClient: {
|
|
@@ -23,9 +23,9 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
23
23
|
type: "api";
|
|
24
24
|
api: Record<string, never>;
|
|
25
25
|
};
|
|
26
|
-
defaultAgentId: string | null;
|
|
27
|
-
defaultProjectId: string | null;
|
|
28
26
|
lastUsedAt: string | null;
|
|
27
|
+
defaultProjectId: string | null;
|
|
28
|
+
defaultAgentId: string | null;
|
|
29
29
|
} | undefined>;
|
|
30
30
|
declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
|
|
31
31
|
declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -52,15 +52,15 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
52
52
|
};
|
|
53
53
|
}>;
|
|
54
54
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
55
|
-
type: AppType;
|
|
56
55
|
id: string;
|
|
57
|
-
name: string;
|
|
58
|
-
description: string | null;
|
|
59
56
|
createdAt: string;
|
|
57
|
+
name: string;
|
|
60
58
|
updatedAt: string;
|
|
59
|
+
projectId: string | null;
|
|
61
60
|
tenantId: string | null;
|
|
61
|
+
description: string | null;
|
|
62
|
+
type: AppType;
|
|
62
63
|
enabled: boolean;
|
|
63
|
-
projectId: string | null;
|
|
64
64
|
config: {
|
|
65
65
|
type: "web_client";
|
|
66
66
|
webClient: {
|
|
@@ -70,9 +70,9 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
70
70
|
type: "api";
|
|
71
71
|
api: Record<string, never>;
|
|
72
72
|
};
|
|
73
|
-
defaultAgentId: string | null;
|
|
74
|
-
defaultProjectId: string | null;
|
|
75
73
|
lastUsedAt: string | null;
|
|
74
|
+
defaultProjectId: string | null;
|
|
75
|
+
defaultAgentId: string | null;
|
|
76
76
|
}>;
|
|
77
77
|
declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
78
78
|
scopes: TenantScopeConfig;
|
|
@@ -4,7 +4,7 @@ import { ConversationHistoryConfig, ConversationMetadata, PaginationConfig } fro
|
|
|
4
4
|
import "../../types/index.js";
|
|
5
5
|
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
6
6
|
import "../../index.js";
|
|
7
|
-
import { ConversationInsert, ConversationSelect, ConversationUpdate } from "../../types/entities.js";
|
|
7
|
+
import { ConversationInsert, ConversationSelect, ConversationUpdate, MessageSelect } from "../../types/entities.js";
|
|
8
8
|
|
|
9
9
|
//#region src/data-access/runtime/conversations.d.ts
|
|
10
10
|
declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -17,19 +17,19 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
17
17
|
}>;
|
|
18
18
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
19
19
|
id: string;
|
|
20
|
-
title: string | null;
|
|
21
20
|
createdAt: string;
|
|
22
21
|
updatedAt: string;
|
|
23
|
-
tenantId: string;
|
|
24
|
-
projectId: string;
|
|
25
22
|
agentId: string | null;
|
|
26
|
-
|
|
23
|
+
projectId: string;
|
|
24
|
+
tenantId: string;
|
|
25
|
+
title: string | null;
|
|
27
26
|
metadata: ConversationMetadata | null;
|
|
28
27
|
ref: {
|
|
29
28
|
type: "commit" | "tag" | "branch";
|
|
30
29
|
name: string;
|
|
31
30
|
hash: string;
|
|
32
31
|
} | null;
|
|
32
|
+
userId: string | null;
|
|
33
33
|
activeSubAgentId: string;
|
|
34
34
|
lastContextResolution: string | null;
|
|
35
35
|
}>;
|
|
@@ -86,19 +86,19 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
86
86
|
conversationId: string;
|
|
87
87
|
}) => Promise<{
|
|
88
88
|
id: string;
|
|
89
|
-
title: string | null;
|
|
90
89
|
createdAt: string;
|
|
91
90
|
updatedAt: string;
|
|
92
|
-
tenantId: string;
|
|
93
|
-
projectId: string;
|
|
94
91
|
agentId: string | null;
|
|
95
|
-
|
|
92
|
+
projectId: string;
|
|
93
|
+
tenantId: string;
|
|
94
|
+
title: string | null;
|
|
96
95
|
metadata: ConversationMetadata | null;
|
|
97
96
|
ref: {
|
|
98
97
|
type: "commit" | "tag" | "branch";
|
|
99
98
|
name: string;
|
|
100
99
|
hash: string;
|
|
101
100
|
} | null;
|
|
101
|
+
userId: string | null;
|
|
102
102
|
activeSubAgentId: string;
|
|
103
103
|
lastContextResolution: string | null;
|
|
104
104
|
} | undefined>;
|
|
@@ -122,19 +122,19 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
122
122
|
contextConfigId?: string | undefined;
|
|
123
123
|
} | {
|
|
124
124
|
id: string;
|
|
125
|
-
title: string | null;
|
|
126
125
|
createdAt: string;
|
|
127
126
|
updatedAt: string;
|
|
128
|
-
tenantId: string;
|
|
129
|
-
projectId: string;
|
|
130
127
|
agentId: string | null;
|
|
131
|
-
|
|
128
|
+
projectId: string;
|
|
129
|
+
tenantId: string;
|
|
130
|
+
title: string | null;
|
|
132
131
|
metadata: ConversationMetadata | null;
|
|
133
132
|
ref: {
|
|
134
133
|
type: "commit" | "tag" | "branch";
|
|
135
134
|
name: string;
|
|
136
135
|
hash: string;
|
|
137
136
|
} | null;
|
|
137
|
+
userId: string | null;
|
|
138
138
|
activeSubAgentId: string;
|
|
139
139
|
lastContextResolution: string | null;
|
|
140
140
|
}>;
|
|
@@ -145,7 +145,7 @@ declare const getConversationHistory: (db: AgentsRunDatabaseClient) => (params:
|
|
|
145
145
|
scopes: ProjectScopeConfig;
|
|
146
146
|
conversationId: string;
|
|
147
147
|
options?: ConversationHistoryConfig;
|
|
148
|
-
}) => Promise<
|
|
148
|
+
}) => Promise<MessageSelect[]>;
|
|
149
149
|
/**
|
|
150
150
|
* Get active agent for a conversation
|
|
151
151
|
*/
|
|
@@ -154,19 +154,19 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
154
154
|
conversationId: string;
|
|
155
155
|
}) => Promise<{
|
|
156
156
|
id: string;
|
|
157
|
-
title: string | null;
|
|
158
157
|
createdAt: string;
|
|
159
158
|
updatedAt: string;
|
|
160
|
-
tenantId: string;
|
|
161
|
-
projectId: string;
|
|
162
159
|
agentId: string | null;
|
|
163
|
-
|
|
160
|
+
projectId: string;
|
|
161
|
+
tenantId: string;
|
|
162
|
+
title: string | null;
|
|
164
163
|
metadata: ConversationMetadata | null;
|
|
165
164
|
ref: {
|
|
166
165
|
type: "commit" | "tag" | "branch";
|
|
167
166
|
name: string;
|
|
168
167
|
hash: string;
|
|
169
168
|
} | null;
|
|
169
|
+
userId: string | null;
|
|
170
170
|
activeSubAgentId: string;
|
|
171
171
|
lastContextResolution: string | null;
|
|
172
172
|
} | undefined>;
|
|
@@ -113,13 +113,29 @@ function applyContextWindowManagement(messageHistory, maxTokens) {
|
|
|
113
113
|
totalTokens += messageTokens;
|
|
114
114
|
} else {
|
|
115
115
|
if (i > 0) {
|
|
116
|
+
const referenceMessage = messageHistory[0];
|
|
116
117
|
const summaryMessage = {
|
|
117
118
|
id: `summary-${getConversationId()}`,
|
|
119
|
+
tenantId: referenceMessage.tenantId,
|
|
120
|
+
projectId: referenceMessage.projectId,
|
|
121
|
+
conversationId: referenceMessage.conversationId,
|
|
118
122
|
role: "system",
|
|
123
|
+
fromSubAgentId: null,
|
|
124
|
+
toSubAgentId: null,
|
|
125
|
+
fromExternalAgentId: null,
|
|
126
|
+
toExternalAgentId: null,
|
|
127
|
+
fromTeamAgentId: null,
|
|
128
|
+
toTeamAgentId: null,
|
|
119
129
|
content: { text: `[Previous conversation history truncated - ${i + 1} earlier messages]` },
|
|
120
130
|
visibility: "system",
|
|
121
131
|
messageType: "chat",
|
|
122
|
-
|
|
132
|
+
taskId: null,
|
|
133
|
+
parentMessageId: null,
|
|
134
|
+
a2aTaskId: null,
|
|
135
|
+
a2aSessionId: null,
|
|
136
|
+
metadata: null,
|
|
137
|
+
createdAt: referenceMessage.createdAt,
|
|
138
|
+
updatedAt: referenceMessage.updatedAt
|
|
123
139
|
};
|
|
124
140
|
managedHistory.unshift(summaryMessage);
|
|
125
141
|
}
|