@inkeep/agents-core 0.70.7 → 0.71.0
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-validation-schemas.d.ts +154 -154
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +3 -3
- package/dist/client-exports.js +3 -3
- package/dist/constants/allowed-file-formats.d.ts +3 -1
- package/dist/constants/allowed-file-formats.js +38 -26
- package/dist/constants/index.d.ts +3 -3
- package/dist/constants/index.js +3 -3
- package/dist/constants/signoz-queries.d.ts +6 -2
- package/dist/constants/signoz-queries.js +14 -9
- package/dist/data-access/index.d.ts +2 -1
- package/dist/data-access/index.js +2 -1
- package/dist/data-access/manage/agents.d.ts +15 -15
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/skills.d.ts +7 -7
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +9 -9
- package/dist/data-access/manage/tools.d.ts +18 -18
- package/dist/data-access/manage/triggers.d.ts +6 -6
- package/dist/data-access/manage/webhookDestinations.d.ts +60 -0
- package/dist/data-access/manage/webhookDestinations.js +113 -0
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +11 -11
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/feedback.d.ts +4 -4
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/db/manage/manage-schema.d.ts +699 -368
- package/dist/db/manage/manage-schema.js +93 -2
- package/dist/db/runtime/runtime-schema.d.ts +391 -391
- package/dist/index.d.ts +6 -5
- package/dist/index.js +5 -4
- package/dist/setup/setup.d.ts +1 -0
- package/dist/setup/setup.js +4 -1
- package/dist/types/entities.d.ts +9 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas/skills.d.ts +27 -27
- package/dist/validation/schemas.d.ts +2528 -1961
- package/dist/validation/schemas.js +67 -3
- package/drizzle/manage/0019_hesitant_runaways.sql +28 -0
- package/drizzle/manage/meta/0019_snapshot.json +4086 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { webhookDestinationAgents, webhookDestinations } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { generateId } from "../../utils/conversations.js";
|
|
3
|
+
import { projectScopedWhere } from "./scope-helpers.js";
|
|
4
|
+
import { and, count, desc, eq, inArray } from "drizzle-orm";
|
|
5
|
+
|
|
6
|
+
//#region src/data-access/manage/webhookDestinations.ts
|
|
7
|
+
const getWebhookDestinationById = (db) => async (params) => {
|
|
8
|
+
const { scopes, webhookDestinationId } = params;
|
|
9
|
+
return await db.query.webhookDestinations.findFirst({ where: and(projectScopedWhere(webhookDestinations, scopes), eq(webhookDestinations.id, webhookDestinationId)) });
|
|
10
|
+
};
|
|
11
|
+
const listWebhookDestinationsPaginated = (db) => async (params) => {
|
|
12
|
+
const page = params.pagination?.page || 1;
|
|
13
|
+
const limit = Math.min(params.pagination?.limit || 10, 100);
|
|
14
|
+
const offset = (page - 1) * limit;
|
|
15
|
+
const baseWhere = projectScopedWhere(webhookDestinations, params.scopes);
|
|
16
|
+
if (!params.agentId) {
|
|
17
|
+
const [data, totalResult] = await Promise.all([db.select().from(webhookDestinations).where(baseWhere).limit(limit).offset(offset).orderBy(desc(webhookDestinations.createdAt)), db.select({ count: count() }).from(webhookDestinations).where(baseWhere)]);
|
|
18
|
+
const total$1 = totalResult[0]?.count || 0;
|
|
19
|
+
return {
|
|
20
|
+
data,
|
|
21
|
+
pagination: {
|
|
22
|
+
page,
|
|
23
|
+
limit,
|
|
24
|
+
total: total$1,
|
|
25
|
+
pages: Math.ceil(total$1 / limit)
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const agentId = params.agentId;
|
|
30
|
+
const allDests = await db.select().from(webhookDestinations).where(baseWhere).orderBy(desc(webhookDestinations.createdAt));
|
|
31
|
+
const destIds = allDests.map((d) => d.id);
|
|
32
|
+
if (destIds.length === 0) return {
|
|
33
|
+
data: [],
|
|
34
|
+
pagination: {
|
|
35
|
+
page,
|
|
36
|
+
limit,
|
|
37
|
+
total: 0,
|
|
38
|
+
pages: 0
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const agentRows = await db.select().from(webhookDestinationAgents).where(and(eq(webhookDestinationAgents.tenantId, params.scopes.tenantId), eq(webhookDestinationAgents.projectId, params.scopes.projectId), inArray(webhookDestinationAgents.webhookDestinationId, destIds)));
|
|
42
|
+
const agentsByDest = /* @__PURE__ */ new Map();
|
|
43
|
+
for (const row of agentRows) {
|
|
44
|
+
const list = agentsByDest.get(row.webhookDestinationId) ?? [];
|
|
45
|
+
list.push(row.agentId);
|
|
46
|
+
agentsByDest.set(row.webhookDestinationId, list);
|
|
47
|
+
}
|
|
48
|
+
const filtered = allDests.filter((dest) => {
|
|
49
|
+
const agents = agentsByDest.get(dest.id);
|
|
50
|
+
return !agents || agents.length === 0 || agents.includes(agentId);
|
|
51
|
+
});
|
|
52
|
+
const total = filtered.length;
|
|
53
|
+
const pages = Math.ceil(total / limit);
|
|
54
|
+
return {
|
|
55
|
+
data: filtered.slice(offset, offset + limit),
|
|
56
|
+
pagination: {
|
|
57
|
+
page,
|
|
58
|
+
limit,
|
|
59
|
+
total,
|
|
60
|
+
pages
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
const listWebhookDestinationsForEvent = (db) => async (params) => {
|
|
65
|
+
const { scopes, eventType, agentId } = params;
|
|
66
|
+
const eventMatched = (await db.select().from(webhookDestinations).where(and(projectScopedWhere(webhookDestinations, scopes), eq(webhookDestinations.enabled, true)))).filter((dest) => {
|
|
67
|
+
const types = dest.eventTypes;
|
|
68
|
+
return Array.isArray(types) && types.includes(eventType);
|
|
69
|
+
});
|
|
70
|
+
if (eventMatched.length === 0) return [];
|
|
71
|
+
const destIds = eventMatched.map((d) => d.id);
|
|
72
|
+
const agentRows = await db.select().from(webhookDestinationAgents).where(and(eq(webhookDestinationAgents.tenantId, scopes.tenantId), eq(webhookDestinationAgents.projectId, scopes.projectId), inArray(webhookDestinationAgents.webhookDestinationId, destIds)));
|
|
73
|
+
const agentsByDest = /* @__PURE__ */ new Map();
|
|
74
|
+
for (const row of agentRows) {
|
|
75
|
+
const list = agentsByDest.get(row.webhookDestinationId) ?? [];
|
|
76
|
+
list.push(row.agentId);
|
|
77
|
+
agentsByDest.set(row.webhookDestinationId, list);
|
|
78
|
+
}
|
|
79
|
+
return eventMatched.filter((dest) => {
|
|
80
|
+
const agents = agentsByDest.get(dest.id);
|
|
81
|
+
return !agents || agents.includes(agentId);
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const createWebhookDestination = (db) => async (params) => {
|
|
85
|
+
return (await db.insert(webhookDestinations).values(params).returning())[0];
|
|
86
|
+
};
|
|
87
|
+
const updateWebhookDestination = (db) => async (params) => {
|
|
88
|
+
const updateData = {
|
|
89
|
+
...params.data,
|
|
90
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
91
|
+
};
|
|
92
|
+
return (await db.update(webhookDestinations).set(updateData).where(and(projectScopedWhere(webhookDestinations, params.scopes), eq(webhookDestinations.id, params.webhookDestinationId))).returning())[0];
|
|
93
|
+
};
|
|
94
|
+
const deleteWebhookDestination = (db) => async (params) => {
|
|
95
|
+
return (await db.delete(webhookDestinations).where(and(projectScopedWhere(webhookDestinations, params.scopes), eq(webhookDestinations.id, params.webhookDestinationId))).returning()).length > 0;
|
|
96
|
+
};
|
|
97
|
+
const getWebhookDestinationAgentIds = (db) => async (params) => {
|
|
98
|
+
return (await db.select({ agentId: webhookDestinationAgents.agentId }).from(webhookDestinationAgents).where(and(eq(webhookDestinationAgents.tenantId, params.scopes.tenantId), eq(webhookDestinationAgents.projectId, params.scopes.projectId), eq(webhookDestinationAgents.webhookDestinationId, params.webhookDestinationId)))).map((r) => r.agentId);
|
|
99
|
+
};
|
|
100
|
+
const setWebhookDestinationAgentIds = (db) => async (params) => {
|
|
101
|
+
const { scopes, webhookDestinationId, agentIds } = params;
|
|
102
|
+
await db.delete(webhookDestinationAgents).where(and(eq(webhookDestinationAgents.tenantId, scopes.tenantId), eq(webhookDestinationAgents.projectId, scopes.projectId), eq(webhookDestinationAgents.webhookDestinationId, webhookDestinationId)));
|
|
103
|
+
if (agentIds.length > 0) await db.insert(webhookDestinationAgents).values(agentIds.map((agentId) => ({
|
|
104
|
+
id: generateId(),
|
|
105
|
+
tenantId: scopes.tenantId,
|
|
106
|
+
projectId: scopes.projectId,
|
|
107
|
+
webhookDestinationId,
|
|
108
|
+
agentId
|
|
109
|
+
})));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { createWebhookDestination, deleteWebhookDestination, getWebhookDestinationAgentIds, getWebhookDestinationById, listWebhookDestinationsForEvent, listWebhookDestinationsPaginated, setWebhookDestinationAgentIds, updateWebhookDestination };
|
|
@@ -8,28 +8,28 @@ 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;
|
|
11
14
|
id: string;
|
|
12
15
|
name: string | null;
|
|
13
16
|
createdAt: string;
|
|
14
17
|
updatedAt: string;
|
|
15
18
|
expiresAt: string | null;
|
|
16
|
-
tenantId: string;
|
|
17
|
-
projectId: string;
|
|
18
|
-
agentId: string;
|
|
19
19
|
publicId: string;
|
|
20
20
|
keyHash: string;
|
|
21
21
|
keyPrefix: string;
|
|
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;
|
|
25
28
|
id: string;
|
|
26
29
|
name: string | null;
|
|
27
30
|
createdAt: string;
|
|
28
31
|
updatedAt: string;
|
|
29
32
|
expiresAt: string | null;
|
|
30
|
-
tenantId: string;
|
|
31
|
-
projectId: string;
|
|
32
|
-
agentId: string;
|
|
33
33
|
publicId: string;
|
|
34
34
|
keyHash: string;
|
|
35
35
|
keyPrefix: string;
|
|
@@ -39,14 +39,14 @@ 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;
|
|
42
45
|
id: string;
|
|
43
46
|
name: string | null;
|
|
44
47
|
createdAt: string;
|
|
45
48
|
updatedAt: string;
|
|
46
49
|
expiresAt: string | null;
|
|
47
|
-
tenantId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
agentId: string;
|
|
50
50
|
publicId: string;
|
|
51
51
|
keyHash: string;
|
|
52
52
|
keyPrefix: string;
|
|
@@ -66,14 +66,14 @@ 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;
|
|
69
72
|
id: string;
|
|
70
73
|
name: string | null;
|
|
71
74
|
createdAt: string;
|
|
72
75
|
updatedAt: string;
|
|
73
76
|
expiresAt: string | null;
|
|
74
|
-
tenantId: string;
|
|
75
|
-
projectId: string;
|
|
76
|
-
agentId: string;
|
|
77
77
|
publicId: string;
|
|
78
78
|
keyHash: string;
|
|
79
79
|
keyPrefix: string;
|
|
@@ -5,16 +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;
|
|
8
10
|
type: AppType;
|
|
9
11
|
id: string;
|
|
10
12
|
name: string;
|
|
11
13
|
createdAt: string;
|
|
12
14
|
updatedAt: string;
|
|
13
15
|
description: string | null;
|
|
14
|
-
tenantId: string | null;
|
|
15
|
-
projectId: string | null;
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
prompt: string | null;
|
|
18
16
|
config: {
|
|
19
17
|
type: "web_client";
|
|
20
18
|
webClient: {
|
|
@@ -22,7 +20,7 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
22
20
|
publicKeys: {
|
|
23
21
|
kid: string;
|
|
24
22
|
publicKey: string;
|
|
25
|
-
algorithm: "
|
|
23
|
+
algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
|
|
26
24
|
addedAt: string;
|
|
27
25
|
}[];
|
|
28
26
|
allowAnonymous: boolean;
|
|
@@ -45,6 +43,8 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
45
43
|
}[] | undefined;
|
|
46
44
|
};
|
|
47
45
|
};
|
|
46
|
+
prompt: string | null;
|
|
47
|
+
enabled: boolean;
|
|
48
48
|
lastUsedAt: string | null;
|
|
49
49
|
defaultProjectId: string | null;
|
|
50
50
|
defaultAgentId: string | null;
|
|
@@ -74,16 +74,14 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
74
74
|
};
|
|
75
75
|
}>;
|
|
76
76
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
77
|
+
tenantId: string | null;
|
|
78
|
+
projectId: string | null;
|
|
77
79
|
type: AppType;
|
|
78
80
|
id: string;
|
|
79
81
|
name: string;
|
|
80
82
|
createdAt: string;
|
|
81
83
|
updatedAt: string;
|
|
82
84
|
description: string | null;
|
|
83
|
-
tenantId: string | null;
|
|
84
|
-
projectId: string | null;
|
|
85
|
-
enabled: boolean;
|
|
86
|
-
prompt: string | null;
|
|
87
85
|
config: {
|
|
88
86
|
type: "web_client";
|
|
89
87
|
webClient: {
|
|
@@ -91,7 +89,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
91
89
|
publicKeys: {
|
|
92
90
|
kid: string;
|
|
93
91
|
publicKey: string;
|
|
94
|
-
algorithm: "
|
|
92
|
+
algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
|
|
95
93
|
addedAt: string;
|
|
96
94
|
}[];
|
|
97
95
|
allowAnonymous: boolean;
|
|
@@ -114,6 +112,8 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
114
112
|
}[] | undefined;
|
|
115
113
|
};
|
|
116
114
|
};
|
|
115
|
+
prompt: string | null;
|
|
116
|
+
enabled: boolean;
|
|
117
117
|
lastUsedAt: string | null;
|
|
118
118
|
defaultProjectId: string | null;
|
|
119
119
|
defaultAgentId: string | null;
|
|
@@ -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,20 +15,20 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
15
15
|
total: number;
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
|
+
tenantId: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
agentId: string | null;
|
|
18
21
|
id: string;
|
|
19
22
|
createdAt: string;
|
|
20
23
|
updatedAt: string;
|
|
24
|
+
metadata: ConversationMetadata | null;
|
|
25
|
+
title: string | null;
|
|
26
|
+
userId: string | null;
|
|
21
27
|
ref: {
|
|
22
28
|
type: "commit" | "tag" | "branch";
|
|
23
29
|
name: string;
|
|
24
30
|
hash: string;
|
|
25
31
|
} | null;
|
|
26
|
-
userId: string | null;
|
|
27
|
-
metadata: ConversationMetadata | null;
|
|
28
|
-
tenantId: string;
|
|
29
|
-
projectId: string;
|
|
30
|
-
agentId: string | null;
|
|
31
|
-
title: string | null;
|
|
32
32
|
activeSubAgentId: string;
|
|
33
33
|
lastContextResolution: string | null;
|
|
34
34
|
}>;
|
|
@@ -84,20 +84,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
84
84
|
scopes: ProjectScopeConfig;
|
|
85
85
|
conversationId: string;
|
|
86
86
|
}) => Promise<{
|
|
87
|
+
tenantId: string;
|
|
88
|
+
projectId: string;
|
|
89
|
+
agentId: string | null;
|
|
87
90
|
id: string;
|
|
88
91
|
createdAt: string;
|
|
89
92
|
updatedAt: string;
|
|
93
|
+
metadata: ConversationMetadata | null;
|
|
94
|
+
title: string | null;
|
|
95
|
+
userId: string | null;
|
|
90
96
|
ref: {
|
|
91
97
|
type: "commit" | "tag" | "branch";
|
|
92
98
|
name: string;
|
|
93
99
|
hash: string;
|
|
94
100
|
} | null;
|
|
95
|
-
userId: string | null;
|
|
96
|
-
metadata: ConversationMetadata | null;
|
|
97
|
-
tenantId: string;
|
|
98
|
-
projectId: string;
|
|
99
|
-
agentId: string | null;
|
|
100
|
-
title: string | null;
|
|
101
101
|
activeSubAgentId: string;
|
|
102
102
|
lastContextResolution: string | null;
|
|
103
103
|
} | undefined>;
|
|
@@ -120,20 +120,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
120
120
|
metadata?: ConversationMetadata | null | undefined;
|
|
121
121
|
contextConfigId?: string | undefined;
|
|
122
122
|
} | {
|
|
123
|
+
tenantId: string;
|
|
124
|
+
projectId: string;
|
|
125
|
+
agentId: string | null;
|
|
123
126
|
id: string;
|
|
124
127
|
createdAt: string;
|
|
125
128
|
updatedAt: string;
|
|
129
|
+
metadata: ConversationMetadata | null;
|
|
130
|
+
title: string | null;
|
|
131
|
+
userId: string | null;
|
|
126
132
|
ref: {
|
|
127
133
|
type: "commit" | "tag" | "branch";
|
|
128
134
|
name: string;
|
|
129
135
|
hash: string;
|
|
130
136
|
} | null;
|
|
131
|
-
userId: string | null;
|
|
132
|
-
metadata: ConversationMetadata | null;
|
|
133
|
-
tenantId: string;
|
|
134
|
-
projectId: string;
|
|
135
|
-
agentId: string | null;
|
|
136
|
-
title: string | null;
|
|
137
137
|
activeSubAgentId: string;
|
|
138
138
|
lastContextResolution: string | null;
|
|
139
139
|
}>;
|
|
@@ -152,20 +152,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
152
152
|
scopes: ProjectScopeConfig;
|
|
153
153
|
conversationId: string;
|
|
154
154
|
}) => Promise<{
|
|
155
|
+
tenantId: string;
|
|
156
|
+
projectId: string;
|
|
157
|
+
agentId: string | null;
|
|
155
158
|
id: string;
|
|
156
159
|
createdAt: string;
|
|
157
160
|
updatedAt: string;
|
|
161
|
+
metadata: ConversationMetadata | null;
|
|
162
|
+
title: string | null;
|
|
163
|
+
userId: string | null;
|
|
158
164
|
ref: {
|
|
159
165
|
type: "commit" | "tag" | "branch";
|
|
160
166
|
name: string;
|
|
161
167
|
hash: string;
|
|
162
168
|
} | null;
|
|
163
|
-
userId: string | null;
|
|
164
|
-
metadata: ConversationMetadata | null;
|
|
165
|
-
tenantId: string;
|
|
166
|
-
projectId: string;
|
|
167
|
-
agentId: string | null;
|
|
168
|
-
title: string | null;
|
|
169
169
|
activeSubAgentId: string;
|
|
170
170
|
lastContextResolution: string | null;
|
|
171
171
|
} | undefined>;
|
|
@@ -70,12 +70,12 @@ declare const getFeedbackByIds: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
70
70
|
agentId: string | null;
|
|
71
71
|
}[]>;
|
|
72
72
|
declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: FeedbackInsert) => Promise<{
|
|
73
|
+
tenantId: string;
|
|
74
|
+
projectId: string;
|
|
73
75
|
type: "positive" | "negative";
|
|
74
76
|
id: string;
|
|
75
77
|
createdAt: string;
|
|
76
78
|
updatedAt: string;
|
|
77
|
-
tenantId: string;
|
|
78
|
-
projectId: string;
|
|
79
79
|
conversationId: string;
|
|
80
80
|
messageId: string | null;
|
|
81
81
|
details: string | null;
|
|
@@ -100,12 +100,12 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
100
100
|
scopes: ProjectScopeConfig;
|
|
101
101
|
feedbackId: string;
|
|
102
102
|
}) => Promise<{
|
|
103
|
+
tenantId: string;
|
|
104
|
+
projectId: string;
|
|
103
105
|
type: "positive" | "negative";
|
|
104
106
|
id: string;
|
|
105
107
|
createdAt: string;
|
|
106
108
|
updatedAt: string;
|
|
107
|
-
tenantId: string;
|
|
108
|
-
projectId: string;
|
|
109
109
|
conversationId: string;
|
|
110
110
|
messageId: string | null;
|
|
111
111
|
details: string | null;
|
|
@@ -10,14 +10,14 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
13
15
|
id: string;
|
|
14
16
|
createdAt: string;
|
|
15
17
|
updatedAt: string;
|
|
16
18
|
metadata: MessageMetadata | null;
|
|
17
|
-
role: string;
|
|
18
|
-
tenantId: string;
|
|
19
|
-
projectId: string;
|
|
20
19
|
content: MessageContent;
|
|
20
|
+
role: string;
|
|
21
21
|
conversationId: string;
|
|
22
22
|
fromSubAgentId: string | null;
|
|
23
23
|
toSubAgentId: string | null;
|
|
@@ -144,14 +144,14 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
144
144
|
scopes: ProjectScopeConfig;
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
|
+
tenantId: string;
|
|
148
|
+
projectId: string;
|
|
147
149
|
id: string;
|
|
148
150
|
createdAt: string;
|
|
149
151
|
updatedAt: string;
|
|
150
152
|
metadata: MessageMetadata | null;
|
|
151
|
-
role: string;
|
|
152
|
-
tenantId: string;
|
|
153
|
-
projectId: string;
|
|
154
153
|
content: MessageContent;
|
|
154
|
+
role: string;
|
|
155
155
|
conversationId: string;
|
|
156
156
|
fromSubAgentId: string | null;
|
|
157
157
|
toSubAgentId: string | null;
|
|
@@ -197,14 +197,14 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
197
197
|
scopes: ProjectScopeConfig;
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
|
+
tenantId: string;
|
|
201
|
+
projectId: string;
|
|
200
202
|
id: string;
|
|
201
203
|
createdAt: string;
|
|
202
204
|
updatedAt: string;
|
|
203
205
|
metadata: MessageMetadata | null;
|
|
204
|
-
role: string;
|
|
205
|
-
tenantId: string;
|
|
206
|
-
projectId: string;
|
|
207
206
|
content: MessageContent;
|
|
207
|
+
role: string;
|
|
208
208
|
conversationId: string;
|
|
209
209
|
fromSubAgentId: string | null;
|
|
210
210
|
toSubAgentId: string | null;
|
|
@@ -15,9 +15,9 @@ declare const createScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (para
|
|
|
15
15
|
scheduledTriggerId: string;
|
|
16
16
|
userId: string;
|
|
17
17
|
}) => Promise<{
|
|
18
|
+
tenantId: string;
|
|
18
19
|
createdAt: string;
|
|
19
20
|
userId: string;
|
|
20
|
-
tenantId: string;
|
|
21
21
|
scheduledTriggerId: string;
|
|
22
22
|
}>;
|
|
23
23
|
declare const deleteScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -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
|
+
tenantId: string;
|
|
11
|
+
projectId: string;
|
|
12
|
+
agentId: string;
|
|
13
|
+
subAgentId: string;
|
|
10
14
|
id: string;
|
|
15
|
+
status: string;
|
|
11
16
|
createdAt: string;
|
|
12
17
|
updatedAt: string;
|
|
18
|
+
metadata: TaskMetadataConfig | null;
|
|
13
19
|
ref: {
|
|
14
20
|
type: "commit" | "tag" | "branch";
|
|
15
21
|
name: string;
|
|
16
22
|
hash: string;
|
|
17
23
|
} | null;
|
|
18
|
-
metadata: TaskMetadataConfig | null;
|
|
19
|
-
status: string;
|
|
20
|
-
tenantId: string;
|
|
21
|
-
projectId: string;
|
|
22
|
-
agentId: string;
|
|
23
|
-
subAgentId: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|