forked from bai/curriculum-project-hub
feat: make agent roles and skills dynamic
This commit is contained in:
@@ -226,6 +226,22 @@ async function initializeSilo(
|
||||
const count = await tx.organization.count();
|
||||
if (count !== 0) throw new Error(`Silo bootstrap requires an empty Organization set; found ${count}`);
|
||||
await tx.organization.create({ data: { ...input.organization } });
|
||||
await tx.organizationAgentRole.createMany({
|
||||
data: [
|
||||
{
|
||||
organizationId: input.organization.id,
|
||||
roleId: "draft",
|
||||
label: "草稿",
|
||||
sortOrder: 10,
|
||||
},
|
||||
{
|
||||
organizationId: input.organization.id,
|
||||
roleId: "review",
|
||||
label: "审校",
|
||||
sortOrder: 20,
|
||||
},
|
||||
],
|
||||
});
|
||||
await tx.organizationProjectSettings.create({
|
||||
data: { organizationId: input.organization.id, membersCanCreateProjects: true },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user