@inkeep/agents-core 0.0.0-dev-20260212003026 → 0.0.0-dev-20260212021905
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/README.md +1 -1
- package/dist/client-exports.d.ts +8 -2
- package/dist/client-exports.js +3 -2
- package/dist/data-access/index.d.ts +2 -1
- package/dist/data-access/index.js +2 -1
- package/dist/data-access/manage/agentFull.js +38 -1
- package/dist/data-access/manage/agents.js +28 -4
- package/dist/data-access/manage/projectFull.js +97 -0
- package/dist/data-access/manage/skills.d.ts +109 -0
- package/dist/data-access/manage/skills.js +122 -0
- package/dist/data-access/runtime/conversations.d.ts +7 -7
- package/dist/data-access/runtime/tasks.d.ts +3 -3
- package/dist/db/manage/manage-schema.d.ts +371 -2
- package/dist/db/manage/manage-schema.js +106 -4
- package/dist/db/runtime/runtime-schema.d.ts +240 -240
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -3
- package/dist/types/entities.d.ts +15 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/extend-schemas.d.ts +34 -0
- package/dist/validation/extend-schemas.js +33 -0
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas.d.ts +576 -709
- package/dist/validation/schemas.js +64 -29
- package/drizzle/manage/0008_friendly_mentallo.sql +32 -0
- package/drizzle/manage/meta/0008_snapshot.json +3391 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/drizzle/runtime/meta/0007_snapshot.json +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getLogger } from "../../utils/logger.js";
|
|
2
2
|
import { deleteExternalAgent, listExternalAgents, upsertExternalAgent } from "./externalAgents.js";
|
|
3
3
|
import { deleteFunction, listFunctions, upsertFunction } from "./functions.js";
|
|
4
|
+
import { listSkills, upsertSkill } from "./skills.js";
|
|
4
5
|
import { deleteCredentialReference, listCredentialReferences, upsertCredentialReference } from "./credentialReferences.js";
|
|
5
6
|
import { deleteTool, listTools, upsertTool } from "./tools.js";
|
|
6
7
|
import { listAgents } from "./agents.js";
|
|
@@ -42,6 +43,37 @@ const createFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
42
43
|
logger.info({ projectId: typed.id }, "Creating project metadata");
|
|
43
44
|
await createProject(db)(projectPayload);
|
|
44
45
|
logger.info({ projectId: typed.id }, "Project metadata created successfully");
|
|
46
|
+
if (typed.skills && Object.keys(typed.skills).length) {
|
|
47
|
+
logger.info({
|
|
48
|
+
projectId: typed.id,
|
|
49
|
+
count: Object.keys(typed.skills).length
|
|
50
|
+
}, "Creating project skills");
|
|
51
|
+
const skillPromises = Object.entries(typed.skills).map(async ([skillId, skill]) => {
|
|
52
|
+
try {
|
|
53
|
+
await upsertSkill(db)({
|
|
54
|
+
...skill,
|
|
55
|
+
tenantId,
|
|
56
|
+
projectId: typed.id
|
|
57
|
+
});
|
|
58
|
+
logger.info({
|
|
59
|
+
projectId: typed.id,
|
|
60
|
+
skillId
|
|
61
|
+
}, "Skill processed");
|
|
62
|
+
} catch (error) {
|
|
63
|
+
logger.error({
|
|
64
|
+
projectId: typed.id,
|
|
65
|
+
skillId,
|
|
66
|
+
error
|
|
67
|
+
}, "Failed to create skill");
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
await Promise.all(skillPromises);
|
|
72
|
+
logger.info({
|
|
73
|
+
projectId: typed.id,
|
|
74
|
+
count: Object.keys(typed.skills).length
|
|
75
|
+
}, "All project skills created successfully");
|
|
76
|
+
}
|
|
45
77
|
if (typed.credentialReferences && Object.keys(typed.credentialReferences).length > 0) {
|
|
46
78
|
logger.info({
|
|
47
79
|
projectId: typed.id,
|
|
@@ -395,6 +427,37 @@ const updateFullProjectServerSide = (db, logger = defaultLogger) => async (param
|
|
|
395
427
|
data: projectUpdatePayload
|
|
396
428
|
});
|
|
397
429
|
logger.info({ projectId: typed.id }, "Project metadata updated successfully");
|
|
430
|
+
if (typed.skills && Object.keys(typed.skills).length) {
|
|
431
|
+
logger.info({
|
|
432
|
+
projectId: typed.id,
|
|
433
|
+
count: Object.keys(typed.skills).length
|
|
434
|
+
}, "Updating project skills");
|
|
435
|
+
const skillPromises = Object.entries(typed.skills).map(async ([skillId, skill]) => {
|
|
436
|
+
try {
|
|
437
|
+
await upsertSkill(db)({
|
|
438
|
+
...skill,
|
|
439
|
+
tenantId,
|
|
440
|
+
projectId: typed.id
|
|
441
|
+
});
|
|
442
|
+
logger.info({
|
|
443
|
+
projectId: typed.id,
|
|
444
|
+
skillId
|
|
445
|
+
}, "Skill processed");
|
|
446
|
+
} catch (error) {
|
|
447
|
+
logger.error({
|
|
448
|
+
projectId: typed.id,
|
|
449
|
+
skillId,
|
|
450
|
+
error
|
|
451
|
+
}, "Failed to update skill");
|
|
452
|
+
throw error;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
await Promise.all(skillPromises);
|
|
456
|
+
logger.info({
|
|
457
|
+
projectId: typed.id,
|
|
458
|
+
count: Object.keys(typed.skills).length
|
|
459
|
+
}, "All project skills updated successfully");
|
|
460
|
+
}
|
|
398
461
|
if (typed.credentialReferences && Object.keys(typed.credentialReferences).length > 0) {
|
|
399
462
|
logger.info({
|
|
400
463
|
projectId: typed.id,
|
|
@@ -1009,6 +1072,39 @@ const getFullProjectInternal = (db, logger = defaultLogger) => async (params) =>
|
|
|
1009
1072
|
error
|
|
1010
1073
|
}, "Failed to retrieve functions for project");
|
|
1011
1074
|
}
|
|
1075
|
+
const projectSkills = {};
|
|
1076
|
+
try {
|
|
1077
|
+
const skillsList = await listSkills(db)({
|
|
1078
|
+
scopes: {
|
|
1079
|
+
tenantId,
|
|
1080
|
+
projectId
|
|
1081
|
+
},
|
|
1082
|
+
pagination: {
|
|
1083
|
+
page: 1,
|
|
1084
|
+
limit: 1e3
|
|
1085
|
+
}
|
|
1086
|
+
});
|
|
1087
|
+
for (const skill of skillsList.data) projectSkills[skill.id] = {
|
|
1088
|
+
id: skill.id,
|
|
1089
|
+
name: skill.name,
|
|
1090
|
+
description: skill.description,
|
|
1091
|
+
content: skill.content,
|
|
1092
|
+
metadata: skill.metadata,
|
|
1093
|
+
createdAt: skill.createdAt,
|
|
1094
|
+
updatedAt: skill.updatedAt
|
|
1095
|
+
};
|
|
1096
|
+
logger.info({
|
|
1097
|
+
tenantId,
|
|
1098
|
+
projectId,
|
|
1099
|
+
skillCount: Object.keys(projectSkills).length
|
|
1100
|
+
}, "Skills retrieved for project");
|
|
1101
|
+
} catch (error) {
|
|
1102
|
+
logger.warn({
|
|
1103
|
+
tenantId,
|
|
1104
|
+
projectId,
|
|
1105
|
+
error
|
|
1106
|
+
}, "Failed to retrieve skills for project");
|
|
1107
|
+
}
|
|
1012
1108
|
const agents = {};
|
|
1013
1109
|
if (agentList.length > 0) {
|
|
1014
1110
|
const getAgentFn = includeRelationIds ? getFullAgentWithRelationIds : getFullAgent;
|
|
@@ -1071,6 +1167,7 @@ const getFullProjectInternal = (db, logger = defaultLogger) => async (params) =>
|
|
|
1071
1167
|
credentialReferences: Object.keys(projectCredentialReferences).length > 0 ? projectCredentialReferences : null,
|
|
1072
1168
|
statusUpdates: null,
|
|
1073
1169
|
functionTools: null,
|
|
1170
|
+
skills: Object.keys(projectSkills).length > 0 ? projectSkills : void 0,
|
|
1074
1171
|
createdAt: project.createdAt,
|
|
1075
1172
|
updatedAt: project.updatedAt
|
|
1076
1173
|
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { AgentScopeConfig, PaginationConfig, ProjectScopeConfig, SubAgentScopeConfig } from "../../types/utility.js";
|
|
2
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
|
+
import { SkillInsert, SkillUpdate, SubAgentSkillWithIndex } from "../../types/entities.js";
|
|
4
|
+
|
|
5
|
+
//#region src/data-access/manage/skills.d.ts
|
|
6
|
+
declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
7
|
+
scopes: ProjectScopeConfig;
|
|
8
|
+
skillId: string;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
metadata: Record<string, string> | null;
|
|
18
|
+
content: string;
|
|
19
|
+
} | null>;
|
|
20
|
+
declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
21
|
+
scopes: ProjectScopeConfig;
|
|
22
|
+
pagination?: PaginationConfig;
|
|
23
|
+
}) => Promise<{
|
|
24
|
+
data: {
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
content: string;
|
|
31
|
+
metadata: Record<string, string> | null;
|
|
32
|
+
projectId: string;
|
|
33
|
+
tenantId: string;
|
|
34
|
+
}[];
|
|
35
|
+
pagination: {
|
|
36
|
+
page: number;
|
|
37
|
+
limit: number;
|
|
38
|
+
total: number;
|
|
39
|
+
pages: number;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
tenantId: string;
|
|
47
|
+
projectId: string;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
50
|
+
metadata: Record<string, string> | null;
|
|
51
|
+
content: string;
|
|
52
|
+
}>;
|
|
53
|
+
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
tenantId: string;
|
|
58
|
+
projectId: string;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
updatedAt: string;
|
|
61
|
+
metadata: Record<string, string> | null;
|
|
62
|
+
content: string;
|
|
63
|
+
}>;
|
|
64
|
+
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
65
|
+
scopes: ProjectScopeConfig;
|
|
66
|
+
skillId: string;
|
|
67
|
+
data: SkillUpdate;
|
|
68
|
+
}) => Promise<{
|
|
69
|
+
createdAt: string;
|
|
70
|
+
updatedAt: string;
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
description: string;
|
|
74
|
+
content: string;
|
|
75
|
+
metadata: Record<string, string> | null;
|
|
76
|
+
projectId: string;
|
|
77
|
+
tenantId: string;
|
|
78
|
+
}>;
|
|
79
|
+
declare const deleteSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
80
|
+
scopes: ProjectScopeConfig;
|
|
81
|
+
skillId: string;
|
|
82
|
+
}) => Promise<boolean>;
|
|
83
|
+
declare const getSkillsForSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
84
|
+
scopes: AgentScopeConfig;
|
|
85
|
+
subAgentIds: string[];
|
|
86
|
+
}) => Promise<SubAgentSkillWithIndex[]>;
|
|
87
|
+
declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
88
|
+
scopes: SubAgentScopeConfig;
|
|
89
|
+
skillId: string;
|
|
90
|
+
index: number;
|
|
91
|
+
alwaysLoaded?: boolean;
|
|
92
|
+
}) => Promise<{
|
|
93
|
+
id: string;
|
|
94
|
+
tenantId: string;
|
|
95
|
+
projectId: string;
|
|
96
|
+
agentId: string;
|
|
97
|
+
createdAt: string;
|
|
98
|
+
updatedAt: string;
|
|
99
|
+
index: number;
|
|
100
|
+
alwaysLoaded: boolean;
|
|
101
|
+
subAgentId: string;
|
|
102
|
+
skillId: string;
|
|
103
|
+
}>;
|
|
104
|
+
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
105
|
+
scopes: AgentScopeConfig;
|
|
106
|
+
subAgentSkillId: string;
|
|
107
|
+
}) => Promise<boolean>;
|
|
108
|
+
//#endregion
|
|
109
|
+
export { createSkill, deleteSkill, deleteSubAgentSkill, getSkillById, getSkillsForSubAgents, listSkills, updateSkill, upsertSkill, upsertSubAgentSkill };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { skills, subAgentSkills } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { getLogger } from "../../utils/logger.js";
|
|
3
|
+
import { generateId } from "../../utils/conversations.js";
|
|
4
|
+
import "../../index.js";
|
|
5
|
+
import { and, asc, count, desc, eq, inArray } from "drizzle-orm";
|
|
6
|
+
|
|
7
|
+
//#region src/data-access/manage/skills.ts
|
|
8
|
+
const logger = getLogger("skills-dal");
|
|
9
|
+
const getSkillById = (db) => async (params) => {
|
|
10
|
+
return await db.query.skills.findFirst({ where: and(eq(skills.tenantId, params.scopes.tenantId), eq(skills.projectId, params.scopes.projectId), eq(skills.id, params.skillId)) }) ?? null;
|
|
11
|
+
};
|
|
12
|
+
const listSkills = (db) => async (params) => {
|
|
13
|
+
const page = params.pagination?.page || 1;
|
|
14
|
+
const limit = Math.min(params.pagination?.limit || 10, 100);
|
|
15
|
+
const offset = (page - 1) * limit;
|
|
16
|
+
const whereClause = and(eq(skills.tenantId, params.scopes.tenantId), eq(skills.projectId, params.scopes.projectId));
|
|
17
|
+
const [data, totalResult] = await Promise.all([db.select().from(skills).where(whereClause).limit(limit).offset(offset).orderBy(desc(skills.createdAt)), db.select({ count: count() }).from(skills).where(whereClause)]);
|
|
18
|
+
const total = totalResult[0]?.count || 0;
|
|
19
|
+
return {
|
|
20
|
+
data,
|
|
21
|
+
pagination: {
|
|
22
|
+
page,
|
|
23
|
+
limit,
|
|
24
|
+
total,
|
|
25
|
+
pages: Math.ceil(total / limit)
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const createSkill = (db) => async (data) => {
|
|
30
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
31
|
+
const insertData = {
|
|
32
|
+
...data,
|
|
33
|
+
id: data.name,
|
|
34
|
+
createdAt: now,
|
|
35
|
+
updatedAt: now
|
|
36
|
+
};
|
|
37
|
+
const [result] = await db.insert(skills).values(insertData).returning();
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
const upsertSkill = (db) => async (data) => {
|
|
41
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
42
|
+
const baseData = {
|
|
43
|
+
...data,
|
|
44
|
+
id: data.name
|
|
45
|
+
};
|
|
46
|
+
if (await db.query.skills.findFirst({ where: and(eq(skills.tenantId, baseData.tenantId), eq(skills.projectId, baseData.projectId), eq(skills.id, baseData.id)) })) {
|
|
47
|
+
const [result$1] = await db.update(skills).set({
|
|
48
|
+
name: baseData.name,
|
|
49
|
+
description: baseData.description,
|
|
50
|
+
content: baseData.content,
|
|
51
|
+
metadata: baseData.metadata,
|
|
52
|
+
updatedAt: now
|
|
53
|
+
}).where(and(eq(skills.tenantId, baseData.tenantId), eq(skills.projectId, baseData.projectId), eq(skills.id, baseData.id))).returning();
|
|
54
|
+
logger.info({ skillId: baseData.id }, "Updated skill");
|
|
55
|
+
return result$1;
|
|
56
|
+
}
|
|
57
|
+
const insertData = {
|
|
58
|
+
...baseData,
|
|
59
|
+
createdAt: now,
|
|
60
|
+
updatedAt: now
|
|
61
|
+
};
|
|
62
|
+
const [result] = await db.insert(skills).values(insertData).returning();
|
|
63
|
+
logger.info({ skillId: baseData.id }, "Created skill");
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
const updateSkill = (db) => async (params) => {
|
|
67
|
+
const { tenantId: _, projectId: _2, ...data } = params.data;
|
|
68
|
+
const updateData = {
|
|
69
|
+
...data,
|
|
70
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
71
|
+
};
|
|
72
|
+
const [result] = await db.update(skills).set(updateData).where(and(eq(skills.tenantId, params.scopes.tenantId), eq(skills.projectId, params.scopes.projectId), eq(skills.id, params.skillId))).returning();
|
|
73
|
+
return result ?? null;
|
|
74
|
+
};
|
|
75
|
+
const deleteSkill = (db) => async (params) => {
|
|
76
|
+
return (await db.delete(skills).where(and(eq(skills.tenantId, params.scopes.tenantId), eq(skills.projectId, params.scopes.projectId), eq(skills.id, params.skillId))).returning()).length > 0;
|
|
77
|
+
};
|
|
78
|
+
const getSkillsForSubAgents = (db) => async (params) => {
|
|
79
|
+
if (!params.subAgentIds.length) return [];
|
|
80
|
+
return await db.select({
|
|
81
|
+
subAgentSkillId: subAgentSkills.id,
|
|
82
|
+
subAgentId: subAgentSkills.subAgentId,
|
|
83
|
+
index: subAgentSkills.index,
|
|
84
|
+
alwaysLoaded: subAgentSkills.alwaysLoaded,
|
|
85
|
+
id: skills.id,
|
|
86
|
+
name: skills.name,
|
|
87
|
+
description: skills.description,
|
|
88
|
+
content: skills.content,
|
|
89
|
+
metadata: skills.metadata,
|
|
90
|
+
createdAt: skills.createdAt,
|
|
91
|
+
updatedAt: skills.updatedAt
|
|
92
|
+
}).from(subAgentSkills).innerJoin(skills, and(eq(subAgentSkills.skillId, skills.id), eq(subAgentSkills.tenantId, skills.tenantId), eq(subAgentSkills.projectId, skills.projectId))).where(and(eq(subAgentSkills.tenantId, params.scopes.tenantId), eq(subAgentSkills.projectId, params.scopes.projectId), eq(subAgentSkills.agentId, params.scopes.agentId), inArray(subAgentSkills.subAgentId, params.subAgentIds))).orderBy(asc(subAgentSkills.index), asc(subAgentSkills.createdAt));
|
|
93
|
+
};
|
|
94
|
+
const upsertSubAgentSkill = (db) => async (params) => {
|
|
95
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
96
|
+
const existing = await db.query.subAgentSkills.findFirst({ where: and(eq(subAgentSkills.tenantId, params.scopes.tenantId), eq(subAgentSkills.projectId, params.scopes.projectId), eq(subAgentSkills.agentId, params.scopes.agentId), eq(subAgentSkills.subAgentId, params.scopes.subAgentId), eq(subAgentSkills.skillId, params.skillId)) });
|
|
97
|
+
if (existing) {
|
|
98
|
+
const [result$1] = await db.update(subAgentSkills).set({
|
|
99
|
+
index: params.index,
|
|
100
|
+
alwaysLoaded: params.alwaysLoaded ?? existing.alwaysLoaded,
|
|
101
|
+
updatedAt: now
|
|
102
|
+
}).where(eq(subAgentSkills.id, existing.id)).returning();
|
|
103
|
+
return result$1;
|
|
104
|
+
}
|
|
105
|
+
const insertData = {
|
|
106
|
+
...params.scopes,
|
|
107
|
+
id: generateId(),
|
|
108
|
+
skillId: params.skillId,
|
|
109
|
+
index: params.index,
|
|
110
|
+
alwaysLoaded: params.alwaysLoaded ?? false,
|
|
111
|
+
createdAt: now,
|
|
112
|
+
updatedAt: now
|
|
113
|
+
};
|
|
114
|
+
const [result] = await db.insert(subAgentSkills).values(insertData).returning();
|
|
115
|
+
return result;
|
|
116
|
+
};
|
|
117
|
+
const deleteSubAgentSkill = (db) => async (params) => {
|
|
118
|
+
return (await db.delete(subAgentSkills).where(and(eq(subAgentSkills.tenantId, params.scopes.tenantId), eq(subAgentSkills.projectId, params.scopes.projectId), eq(subAgentSkills.agentId, params.scopes.agentId), eq(subAgentSkills.id, params.subAgentSkillId))).returning()).length > 0;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
export { createSkill, deleteSkill, deleteSubAgentSkill, getSkillById, getSkillsForSubAgents, listSkills, updateSkill, upsertSkill, upsertSubAgentSkill };
|
|
@@ -24,7 +24,7 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
|
|
|
24
24
|
updatedAt: string;
|
|
25
25
|
metadata: ConversationMetadata | null;
|
|
26
26
|
ref: {
|
|
27
|
-
type: "
|
|
27
|
+
type: "tag" | "commit" | "branch";
|
|
28
28
|
name: string;
|
|
29
29
|
hash: string;
|
|
30
30
|
} | null;
|
|
@@ -43,7 +43,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
43
43
|
agentId: string | null;
|
|
44
44
|
activeSubAgentId: string;
|
|
45
45
|
ref: {
|
|
46
|
-
type: "
|
|
46
|
+
type: "tag" | "commit" | "branch";
|
|
47
47
|
name: string;
|
|
48
48
|
hash: string;
|
|
49
49
|
} | null;
|
|
@@ -69,7 +69,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
|
|
|
69
69
|
agentId: string | null;
|
|
70
70
|
activeSubAgentId: string;
|
|
71
71
|
ref: {
|
|
72
|
-
type: "
|
|
72
|
+
type: "tag" | "commit" | "branch";
|
|
73
73
|
name: string;
|
|
74
74
|
hash: string;
|
|
75
75
|
} | null;
|
|
@@ -93,7 +93,7 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
93
93
|
updatedAt: string;
|
|
94
94
|
metadata: ConversationMetadata | null;
|
|
95
95
|
ref: {
|
|
96
|
-
type: "
|
|
96
|
+
type: "tag" | "commit" | "branch";
|
|
97
97
|
name: string;
|
|
98
98
|
hash: string;
|
|
99
99
|
} | null;
|
|
@@ -107,7 +107,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
107
107
|
tenantId: string;
|
|
108
108
|
id: string;
|
|
109
109
|
ref: {
|
|
110
|
-
type: "
|
|
110
|
+
type: "tag" | "commit" | "branch";
|
|
111
111
|
name: string;
|
|
112
112
|
hash: string;
|
|
113
113
|
};
|
|
@@ -129,7 +129,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
129
129
|
updatedAt: string;
|
|
130
130
|
metadata: ConversationMetadata | null;
|
|
131
131
|
ref: {
|
|
132
|
-
type: "
|
|
132
|
+
type: "tag" | "commit" | "branch";
|
|
133
133
|
name: string;
|
|
134
134
|
hash: string;
|
|
135
135
|
} | null;
|
|
@@ -161,7 +161,7 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
161
161
|
updatedAt: string;
|
|
162
162
|
metadata: ConversationMetadata | null;
|
|
163
163
|
ref: {
|
|
164
|
-
type: "
|
|
164
|
+
type: "tag" | "commit" | "branch";
|
|
165
165
|
name: string;
|
|
166
166
|
hash: string;
|
|
167
167
|
} | null;
|
|
@@ -13,12 +13,12 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
|
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
15
|
metadata: TaskMetadataConfig | null;
|
|
16
|
+
status: string;
|
|
16
17
|
ref: {
|
|
17
|
-
type: "
|
|
18
|
+
type: "tag" | "commit" | "branch";
|
|
18
19
|
name: string;
|
|
19
20
|
hash: string;
|
|
20
21
|
} | null;
|
|
21
|
-
status: string;
|
|
22
22
|
subAgentId: string;
|
|
23
23
|
contextId: string;
|
|
24
24
|
}>;
|
|
@@ -36,7 +36,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
36
36
|
updatedAt: string;
|
|
37
37
|
contextId: string;
|
|
38
38
|
ref: {
|
|
39
|
-
type: "
|
|
39
|
+
type: "tag" | "commit" | "branch";
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|