@inkeep/agents-core 0.58.15 → 0.58.17
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/auth/auth.d.ts +28 -28
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +4 -4
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +2 -2
- package/dist/data-access/manage/agents.d.ts +42 -42
- package/dist/data-access/manage/artifactComponents.d.ts +16 -16
- package/dist/data-access/manage/contextConfigs.d.ts +20 -20
- package/dist/data-access/manage/dataComponents.d.ts +8 -8
- package/dist/data-access/manage/functionTools.d.ts +18 -18
- package/dist/data-access/manage/skills.d.ts +19 -19
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +34 -34
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgents.d.ts +18 -18
- package/dist/data-access/manage/tools.d.ts +27 -27
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +10 -10
- package/dist/data-access/runtime/conversations.d.ts +35 -35
- package/dist/data-access/runtime/messages.d.ts +27 -22
- package/dist/data-access/runtime/messages.js +6 -1
- package/dist/data-access/runtime/tasks.d.ts +8 -8
- package/dist/db/runtime/runtime-schema.d.ts +8 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/schemas.d.ts +558 -558
- package/package.json +1 -1
|
@@ -9,14 +9,14 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
9
9
|
scopes: AgentScopeConfig;
|
|
10
10
|
subAgentId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
agentId: string;
|
|
15
|
-
id: string;
|
|
16
12
|
name: string;
|
|
17
|
-
|
|
13
|
+
id: string;
|
|
18
14
|
createdAt: string;
|
|
19
15
|
updatedAt: string;
|
|
16
|
+
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
|
+
description: string | null;
|
|
20
20
|
models: {
|
|
21
21
|
base?: {
|
|
22
22
|
model?: string | undefined;
|
|
@@ -31,23 +31,23 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
31
31
|
providerOptions?: Record<string, any> | undefined;
|
|
32
32
|
} | undefined;
|
|
33
33
|
} | null;
|
|
34
|
+
prompt: string | null;
|
|
34
35
|
stopWhen: {
|
|
35
36
|
stepCountIs?: number | undefined;
|
|
36
37
|
} | null;
|
|
37
|
-
prompt: string | null;
|
|
38
38
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
41
41
|
scopes: AgentScopeConfig;
|
|
42
42
|
}) => Promise<{
|
|
43
|
-
tenantId: string;
|
|
44
|
-
projectId: string;
|
|
45
|
-
agentId: string;
|
|
46
|
-
id: string;
|
|
47
43
|
name: string;
|
|
48
|
-
|
|
44
|
+
id: string;
|
|
49
45
|
createdAt: string;
|
|
50
46
|
updatedAt: string;
|
|
47
|
+
agentId: string;
|
|
48
|
+
projectId: string;
|
|
49
|
+
tenantId: string;
|
|
50
|
+
description: string | null;
|
|
51
51
|
models: {
|
|
52
52
|
base?: {
|
|
53
53
|
model?: string | undefined;
|
|
@@ -62,10 +62,10 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
62
62
|
providerOptions?: Record<string, any> | undefined;
|
|
63
63
|
} | undefined;
|
|
64
64
|
} | null;
|
|
65
|
+
prompt: string | null;
|
|
65
66
|
stopWhen: {
|
|
66
67
|
stepCountIs?: number | undefined;
|
|
67
68
|
} | null;
|
|
68
|
-
prompt: string | null;
|
|
69
69
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
70
70
|
}[]>;
|
|
71
71
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -109,14 +109,14 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
109
109
|
};
|
|
110
110
|
}>;
|
|
111
111
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
112
|
-
tenantId: string;
|
|
113
|
-
projectId: string;
|
|
114
|
-
agentId: string;
|
|
115
|
-
id: string;
|
|
116
112
|
name: string;
|
|
117
|
-
|
|
113
|
+
id: string;
|
|
118
114
|
createdAt: string;
|
|
119
115
|
updatedAt: string;
|
|
116
|
+
agentId: string;
|
|
117
|
+
projectId: string;
|
|
118
|
+
tenantId: string;
|
|
119
|
+
description: string | null;
|
|
120
120
|
models: {
|
|
121
121
|
base?: {
|
|
122
122
|
model?: string | undefined;
|
|
@@ -131,10 +131,10 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
131
131
|
providerOptions?: Record<string, any> | undefined;
|
|
132
132
|
} | undefined;
|
|
133
133
|
} | null;
|
|
134
|
+
prompt: string | null;
|
|
134
135
|
stopWhen: {
|
|
135
136
|
stepCountIs?: number | undefined;
|
|
136
137
|
} | null;
|
|
137
|
-
prompt: string | null;
|
|
138
138
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
139
139
|
}>;
|
|
140
140
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -20,13 +20,13 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
20
20
|
scopes: ProjectScopeConfig;
|
|
21
21
|
toolId: string;
|
|
22
22
|
}) => Promise<{
|
|
23
|
-
tenantId: string;
|
|
24
|
-
projectId: string;
|
|
25
|
-
id: string;
|
|
26
23
|
name: string;
|
|
27
|
-
|
|
24
|
+
id: string;
|
|
28
25
|
createdAt: string;
|
|
29
26
|
updatedAt: string;
|
|
27
|
+
projectId: string;
|
|
28
|
+
tenantId: string;
|
|
29
|
+
description: string | null;
|
|
30
30
|
headers: Record<string, string> | null;
|
|
31
31
|
config: {
|
|
32
32
|
type: "mcp";
|
|
@@ -78,13 +78,13 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
78
78
|
};
|
|
79
79
|
}>;
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
|
-
tenantId: string;
|
|
82
|
-
projectId: string;
|
|
83
|
-
id: string;
|
|
84
81
|
name: string;
|
|
85
|
-
|
|
82
|
+
id: string;
|
|
86
83
|
createdAt: string;
|
|
87
84
|
updatedAt: string;
|
|
85
|
+
projectId: string;
|
|
86
|
+
tenantId: string;
|
|
87
|
+
description: string | null;
|
|
88
88
|
headers: Record<string, string> | null;
|
|
89
89
|
config: {
|
|
90
90
|
type: "mcp";
|
|
@@ -135,18 +135,18 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
135
135
|
needsApproval?: boolean;
|
|
136
136
|
}> | null;
|
|
137
137
|
}) => Promise<{
|
|
138
|
-
tenantId: string;
|
|
139
|
-
projectId: string;
|
|
140
|
-
agentId: string;
|
|
141
|
-
subAgentId: string;
|
|
142
|
-
toolId: string;
|
|
143
138
|
id: string;
|
|
144
139
|
createdAt: string;
|
|
145
140
|
updatedAt: string;
|
|
141
|
+
agentId: string;
|
|
142
|
+
projectId: string;
|
|
143
|
+
tenantId: string;
|
|
144
|
+
toolId: string;
|
|
146
145
|
headers: Record<string, string> | null;
|
|
147
146
|
toolPolicies: Record<string, {
|
|
148
147
|
needsApproval?: boolean;
|
|
149
148
|
}> | null;
|
|
149
|
+
subAgentId: string;
|
|
150
150
|
selectedTools: string[] | null;
|
|
151
151
|
}>;
|
|
152
152
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -154,18 +154,18 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
154
154
|
subAgentId: string;
|
|
155
155
|
toolId: string;
|
|
156
156
|
}) => Promise<{
|
|
157
|
-
tenantId: string;
|
|
158
|
-
projectId: string;
|
|
159
|
-
agentId: string;
|
|
160
|
-
subAgentId: string;
|
|
161
|
-
toolId: string;
|
|
162
157
|
id: string;
|
|
163
158
|
createdAt: string;
|
|
164
159
|
updatedAt: string;
|
|
160
|
+
agentId: string;
|
|
161
|
+
projectId: string;
|
|
162
|
+
tenantId: string;
|
|
163
|
+
toolId: string;
|
|
165
164
|
headers: Record<string, string> | null;
|
|
166
165
|
toolPolicies: Record<string, {
|
|
167
166
|
needsApproval?: boolean;
|
|
168
167
|
}> | null;
|
|
168
|
+
subAgentId: string;
|
|
169
169
|
selectedTools: string[] | null;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
@@ -182,18 +182,18 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
182
182
|
}> | null;
|
|
183
183
|
relationId?: string;
|
|
184
184
|
}) => Promise<{
|
|
185
|
-
tenantId: string;
|
|
186
|
-
projectId: string;
|
|
187
|
-
agentId: string;
|
|
188
|
-
subAgentId: string;
|
|
189
|
-
toolId: string;
|
|
190
185
|
id: string;
|
|
191
186
|
createdAt: string;
|
|
192
187
|
updatedAt: string;
|
|
188
|
+
agentId: string;
|
|
189
|
+
projectId: string;
|
|
190
|
+
tenantId: string;
|
|
191
|
+
toolId: string;
|
|
193
192
|
headers: Record<string, string> | null;
|
|
194
193
|
toolPolicies: Record<string, {
|
|
195
194
|
needsApproval?: boolean;
|
|
196
195
|
}> | null;
|
|
196
|
+
subAgentId: string;
|
|
197
197
|
selectedTools: string[] | null;
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
@@ -202,13 +202,13 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
202
202
|
declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
203
203
|
data: ToolInsert;
|
|
204
204
|
}) => Promise<{
|
|
205
|
-
tenantId: string;
|
|
206
|
-
projectId: string;
|
|
207
|
-
id: string;
|
|
208
205
|
name: string;
|
|
209
|
-
|
|
206
|
+
id: string;
|
|
210
207
|
createdAt: string;
|
|
211
208
|
updatedAt: string;
|
|
209
|
+
projectId: string;
|
|
210
|
+
tenantId: string;
|
|
211
|
+
description: string | null;
|
|
212
212
|
headers: Record<string, string> | null;
|
|
213
213
|
config: {
|
|
214
214
|
type: "mcp";
|
|
@@ -8,13 +8,13 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
8
8
|
scopes: ProjectScopeConfig;
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
|
-
agentId: string;
|
|
14
|
-
id: string;
|
|
15
11
|
name: string | null;
|
|
12
|
+
id: string;
|
|
16
13
|
createdAt: string;
|
|
17
14
|
updatedAt: string;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
expiresAt: string | null;
|
|
19
19
|
publicId: string;
|
|
20
20
|
keyHash: string;
|
|
@@ -22,13 +22,13 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
22
22
|
lastUsedAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
|
-
tenantId: string;
|
|
26
|
-
projectId: string;
|
|
27
|
-
agentId: string;
|
|
28
|
-
id: string;
|
|
29
25
|
name: string | null;
|
|
26
|
+
id: string;
|
|
30
27
|
createdAt: string;
|
|
31
28
|
updatedAt: string;
|
|
29
|
+
agentId: string;
|
|
30
|
+
projectId: string;
|
|
31
|
+
tenantId: string;
|
|
32
32
|
expiresAt: string | null;
|
|
33
33
|
publicId: string;
|
|
34
34
|
keyHash: string;
|
|
@@ -39,13 +39,13 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
40
40
|
agentId?: string;
|
|
41
41
|
}) => Promise<{
|
|
42
|
-
tenantId: string;
|
|
43
|
-
projectId: string;
|
|
44
|
-
agentId: string;
|
|
45
|
-
id: string;
|
|
46
42
|
name: string | null;
|
|
43
|
+
id: string;
|
|
47
44
|
createdAt: string;
|
|
48
45
|
updatedAt: string;
|
|
46
|
+
agentId: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
tenantId: string;
|
|
49
49
|
expiresAt: string | null;
|
|
50
50
|
publicId: string;
|
|
51
51
|
keyHash: string;
|
|
@@ -66,13 +66,13 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
66
66
|
};
|
|
67
67
|
}>;
|
|
68
68
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
69
|
-
tenantId: string;
|
|
70
|
-
projectId: string;
|
|
71
|
-
agentId: string;
|
|
72
|
-
id: string;
|
|
73
69
|
name: string | null;
|
|
70
|
+
id: string;
|
|
74
71
|
createdAt: string;
|
|
75
72
|
updatedAt: string;
|
|
73
|
+
agentId: string;
|
|
74
|
+
projectId: string;
|
|
75
|
+
tenantId: string;
|
|
76
76
|
expiresAt: string | null;
|
|
77
77
|
publicId: string;
|
|
78
78
|
keyHash: string;
|
|
@@ -5,14 +5,14 @@ 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
|
-
tenantId: string | null;
|
|
9
|
-
projectId: string | null;
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
8
|
type: AppType;
|
|
13
|
-
|
|
9
|
+
name: string;
|
|
10
|
+
id: string;
|
|
14
11
|
createdAt: string;
|
|
15
12
|
updatedAt: string;
|
|
13
|
+
projectId: string | null;
|
|
14
|
+
tenantId: string | null;
|
|
15
|
+
description: string | null;
|
|
16
16
|
enabled: boolean;
|
|
17
17
|
config: {
|
|
18
18
|
type: "web_client";
|
|
@@ -48,14 +48,14 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
48
48
|
};
|
|
49
49
|
}>;
|
|
50
50
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
51
|
-
tenantId: string | null;
|
|
52
|
-
projectId: string | null;
|
|
53
|
-
id: string;
|
|
54
|
-
name: string;
|
|
55
51
|
type: AppType;
|
|
56
|
-
|
|
52
|
+
name: string;
|
|
53
|
+
id: string;
|
|
57
54
|
createdAt: string;
|
|
58
55
|
updatedAt: string;
|
|
56
|
+
projectId: string | null;
|
|
57
|
+
tenantId: string | null;
|
|
58
|
+
description: string | null;
|
|
59
59
|
enabled: boolean;
|
|
60
60
|
config: {
|
|
61
61
|
type: "web_client";
|
|
@@ -16,21 +16,21 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
16
16
|
total: number;
|
|
17
17
|
}>;
|
|
18
18
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
19
|
-
tenantId: string;
|
|
20
|
-
projectId: string;
|
|
21
|
-
agentId: string | null;
|
|
22
19
|
id: string;
|
|
23
|
-
metadata: ConversationMetadata | null;
|
|
24
20
|
createdAt: string;
|
|
25
21
|
updatedAt: string;
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
agentId: string | null;
|
|
23
|
+
projectId: string;
|
|
24
|
+
tenantId: string;
|
|
25
|
+
title: string | null;
|
|
26
|
+
metadata: ConversationMetadata | null;
|
|
28
27
|
ref: {
|
|
29
|
-
type: "
|
|
28
|
+
type: "tag" | "commit" | "branch";
|
|
30
29
|
name: string;
|
|
31
30
|
hash: string;
|
|
32
31
|
} | null;
|
|
33
|
-
|
|
32
|
+
userId: string | null;
|
|
33
|
+
activeSubAgentId: string;
|
|
34
34
|
lastContextResolution: string | null;
|
|
35
35
|
}>;
|
|
36
36
|
declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -44,7 +44,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
44
44
|
agentId: string | null;
|
|
45
45
|
activeSubAgentId: string;
|
|
46
46
|
ref: {
|
|
47
|
-
type: "
|
|
47
|
+
type: "tag" | "commit" | "branch";
|
|
48
48
|
name: string;
|
|
49
49
|
hash: string;
|
|
50
50
|
} | null;
|
|
@@ -70,7 +70,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
|
|
|
70
70
|
agentId: string | null;
|
|
71
71
|
activeSubAgentId: string;
|
|
72
72
|
ref: {
|
|
73
|
-
type: "
|
|
73
|
+
type: "tag" | "commit" | "branch";
|
|
74
74
|
name: string;
|
|
75
75
|
hash: string;
|
|
76
76
|
} | null;
|
|
@@ -85,21 +85,21 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
85
85
|
scopes: ProjectScopeConfig;
|
|
86
86
|
conversationId: string;
|
|
87
87
|
}) => Promise<{
|
|
88
|
-
tenantId: string;
|
|
89
|
-
projectId: string;
|
|
90
|
-
agentId: string | null;
|
|
91
88
|
id: string;
|
|
92
|
-
metadata: ConversationMetadata | null;
|
|
93
89
|
createdAt: string;
|
|
94
90
|
updatedAt: string;
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
agentId: string | null;
|
|
92
|
+
projectId: string;
|
|
93
|
+
tenantId: string;
|
|
94
|
+
title: string | null;
|
|
95
|
+
metadata: ConversationMetadata | null;
|
|
97
96
|
ref: {
|
|
98
|
-
type: "
|
|
97
|
+
type: "tag" | "commit" | "branch";
|
|
99
98
|
name: string;
|
|
100
99
|
hash: string;
|
|
101
100
|
} | null;
|
|
102
|
-
|
|
101
|
+
userId: string | null;
|
|
102
|
+
activeSubAgentId: string;
|
|
103
103
|
lastContextResolution: string | null;
|
|
104
104
|
} | undefined>;
|
|
105
105
|
declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input: ConversationInsert) => Promise<{
|
|
@@ -108,7 +108,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
108
108
|
tenantId: string;
|
|
109
109
|
id: string;
|
|
110
110
|
ref: {
|
|
111
|
-
type: "
|
|
111
|
+
type: "tag" | "commit" | "branch";
|
|
112
112
|
name: string;
|
|
113
113
|
hash: string;
|
|
114
114
|
};
|
|
@@ -121,21 +121,21 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
121
121
|
metadata?: ConversationMetadata | null | undefined;
|
|
122
122
|
contextConfigId?: string | undefined;
|
|
123
123
|
} | {
|
|
124
|
-
tenantId: string;
|
|
125
|
-
projectId: string;
|
|
126
|
-
agentId: string | null;
|
|
127
124
|
id: string;
|
|
128
|
-
metadata: ConversationMetadata | null;
|
|
129
125
|
createdAt: string;
|
|
130
126
|
updatedAt: string;
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
agentId: string | null;
|
|
128
|
+
projectId: string;
|
|
129
|
+
tenantId: string;
|
|
130
|
+
title: string | null;
|
|
131
|
+
metadata: ConversationMetadata | null;
|
|
133
132
|
ref: {
|
|
134
|
-
type: "
|
|
133
|
+
type: "tag" | "commit" | "branch";
|
|
135
134
|
name: string;
|
|
136
135
|
hash: string;
|
|
137
136
|
} | null;
|
|
138
|
-
|
|
137
|
+
userId: string | null;
|
|
138
|
+
activeSubAgentId: string;
|
|
139
139
|
lastContextResolution: string | null;
|
|
140
140
|
}>;
|
|
141
141
|
/**
|
|
@@ -153,21 +153,21 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
153
153
|
scopes: ProjectScopeConfig;
|
|
154
154
|
conversationId: string;
|
|
155
155
|
}) => Promise<{
|
|
156
|
-
tenantId: string;
|
|
157
|
-
projectId: string;
|
|
158
|
-
agentId: string | null;
|
|
159
156
|
id: string;
|
|
160
|
-
metadata: ConversationMetadata | null;
|
|
161
157
|
createdAt: string;
|
|
162
158
|
updatedAt: string;
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
agentId: string | null;
|
|
160
|
+
projectId: string;
|
|
161
|
+
tenantId: string;
|
|
162
|
+
title: string | null;
|
|
163
|
+
metadata: ConversationMetadata | null;
|
|
165
164
|
ref: {
|
|
166
|
-
type: "
|
|
165
|
+
type: "tag" | "commit" | "branch";
|
|
167
166
|
name: string;
|
|
168
167
|
hash: string;
|
|
169
168
|
} | null;
|
|
170
|
-
|
|
169
|
+
userId: string | null;
|
|
170
|
+
activeSubAgentId: string;
|
|
171
171
|
lastContextResolution: string | null;
|
|
172
172
|
} | undefined>;
|
|
173
173
|
/**
|
|
@@ -10,26 +10,26 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
13
|
id: string;
|
|
16
|
-
taskId: string | null;
|
|
17
|
-
metadata: MessageMetadata | null;
|
|
18
|
-
visibility: string;
|
|
19
14
|
createdAt: string;
|
|
20
15
|
updatedAt: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
metadata: MessageMetadata | null;
|
|
21
19
|
content: MessageContent;
|
|
22
20
|
role: string;
|
|
23
|
-
conversationId: string;
|
|
24
21
|
fromSubAgentId: string | null;
|
|
25
22
|
toSubAgentId: string | null;
|
|
26
23
|
fromExternalAgentId: string | null;
|
|
27
24
|
toExternalAgentId: string | null;
|
|
25
|
+
taskId: string | null;
|
|
26
|
+
a2aTaskId: string | null;
|
|
27
|
+
conversationId: string;
|
|
28
28
|
fromTeamAgentId: string | null;
|
|
29
29
|
toTeamAgentId: string | null;
|
|
30
|
+
visibility: string;
|
|
30
31
|
messageType: string;
|
|
31
32
|
parentMessageId: string | null;
|
|
32
|
-
a2aTaskId: string | null;
|
|
33
33
|
a2aSessionId: string | null;
|
|
34
34
|
} | undefined>;
|
|
35
35
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -141,26 +141,26 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
141
141
|
id: string;
|
|
142
142
|
}[]>;
|
|
143
143
|
declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
|
|
144
|
-
tenantId: string;
|
|
145
|
-
projectId: string;
|
|
146
144
|
id: string;
|
|
147
|
-
taskId: string | null;
|
|
148
|
-
metadata: MessageMetadata | null;
|
|
149
|
-
visibility: string;
|
|
150
145
|
createdAt: string;
|
|
151
146
|
updatedAt: string;
|
|
147
|
+
projectId: string;
|
|
148
|
+
tenantId: string;
|
|
149
|
+
metadata: MessageMetadata | null;
|
|
152
150
|
content: MessageContent;
|
|
153
151
|
role: string;
|
|
154
|
-
conversationId: string;
|
|
155
152
|
fromSubAgentId: string | null;
|
|
156
153
|
toSubAgentId: string | null;
|
|
157
154
|
fromExternalAgentId: string | null;
|
|
158
155
|
toExternalAgentId: string | null;
|
|
156
|
+
taskId: string | null;
|
|
157
|
+
a2aTaskId: string | null;
|
|
158
|
+
conversationId: string;
|
|
159
159
|
fromTeamAgentId: string | null;
|
|
160
160
|
toTeamAgentId: string | null;
|
|
161
|
+
visibility: string;
|
|
161
162
|
messageType: string;
|
|
162
163
|
parentMessageId: string | null;
|
|
163
|
-
a2aTaskId: string | null;
|
|
164
164
|
a2aSessionId: string | null;
|
|
165
165
|
}>;
|
|
166
166
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -194,31 +194,36 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
194
194
|
scopes: ProjectScopeConfig;
|
|
195
195
|
messageId: string;
|
|
196
196
|
}) => Promise<{
|
|
197
|
-
tenantId: string;
|
|
198
|
-
projectId: string;
|
|
199
197
|
id: string;
|
|
200
|
-
taskId: string | null;
|
|
201
|
-
metadata: MessageMetadata | null;
|
|
202
|
-
visibility: string;
|
|
203
198
|
createdAt: string;
|
|
204
199
|
updatedAt: string;
|
|
200
|
+
projectId: string;
|
|
201
|
+
tenantId: string;
|
|
202
|
+
metadata: MessageMetadata | null;
|
|
205
203
|
content: MessageContent;
|
|
206
204
|
role: string;
|
|
207
|
-
conversationId: string;
|
|
208
205
|
fromSubAgentId: string | null;
|
|
209
206
|
toSubAgentId: string | null;
|
|
210
207
|
fromExternalAgentId: string | null;
|
|
211
208
|
toExternalAgentId: string | null;
|
|
209
|
+
taskId: string | null;
|
|
210
|
+
a2aTaskId: string | null;
|
|
211
|
+
conversationId: string;
|
|
212
212
|
fromTeamAgentId: string | null;
|
|
213
213
|
toTeamAgentId: string | null;
|
|
214
|
+
visibility: string;
|
|
214
215
|
messageType: string;
|
|
215
216
|
parentMessageId: string | null;
|
|
216
|
-
a2aTaskId: string | null;
|
|
217
217
|
a2aSessionId: string | null;
|
|
218
218
|
}>;
|
|
219
219
|
declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
220
220
|
scopes: ProjectScopeConfig;
|
|
221
221
|
conversationId: string;
|
|
222
222
|
}) => Promise<number>;
|
|
223
|
+
declare const countVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
224
|
+
scopes: ProjectScopeConfig;
|
|
225
|
+
conversationId: string;
|
|
226
|
+
visibility?: MessageVisibility[];
|
|
227
|
+
}) => Promise<number>;
|
|
223
228
|
//#endregion
|
|
224
|
-
export { countMessagesByConversation, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage };
|
|
229
|
+
export { countMessagesByConversation, countVisibleMessages, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage };
|
|
@@ -56,6 +56,11 @@ const countMessagesByConversation = (db) => async (params) => {
|
|
|
56
56
|
const total = (await db.select({ count: count() }).from(messages).where(and(projectScopedWhere(messages, params.scopes), eq(messages.conversationId, params.conversationId))))[0]?.count || 0;
|
|
57
57
|
return typeof total === "string" ? Number.parseInt(total, 10) : total;
|
|
58
58
|
};
|
|
59
|
+
const countVisibleMessages = (db) => async (params) => {
|
|
60
|
+
const visibilityFilter = params.visibility || ["user-facing"];
|
|
61
|
+
const total = (await db.select({ count: count() }).from(messages).where(and(projectScopedWhere(messages, params.scopes), eq(messages.conversationId, params.conversationId), inArray(messages.visibility, visibilityFilter))))[0]?.count || 0;
|
|
62
|
+
return typeof total === "string" ? Number.parseInt(total, 10) : total;
|
|
63
|
+
};
|
|
59
64
|
|
|
60
65
|
//#endregion
|
|
61
|
-
export { countMessagesByConversation, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage };
|
|
66
|
+
export { countMessagesByConversation, countVisibleMessages, createMessage, deleteMessage, getMessageById, getMessagesByConversation, getMessagesByTask, getVisibleMessages, listMessages, updateMessage };
|
|
@@ -7,21 +7,21 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
7
7
|
|
|
8
8
|
//#region src/data-access/runtime/tasks.d.ts
|
|
9
9
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
10
|
-
tenantId: string;
|
|
11
|
-
projectId: string;
|
|
12
|
-
agentId: string;
|
|
13
|
-
subAgentId: string;
|
|
14
10
|
id: string;
|
|
15
|
-
contextId: string;
|
|
16
|
-
metadata: TaskMetadataConfig | null;
|
|
17
11
|
createdAt: string;
|
|
18
12
|
updatedAt: string;
|
|
13
|
+
agentId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
metadata: TaskMetadataConfig | null;
|
|
19
17
|
ref: {
|
|
20
|
-
type: "
|
|
18
|
+
type: "tag" | "commit" | "branch";
|
|
21
19
|
name: string;
|
|
22
20
|
hash: string;
|
|
23
21
|
} | null;
|
|
24
22
|
status: string;
|
|
23
|
+
subAgentId: string;
|
|
24
|
+
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
27
27
|
id: string;
|
|
@@ -39,7 +39,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
39
39
|
updatedAt: string;
|
|
40
40
|
contextId: string;
|
|
41
41
|
ref: {
|
|
42
|
-
type: "
|
|
42
|
+
type: "tag" | "commit" | "branch";
|
|
43
43
|
name: string;
|
|
44
44
|
hash: string;
|
|
45
45
|
} | null;
|