@inkeep/agents-core 0.75.0 → 0.75.3
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 +227 -227
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/constants/otel-attributes.d.ts +5 -3
- package/dist/constants/otel-attributes.js +5 -2
- package/dist/data-access/manage/agents.d.ts +50 -50
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- 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 +13 -13
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +22 -22
- 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 +18 -18
- package/dist/data-access/manage/triggers.d.ts +3 -3
- package/dist/data-access/manage/webhookDestinations.js +18 -14
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +19 -19
- package/dist/data-access/runtime/conversations.d.ts +28 -28
- package/dist/data-access/runtime/events.d.ts +5 -5
- package/dist/data-access/runtime/feedback.d.ts +4 -4
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/db/manage/manage-schema.d.ts +484 -484
- package/dist/db/runtime/runtime-schema.d.ts +453 -453
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas/skills.d.ts +56 -56
- package/dist/validation/schemas.d.ts +2560 -2560
- package/dist/validation/schemas.js +1 -1
- package/package.json +1 -1
|
@@ -20,12 +20,12 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
20
20
|
scopes: ProjectScopeConfig;
|
|
21
21
|
toolId: string;
|
|
22
22
|
}) => Promise<{
|
|
23
|
-
id: string;
|
|
24
|
-
tenantId: string;
|
|
25
|
-
createdAt: string;
|
|
26
|
-
name: string;
|
|
27
23
|
description: string | null;
|
|
24
|
+
tenantId: string;
|
|
28
25
|
projectId: string;
|
|
26
|
+
name: string;
|
|
27
|
+
id: string;
|
|
28
|
+
createdAt: string;
|
|
29
29
|
updatedAt: string;
|
|
30
30
|
headers: Record<string, string> | null;
|
|
31
31
|
config: {
|
|
@@ -78,12 +78,12 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
78
78
|
};
|
|
79
79
|
}>;
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
|
-
id: string;
|
|
82
|
-
tenantId: string;
|
|
83
|
-
createdAt: string;
|
|
84
|
-
name: string;
|
|
85
81
|
description: string | null;
|
|
82
|
+
tenantId: string;
|
|
86
83
|
projectId: string;
|
|
84
|
+
name: string;
|
|
85
|
+
id: string;
|
|
86
|
+
createdAt: string;
|
|
87
87
|
updatedAt: string;
|
|
88
88
|
headers: Record<string, string> | null;
|
|
89
89
|
config: {
|
|
@@ -135,13 +135,13 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
135
135
|
needsApproval?: boolean;
|
|
136
136
|
}> | null;
|
|
137
137
|
}) => Promise<{
|
|
138
|
-
id: string;
|
|
139
138
|
tenantId: string;
|
|
140
|
-
createdAt: string;
|
|
141
139
|
projectId: string;
|
|
142
140
|
agentId: string;
|
|
143
141
|
subAgentId: string;
|
|
144
142
|
toolId: string;
|
|
143
|
+
id: string;
|
|
144
|
+
createdAt: string;
|
|
145
145
|
updatedAt: string;
|
|
146
146
|
headers: Record<string, string> | null;
|
|
147
147
|
toolPolicies: Record<string, {
|
|
@@ -154,13 +154,13 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
154
154
|
subAgentId: string;
|
|
155
155
|
toolId: string;
|
|
156
156
|
}) => Promise<{
|
|
157
|
-
id: string;
|
|
158
157
|
tenantId: string;
|
|
159
|
-
createdAt: string;
|
|
160
158
|
projectId: string;
|
|
161
159
|
agentId: string;
|
|
162
160
|
subAgentId: string;
|
|
163
161
|
toolId: string;
|
|
162
|
+
id: string;
|
|
163
|
+
createdAt: string;
|
|
164
164
|
updatedAt: string;
|
|
165
165
|
headers: Record<string, string> | null;
|
|
166
166
|
toolPolicies: Record<string, {
|
|
@@ -182,13 +182,13 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
182
182
|
}> | null;
|
|
183
183
|
relationId?: string;
|
|
184
184
|
}) => Promise<{
|
|
185
|
-
id: string;
|
|
186
185
|
tenantId: string;
|
|
187
|
-
createdAt: string;
|
|
188
186
|
projectId: string;
|
|
189
187
|
agentId: string;
|
|
190
188
|
subAgentId: string;
|
|
191
189
|
toolId: string;
|
|
190
|
+
id: string;
|
|
191
|
+
createdAt: string;
|
|
192
192
|
updatedAt: string;
|
|
193
193
|
headers: Record<string, string> | null;
|
|
194
194
|
toolPolicies: Record<string, {
|
|
@@ -202,12 +202,12 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
202
202
|
declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
203
203
|
data: ToolInsert;
|
|
204
204
|
}) => Promise<{
|
|
205
|
-
id: string;
|
|
206
|
-
tenantId: string;
|
|
207
|
-
createdAt: string;
|
|
208
|
-
name: string;
|
|
209
205
|
description: string | null;
|
|
206
|
+
tenantId: string;
|
|
210
207
|
projectId: string;
|
|
208
|
+
name: string;
|
|
209
|
+
id: string;
|
|
210
|
+
createdAt: string;
|
|
211
211
|
updatedAt: string;
|
|
212
212
|
headers: Record<string, string> | null;
|
|
213
213
|
config: {
|
|
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
|
|
|
40
40
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
41
41
|
encoding: "hex" | "base64";
|
|
42
42
|
signature: {
|
|
43
|
-
source: "query" | "
|
|
43
|
+
source: "query" | "body" | "header";
|
|
44
44
|
key: string;
|
|
45
45
|
prefix?: string | undefined;
|
|
46
46
|
regex?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
signedComponents: {
|
|
49
|
-
source: "literal" | "
|
|
49
|
+
source: "literal" | "body" | "header";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
@@ -132,9 +132,9 @@ declare const createTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
132
132
|
userId: string;
|
|
133
133
|
}) => Promise<{
|
|
134
134
|
tenantId: string;
|
|
135
|
-
createdAt: string;
|
|
136
135
|
projectId: string;
|
|
137
136
|
agentId: string;
|
|
137
|
+
createdAt: string;
|
|
138
138
|
userId: string;
|
|
139
139
|
triggerId: string;
|
|
140
140
|
}>;
|
|
@@ -63,23 +63,27 @@ const listWebhookDestinationsPaginated = (db) => async (params) => {
|
|
|
63
63
|
};
|
|
64
64
|
const listWebhookDestinationsForEvent = (db) => async (params) => {
|
|
65
65
|
const { scopes, eventType, agentId } = params;
|
|
66
|
-
const
|
|
67
|
-
|
|
66
|
+
const filtered = (await db.select({
|
|
67
|
+
dest: webhookDestinations,
|
|
68
|
+
scopedAgentId: webhookDestinationAgents.agentId
|
|
69
|
+
}).from(webhookDestinations).leftJoin(webhookDestinationAgents, and(eq(webhookDestinationAgents.tenantId, webhookDestinations.tenantId), eq(webhookDestinationAgents.projectId, webhookDestinations.projectId), eq(webhookDestinationAgents.webhookDestinationId, webhookDestinations.id))).where(and(projectScopedWhere(webhookDestinations, scopes), eq(webhookDestinations.enabled, true)))).filter((row) => {
|
|
70
|
+
const types = row.dest.eventTypes;
|
|
68
71
|
return Array.isArray(types) && types.includes(eventType);
|
|
69
72
|
});
|
|
70
|
-
if (
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
if (filtered.length === 0) return [];
|
|
74
|
+
const destMap = /* @__PURE__ */ new Map();
|
|
75
|
+
for (const row of filtered) {
|
|
76
|
+
const existing = destMap.get(row.dest.id);
|
|
77
|
+
if (existing) {
|
|
78
|
+
if (row.scopedAgentId) existing.agents.push(row.scopedAgentId);
|
|
79
|
+
} else destMap.set(row.dest.id, {
|
|
80
|
+
dest: row.dest,
|
|
81
|
+
agents: row.scopedAgentId ? [row.scopedAgentId] : []
|
|
82
|
+
});
|
|
78
83
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
});
|
|
84
|
+
const results = [];
|
|
85
|
+
for (const { dest, agents } of destMap.values()) if (agents.length === 0 || agents.includes(agentId)) results.push(dest);
|
|
86
|
+
return results;
|
|
83
87
|
};
|
|
84
88
|
const createWebhookDestination = (db) => async (params) => {
|
|
85
89
|
return (await db.insert(webhookDestinations).values(params).returning())[0];
|
|
@@ -8,12 +8,12 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
8
8
|
scopes: ProjectScopeConfig;
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
id: string;
|
|
12
11
|
tenantId: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
name: string | null;
|
|
15
12
|
projectId: string;
|
|
16
13
|
agentId: string;
|
|
14
|
+
name: string | null;
|
|
15
|
+
id: string;
|
|
16
|
+
createdAt: string;
|
|
17
17
|
updatedAt: string;
|
|
18
18
|
expiresAt: string | null;
|
|
19
19
|
publicId: string;
|
|
@@ -22,12 +22,12 @@ 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
|
-
id: string;
|
|
26
25
|
tenantId: string;
|
|
27
|
-
createdAt: string;
|
|
28
|
-
name: string | null;
|
|
29
26
|
projectId: string;
|
|
30
27
|
agentId: string;
|
|
28
|
+
name: string | null;
|
|
29
|
+
id: string;
|
|
30
|
+
createdAt: string;
|
|
31
31
|
updatedAt: string;
|
|
32
32
|
expiresAt: string | null;
|
|
33
33
|
publicId: string;
|
|
@@ -39,12 +39,12 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
40
40
|
agentId?: string;
|
|
41
41
|
}) => Promise<{
|
|
42
|
-
id: string;
|
|
43
42
|
tenantId: string;
|
|
44
|
-
createdAt: string;
|
|
45
|
-
name: string | null;
|
|
46
43
|
projectId: string;
|
|
47
44
|
agentId: string;
|
|
45
|
+
name: string | null;
|
|
46
|
+
id: string;
|
|
47
|
+
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
49
|
expiresAt: string | null;
|
|
50
50
|
publicId: string;
|
|
@@ -66,12 +66,12 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
66
66
|
};
|
|
67
67
|
}>;
|
|
68
68
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
69
|
-
id: string;
|
|
70
69
|
tenantId: string;
|
|
71
|
-
createdAt: string;
|
|
72
|
-
name: string | null;
|
|
73
70
|
projectId: string;
|
|
74
71
|
agentId: string;
|
|
72
|
+
name: string | null;
|
|
73
|
+
id: string;
|
|
74
|
+
createdAt: string;
|
|
75
75
|
updatedAt: string;
|
|
76
76
|
expiresAt: string | null;
|
|
77
77
|
publicId: string;
|
|
@@ -6,15 +6,18 @@ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
|
|
|
6
6
|
//#region src/data-access/runtime/apps.d.ts
|
|
7
7
|
declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
|
|
8
8
|
type: AppType;
|
|
9
|
-
id: string;
|
|
10
|
-
tenantId: string | null;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
name: string;
|
|
13
9
|
description: string | null;
|
|
10
|
+
tenantId: string | null;
|
|
14
11
|
projectId: string | null;
|
|
12
|
+
name: string;
|
|
13
|
+
id: string;
|
|
14
|
+
createdAt: string;
|
|
15
15
|
updatedAt: string;
|
|
16
|
-
enabled: boolean;
|
|
17
16
|
prompt: string | null;
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
lastUsedAt: string | null;
|
|
19
|
+
defaultProjectId: string | null;
|
|
20
|
+
defaultAgentId: string | null;
|
|
18
21
|
config: {
|
|
19
22
|
type: "web_client";
|
|
20
23
|
webClient: {
|
|
@@ -22,7 +25,7 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
22
25
|
publicKeys: {
|
|
23
26
|
kid: string;
|
|
24
27
|
publicKey: string;
|
|
25
|
-
algorithm: "
|
|
28
|
+
algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
|
|
26
29
|
addedAt: string;
|
|
27
30
|
}[];
|
|
28
31
|
allowAnonymous: boolean;
|
|
@@ -45,9 +48,6 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
45
48
|
}[] | undefined;
|
|
46
49
|
};
|
|
47
50
|
};
|
|
48
|
-
lastUsedAt: string | null;
|
|
49
|
-
defaultProjectId: string | null;
|
|
50
|
-
defaultAgentId: string | null;
|
|
51
51
|
} | undefined>;
|
|
52
52
|
declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
|
|
53
53
|
declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -75,15 +75,18 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
75
75
|
}>;
|
|
76
76
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
77
77
|
type: AppType;
|
|
78
|
-
id: string;
|
|
79
|
-
tenantId: string | null;
|
|
80
|
-
createdAt: string;
|
|
81
|
-
name: string;
|
|
82
78
|
description: string | null;
|
|
79
|
+
tenantId: string | null;
|
|
83
80
|
projectId: string | null;
|
|
81
|
+
name: string;
|
|
82
|
+
id: string;
|
|
83
|
+
createdAt: string;
|
|
84
84
|
updatedAt: string;
|
|
85
|
-
enabled: boolean;
|
|
86
85
|
prompt: string | null;
|
|
86
|
+
enabled: boolean;
|
|
87
|
+
lastUsedAt: string | null;
|
|
88
|
+
defaultProjectId: string | null;
|
|
89
|
+
defaultAgentId: string | null;
|
|
87
90
|
config: {
|
|
88
91
|
type: "web_client";
|
|
89
92
|
webClient: {
|
|
@@ -91,7 +94,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
91
94
|
publicKeys: {
|
|
92
95
|
kid: string;
|
|
93
96
|
publicKey: string;
|
|
94
|
-
algorithm: "
|
|
97
|
+
algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
|
|
95
98
|
addedAt: string;
|
|
96
99
|
}[];
|
|
97
100
|
allowAnonymous: boolean;
|
|
@@ -114,9 +117,6 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
114
117
|
}[] | undefined;
|
|
115
118
|
};
|
|
116
119
|
};
|
|
117
|
-
lastUsedAt: string | null;
|
|
118
|
-
defaultProjectId: string | null;
|
|
119
|
-
defaultAgentId: string | null;
|
|
120
120
|
}>;
|
|
121
121
|
declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
122
122
|
scopes: TenantScopeConfig;
|
|
@@ -174,7 +174,7 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
174
174
|
publicKeys: {
|
|
175
175
|
kid: string;
|
|
176
176
|
publicKey: string;
|
|
177
|
-
algorithm: "
|
|
177
|
+
algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
|
|
178
178
|
addedAt: string;
|
|
179
179
|
}[];
|
|
180
180
|
allowAnonymous: boolean;
|
|
@@ -15,24 +15,24 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
15
15
|
total: number;
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
|
-
id: string;
|
|
19
|
-
tenantId: string;
|
|
20
|
-
createdAt: string;
|
|
21
|
-
metadata: ConversationMetadata | null;
|
|
22
|
-
title: string | null;
|
|
23
18
|
properties: Record<string, unknown> | null;
|
|
19
|
+
title: string | null;
|
|
20
|
+
tenantId: string;
|
|
24
21
|
projectId: string;
|
|
25
22
|
agentId: string | null;
|
|
23
|
+
id: string;
|
|
24
|
+
createdAt: string;
|
|
26
25
|
updatedAt: string;
|
|
27
|
-
userId: string | null;
|
|
28
26
|
ref: {
|
|
29
27
|
type: "commit" | "tag" | "branch";
|
|
30
28
|
name: string;
|
|
31
29
|
hash: string;
|
|
32
30
|
} | null;
|
|
33
|
-
|
|
31
|
+
userId: string | null;
|
|
32
|
+
metadata: ConversationMetadata | null;
|
|
34
33
|
activeSubAgentId: string;
|
|
35
34
|
lastContextResolution: string | null;
|
|
35
|
+
userProperties: Record<string, unknown> | null;
|
|
36
36
|
}>;
|
|
37
37
|
declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
38
38
|
scopes: ProjectScopeConfig;
|
|
@@ -90,24 +90,24 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
90
90
|
scopes: ProjectScopeConfig;
|
|
91
91
|
conversationId: string;
|
|
92
92
|
}) => Promise<{
|
|
93
|
-
id: string;
|
|
94
|
-
tenantId: string;
|
|
95
|
-
createdAt: string;
|
|
96
|
-
metadata: ConversationMetadata | null;
|
|
97
|
-
title: string | null;
|
|
98
93
|
properties: Record<string, unknown> | null;
|
|
94
|
+
title: string | null;
|
|
95
|
+
tenantId: string;
|
|
99
96
|
projectId: string;
|
|
100
97
|
agentId: string | null;
|
|
98
|
+
id: string;
|
|
99
|
+
createdAt: string;
|
|
101
100
|
updatedAt: string;
|
|
102
|
-
userId: string | null;
|
|
103
101
|
ref: {
|
|
104
102
|
type: "commit" | "tag" | "branch";
|
|
105
103
|
name: string;
|
|
106
104
|
hash: string;
|
|
107
105
|
} | null;
|
|
108
|
-
|
|
106
|
+
userId: string | null;
|
|
107
|
+
metadata: ConversationMetadata | null;
|
|
109
108
|
activeSubAgentId: string;
|
|
110
109
|
lastContextResolution: string | null;
|
|
110
|
+
userProperties: Record<string, unknown> | null;
|
|
111
111
|
} | undefined>;
|
|
112
112
|
declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input: ConversationInsert) => Promise<{
|
|
113
113
|
activeSubAgentId: string;
|
|
@@ -130,24 +130,24 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
130
130
|
userProperties?: Record<string, unknown> | null | undefined;
|
|
131
131
|
properties?: Record<string, unknown> | null | undefined;
|
|
132
132
|
} | {
|
|
133
|
-
id: string;
|
|
134
|
-
tenantId: string;
|
|
135
|
-
createdAt: string;
|
|
136
|
-
metadata: ConversationMetadata | null;
|
|
137
|
-
title: string | null;
|
|
138
133
|
properties: Record<string, unknown> | null;
|
|
134
|
+
title: string | null;
|
|
135
|
+
tenantId: string;
|
|
139
136
|
projectId: string;
|
|
140
137
|
agentId: string | null;
|
|
138
|
+
id: string;
|
|
139
|
+
createdAt: string;
|
|
141
140
|
updatedAt: string;
|
|
142
|
-
userId: string | null;
|
|
143
141
|
ref: {
|
|
144
142
|
type: "commit" | "tag" | "branch";
|
|
145
143
|
name: string;
|
|
146
144
|
hash: string;
|
|
147
145
|
} | null;
|
|
148
|
-
|
|
146
|
+
userId: string | null;
|
|
147
|
+
metadata: ConversationMetadata | null;
|
|
149
148
|
activeSubAgentId: string;
|
|
150
149
|
lastContextResolution: string | null;
|
|
150
|
+
userProperties: Record<string, unknown> | null;
|
|
151
151
|
}>;
|
|
152
152
|
/**
|
|
153
153
|
* Get conversation history with filtering and context management
|
|
@@ -164,24 +164,24 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
164
164
|
scopes: ProjectScopeConfig;
|
|
165
165
|
conversationId: string;
|
|
166
166
|
}) => Promise<{
|
|
167
|
-
id: string;
|
|
168
|
-
tenantId: string;
|
|
169
|
-
createdAt: string;
|
|
170
|
-
metadata: ConversationMetadata | null;
|
|
171
|
-
title: string | null;
|
|
172
167
|
properties: Record<string, unknown> | null;
|
|
168
|
+
title: string | null;
|
|
169
|
+
tenantId: string;
|
|
173
170
|
projectId: string;
|
|
174
171
|
agentId: string | null;
|
|
172
|
+
id: string;
|
|
173
|
+
createdAt: string;
|
|
175
174
|
updatedAt: string;
|
|
176
|
-
userId: string | null;
|
|
177
175
|
ref: {
|
|
178
176
|
type: "commit" | "tag" | "branch";
|
|
179
177
|
name: string;
|
|
180
178
|
hash: string;
|
|
181
179
|
} | null;
|
|
182
|
-
|
|
180
|
+
userId: string | null;
|
|
181
|
+
metadata: ConversationMetadata | null;
|
|
183
182
|
activeSubAgentId: string;
|
|
184
183
|
lastContextResolution: string | null;
|
|
184
|
+
userProperties: Record<string, unknown> | null;
|
|
185
185
|
} | undefined>;
|
|
186
186
|
/**
|
|
187
187
|
* Set active agent for a conversation (upsert operation)
|
|
@@ -8,16 +8,16 @@ import { EventInsert } from "../../types/entities.js";
|
|
|
8
8
|
declare const createEvent: (db: AgentsRunDatabaseClient) => (params: EventInsert) => Promise<{
|
|
9
9
|
row: {
|
|
10
10
|
type: string;
|
|
11
|
-
id: string;
|
|
12
|
-
tenantId: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
metadata: Record<string, unknown> | null;
|
|
15
11
|
properties: Record<string, unknown> | null;
|
|
12
|
+
tenantId: string;
|
|
16
13
|
projectId: string;
|
|
17
14
|
agentId: string | null;
|
|
15
|
+
id: string;
|
|
16
|
+
createdAt: string;
|
|
18
17
|
updatedAt: string;
|
|
19
|
-
|
|
18
|
+
metadata: Record<string, unknown> | null;
|
|
20
19
|
userProperties: Record<string, unknown> | null;
|
|
20
|
+
conversationId: string | null;
|
|
21
21
|
messageId: string | null;
|
|
22
22
|
serverMetadata: {
|
|
23
23
|
[k: string]: unknown;
|
|
@@ -71,10 +71,10 @@ declare const getFeedbackByIds: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
71
71
|
}[]>;
|
|
72
72
|
declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: FeedbackInsert) => Promise<{
|
|
73
73
|
type: "positive" | "negative";
|
|
74
|
-
id: string;
|
|
75
74
|
tenantId: string;
|
|
76
|
-
createdAt: string;
|
|
77
75
|
projectId: string;
|
|
76
|
+
id: string;
|
|
77
|
+
createdAt: string;
|
|
78
78
|
updatedAt: string;
|
|
79
79
|
conversationId: string;
|
|
80
80
|
messageId: string | null;
|
|
@@ -101,10 +101,10 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
101
101
|
feedbackId: string;
|
|
102
102
|
}) => Promise<{
|
|
103
103
|
type: "positive" | "negative";
|
|
104
|
-
id: string;
|
|
105
104
|
tenantId: string;
|
|
106
|
-
createdAt: string;
|
|
107
105
|
projectId: string;
|
|
106
|
+
id: string;
|
|
107
|
+
createdAt: string;
|
|
108
108
|
updatedAt: string;
|
|
109
109
|
conversationId: string;
|
|
110
110
|
messageId: string | null;
|
|
@@ -10,17 +10,17 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
-
id: string;
|
|
14
|
-
tenantId: string;
|
|
15
|
-
createdAt: string;
|
|
16
|
-
metadata: MessageMetadata | null;
|
|
17
13
|
properties: Record<string, unknown> | null;
|
|
18
|
-
|
|
14
|
+
tenantId: string;
|
|
19
15
|
projectId: string;
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: string;
|
|
20
18
|
updatedAt: string;
|
|
21
|
-
|
|
19
|
+
metadata: MessageMetadata | null;
|
|
22
20
|
role: string;
|
|
21
|
+
content: MessageContent;
|
|
23
22
|
userProperties: Record<string, unknown> | null;
|
|
23
|
+
conversationId: string;
|
|
24
24
|
fromSubAgentId: string | null;
|
|
25
25
|
toSubAgentId: string | null;
|
|
26
26
|
fromExternalAgentId: string | null;
|
|
@@ -154,17 +154,17 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
154
154
|
scopes: ProjectScopeConfig;
|
|
155
155
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
156
156
|
}) => Promise<{
|
|
157
|
-
id: string;
|
|
158
|
-
tenantId: string;
|
|
159
|
-
createdAt: string;
|
|
160
|
-
metadata: MessageMetadata | null;
|
|
161
157
|
properties: Record<string, unknown> | null;
|
|
162
|
-
|
|
158
|
+
tenantId: string;
|
|
163
159
|
projectId: string;
|
|
160
|
+
id: string;
|
|
161
|
+
createdAt: string;
|
|
164
162
|
updatedAt: string;
|
|
165
|
-
|
|
163
|
+
metadata: MessageMetadata | null;
|
|
166
164
|
role: string;
|
|
165
|
+
content: MessageContent;
|
|
167
166
|
userProperties: Record<string, unknown> | null;
|
|
167
|
+
conversationId: string;
|
|
168
168
|
fromSubAgentId: string | null;
|
|
169
169
|
toSubAgentId: string | null;
|
|
170
170
|
fromExternalAgentId: string | null;
|
|
@@ -211,17 +211,17 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
211
211
|
scopes: ProjectScopeConfig;
|
|
212
212
|
messageId: string;
|
|
213
213
|
}) => Promise<{
|
|
214
|
-
id: string;
|
|
215
|
-
tenantId: string;
|
|
216
|
-
createdAt: string;
|
|
217
|
-
metadata: MessageMetadata | null;
|
|
218
214
|
properties: Record<string, unknown> | null;
|
|
219
|
-
|
|
215
|
+
tenantId: string;
|
|
220
216
|
projectId: string;
|
|
217
|
+
id: string;
|
|
218
|
+
createdAt: string;
|
|
221
219
|
updatedAt: string;
|
|
222
|
-
|
|
220
|
+
metadata: MessageMetadata | null;
|
|
223
221
|
role: string;
|
|
222
|
+
content: MessageContent;
|
|
224
223
|
userProperties: Record<string, unknown> | null;
|
|
224
|
+
conversationId: string;
|
|
225
225
|
fromSubAgentId: string | null;
|
|
226
226
|
toSubAgentId: string | null;
|
|
227
227
|
fromExternalAgentId: string | null;
|
|
@@ -40,7 +40,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|
|
43
|
-
status: "pending" | "
|
|
43
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
44
44
|
scheduledFor: string;
|
|
45
45
|
startedAt: string | null;
|
|
46
46
|
completedAt: string | null;
|
|
@@ -199,7 +199,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
199
199
|
name: string;
|
|
200
200
|
hash: string;
|
|
201
201
|
} | null;
|
|
202
|
-
status: "pending" | "
|
|
202
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
203
203
|
scheduledFor: string;
|
|
204
204
|
startedAt: string | null;
|
|
205
205
|
completedAt: string | null;
|
|
@@ -239,7 +239,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
239
239
|
name: string;
|
|
240
240
|
hash: string;
|
|
241
241
|
} | null;
|
|
242
|
-
status: "pending" | "
|
|
242
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
243
243
|
scheduledFor: string;
|
|
244
244
|
startedAt: string | null;
|
|
245
245
|
completedAt: string | null;
|
|
@@ -292,7 +292,7 @@ declare const listScheduledTriggerInvocationsByTriggerId: (db: AgentsRunDatabase
|
|
|
292
292
|
name: string;
|
|
293
293
|
hash: string;
|
|
294
294
|
} | null;
|
|
295
|
-
status: "pending" | "
|
|
295
|
+
status: "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
296
296
|
scheduledFor: string;
|
|
297
297
|
startedAt: string | null;
|
|
298
298
|
completedAt: string | null;
|
|
@@ -7,20 +7,20 @@ 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
|
-
id: string;
|
|
11
10
|
tenantId: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
metadata: TaskMetadataConfig | null;
|
|
14
11
|
projectId: string;
|
|
15
12
|
agentId: string;
|
|
16
13
|
subAgentId: string;
|
|
14
|
+
id: string;
|
|
15
|
+
createdAt: string;
|
|
17
16
|
updatedAt: string;
|
|
18
|
-
status: string;
|
|
19
17
|
ref: {
|
|
20
18
|
type: "commit" | "tag" | "branch";
|
|
21
19
|
name: string;
|
|
22
20
|
hash: string;
|
|
23
21
|
} | null;
|
|
22
|
+
metadata: TaskMetadataConfig | null;
|
|
23
|
+
status: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|