feat(agent): add teamId foreign key to agent table and refactor service queries

This commit is contained in:
yiling
2026-05-21 20:41:37 +08:00
parent 6e2ff8a003
commit 2c106bbb77
16 changed files with 498 additions and 71 deletions
@@ -0,0 +1,11 @@
/*
Warnings:
- Added the required column `team_id` to the `agents` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "agents" ADD COLUMN "team_id" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "agents" ADD CONSTRAINT "agents_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "teams"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+5
View File
@@ -220,6 +220,7 @@ model Team {
providers Provider[] @relation("TeamToProvider") providers Provider[] @relation("TeamToProvider")
skills Skill[] @relation("TeamToSkill") skills Skill[] @relation("TeamToSkill")
sandbox Sandbox? @relation("TeamToSandbox") sandbox Sandbox? @relation("TeamToSandbox")
agents Agent[] @relation("TeamToAgent")
@@map("teams") @@map("teams")
} }
@@ -619,6 +620,10 @@ model Agent {
provider Provider? @relation("ProviderToAgent", fields: [providerId], references: [id], onDelete: SetNull) provider Provider? @relation("ProviderToAgent", fields: [providerId], references: [id], onDelete: SetNull)
modelId String? @map("model_id") modelId String? @map("model_id")
modelRef Model? @relation("ModelToAgent", fields: [modelId], references: [id], onDelete: SetNull) modelRef Model? @relation("ModelToAgent", fields: [modelId], references: [id], onDelete: SetNull)
teamId String @map("team_id")
team Team @relation("TeamToAgent", fields: [teamId], references: [id], onDelete: Cascade)
/// [AgentConfig] /// [AgentConfig]
config Json config Json
createdAt DateTime @default(now()) @map("created_at") createdAt DateTime @default(now()) @map("created_at")
@@ -40,6 +40,7 @@ describe('DatabaseSessionStorage', () => {
const agent = await prisma.agent.create({ const agent = await prisma.agent.create({
data: { data: {
id: user.id, id: user.id,
teamId: team.id,
type: 'chat', type: 'chat',
providerId: provider.id, providerId: provider.id,
modelId: model.id, modelId: model.id,
File diff suppressed because one or more lines are too long
+1
View File
@@ -3039,6 +3039,7 @@ export const AgentScalarFieldEnum = {
soul: 'soul', soul: 'soul',
providerId: 'providerId', providerId: 'providerId',
modelId: 'modelId', modelId: 'modelId',
teamId: 'teamId',
config: 'config', config: 'config',
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt' updatedAt: 'updatedAt'
+1
View File
@@ -446,6 +446,7 @@ export const AgentScalarFieldEnum = {
soul: 'soul', soul: 'soul',
providerId: 'providerId', providerId: 'providerId',
modelId: 'modelId', modelId: 'modelId',
teamId: 'teamId',
config: 'config', config: 'config',
createdAt: 'createdAt', createdAt: 'createdAt',
updatedAt: 'updatedAt' updatedAt: 'updatedAt'
+237 -26
View File
@@ -33,6 +33,7 @@ export type AgentMinAggregateOutputType = {
soul: string | null soul: string | null
providerId: string | null providerId: string | null
modelId: string | null modelId: string | null
teamId: string | null
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
} }
@@ -44,6 +45,7 @@ export type AgentMaxAggregateOutputType = {
soul: string | null soul: string | null
providerId: string | null providerId: string | null
modelId: string | null modelId: string | null
teamId: string | null
createdAt: Date | null createdAt: Date | null
updatedAt: Date | null updatedAt: Date | null
} }
@@ -55,6 +57,7 @@ export type AgentCountAggregateOutputType = {
soul: number soul: number
providerId: number providerId: number
modelId: number modelId: number
teamId: number
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt: number createdAt: number
updatedAt: number updatedAt: number
@@ -69,6 +72,7 @@ export type AgentMinAggregateInputType = {
soul?: true soul?: true
providerId?: true providerId?: true
modelId?: true modelId?: true
teamId?: true
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
} }
@@ -80,6 +84,7 @@ export type AgentMaxAggregateInputType = {
soul?: true soul?: true
providerId?: true providerId?: true
modelId?: true modelId?: true
teamId?: true
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
} }
@@ -91,6 +96,7 @@ export type AgentCountAggregateInputType = {
soul?: true soul?: true
providerId?: true providerId?: true
modelId?: true modelId?: true
teamId?: true
config?: true config?: true
createdAt?: true createdAt?: true
updatedAt?: true updatedAt?: true
@@ -176,6 +182,7 @@ export type AgentGroupByOutputType = {
soul: string | null soul: string | null
providerId: string | null providerId: string | null
modelId: string | null modelId: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt: Date createdAt: Date
updatedAt: Date updatedAt: Date
@@ -209,12 +216,14 @@ export type AgentWhereInput = {
soul?: Prisma.StringNullableFilter<"Agent"> | string | null soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
teamId?: Prisma.StringFilter<"Agent"> | string
config?: Prisma.JsonFilter<"Agent"> config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput> user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
agentSessions?: Prisma.AgentSessionListRelationFilter agentSessions?: Prisma.AgentSessionListRelationFilter
skills?: Prisma.AgentSkillListRelationFilter skills?: Prisma.AgentSkillListRelationFilter
} }
@@ -226,12 +235,14 @@ export type AgentOrderByWithRelationInput = {
soul?: Prisma.SortOrderInput | Prisma.SortOrder soul?: Prisma.SortOrderInput | Prisma.SortOrder
providerId?: Prisma.SortOrderInput | Prisma.SortOrder providerId?: Prisma.SortOrderInput | Prisma.SortOrder
modelId?: Prisma.SortOrderInput | Prisma.SortOrder modelId?: Prisma.SortOrderInput | Prisma.SortOrder
teamId?: Prisma.SortOrder
config?: Prisma.SortOrder config?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
user?: Prisma.UserOrderByWithRelationInput user?: Prisma.UserOrderByWithRelationInput
provider?: Prisma.ProviderOrderByWithRelationInput provider?: Prisma.ProviderOrderByWithRelationInput
modelRef?: Prisma.ModelOrderByWithRelationInput modelRef?: Prisma.ModelOrderByWithRelationInput
team?: Prisma.TeamOrderByWithRelationInput
agentSessions?: Prisma.AgentSessionOrderByRelationAggregateInput agentSessions?: Prisma.AgentSessionOrderByRelationAggregateInput
skills?: Prisma.AgentSkillOrderByRelationAggregateInput skills?: Prisma.AgentSkillOrderByRelationAggregateInput
} }
@@ -246,12 +257,14 @@ export type AgentWhereUniqueInput = Prisma.AtLeast<{
soul?: Prisma.StringNullableFilter<"Agent"> | string | null soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
teamId?: Prisma.StringFilter<"Agent"> | string
config?: Prisma.JsonFilter<"Agent"> config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput> user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null modelRef?: Prisma.XOR<Prisma.ModelNullableScalarRelationFilter, Prisma.ModelWhereInput> | null
team?: Prisma.XOR<Prisma.TeamScalarRelationFilter, Prisma.TeamWhereInput>
agentSessions?: Prisma.AgentSessionListRelationFilter agentSessions?: Prisma.AgentSessionListRelationFilter
skills?: Prisma.AgentSkillListRelationFilter skills?: Prisma.AgentSkillListRelationFilter
}, "id"> }, "id">
@@ -263,6 +276,7 @@ export type AgentOrderByWithAggregationInput = {
soul?: Prisma.SortOrderInput | Prisma.SortOrder soul?: Prisma.SortOrderInput | Prisma.SortOrder
providerId?: Prisma.SortOrderInput | Prisma.SortOrder providerId?: Prisma.SortOrderInput | Prisma.SortOrder
modelId?: Prisma.SortOrderInput | Prisma.SortOrder modelId?: Prisma.SortOrderInput | Prisma.SortOrder
teamId?: Prisma.SortOrder
config?: Prisma.SortOrder config?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
@@ -281,6 +295,7 @@ export type AgentScalarWhereWithAggregatesInput = {
soul?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null soul?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null providerId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null modelId?: Prisma.StringNullableWithAggregatesFilter<"Agent"> | string | null
teamId?: Prisma.StringWithAggregatesFilter<"Agent"> | string
config?: Prisma.JsonWithAggregatesFilter<"Agent"> config?: Prisma.JsonWithAggregatesFilter<"Agent">
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Agent"> | Date | string
@@ -296,6 +311,7 @@ export type AgentCreateInput = {
user: Prisma.UserCreateNestedOneWithoutAgentInput user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
} }
@@ -307,6 +323,7 @@ export type AgentUncheckedCreateInput = {
soul?: string | null soul?: string | null
providerId?: string | null providerId?: string | null
modelId?: string | null modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -324,6 +341,7 @@ export type AgentUpdateInput = {
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
} }
@@ -335,6 +353,7 @@ export type AgentUncheckedUpdateInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -349,6 +368,7 @@ export type AgentCreateManyInput = {
soul?: string | null soul?: string | null
providerId?: string | null providerId?: string | null
modelId?: string | null modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -370,6 +390,7 @@ export type AgentUncheckedUpdateManyInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -380,6 +401,16 @@ export type AgentNullableScalarRelationFilter = {
isNot?: Prisma.AgentWhereInput | null isNot?: Prisma.AgentWhereInput | null
} }
export type AgentListRelationFilter = {
every?: Prisma.AgentWhereInput
some?: Prisma.AgentWhereInput
none?: Prisma.AgentWhereInput
}
export type AgentOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type AgentCountOrderByAggregateInput = { export type AgentCountOrderByAggregateInput = {
id?: Prisma.SortOrder id?: Prisma.SortOrder
type?: Prisma.SortOrder type?: Prisma.SortOrder
@@ -387,6 +418,7 @@ export type AgentCountOrderByAggregateInput = {
soul?: Prisma.SortOrder soul?: Prisma.SortOrder
providerId?: Prisma.SortOrder providerId?: Prisma.SortOrder
modelId?: Prisma.SortOrder modelId?: Prisma.SortOrder
teamId?: Prisma.SortOrder
config?: Prisma.SortOrder config?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
@@ -399,6 +431,7 @@ export type AgentMaxOrderByAggregateInput = {
soul?: Prisma.SortOrder soul?: Prisma.SortOrder
providerId?: Prisma.SortOrder providerId?: Prisma.SortOrder
modelId?: Prisma.SortOrder modelId?: Prisma.SortOrder
teamId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
} }
@@ -410,6 +443,7 @@ export type AgentMinOrderByAggregateInput = {
soul?: Prisma.SortOrder soul?: Prisma.SortOrder
providerId?: Prisma.SortOrder providerId?: Prisma.SortOrder
modelId?: Prisma.SortOrder modelId?: Prisma.SortOrder
teamId?: Prisma.SortOrder
createdAt?: Prisma.SortOrder createdAt?: Prisma.SortOrder
updatedAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder
} }
@@ -419,16 +453,6 @@ export type AgentScalarRelationFilter = {
isNot?: Prisma.AgentWhereInput isNot?: Prisma.AgentWhereInput
} }
export type AgentListRelationFilter = {
every?: Prisma.AgentWhereInput
some?: Prisma.AgentWhereInput
none?: Prisma.AgentWhereInput
}
export type AgentOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type AgentCreateNestedOneWithoutUserInput = { export type AgentCreateNestedOneWithoutUserInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutUserInput, Prisma.AgentUncheckedCreateWithoutUserInput> create?: Prisma.XOR<Prisma.AgentCreateWithoutUserInput, Prisma.AgentUncheckedCreateWithoutUserInput>
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutUserInput connectOrCreate?: Prisma.AgentCreateOrConnectWithoutUserInput
@@ -461,6 +485,48 @@ export type AgentUncheckedUpdateOneWithoutUserNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.AgentUpdateToOneWithWhereWithoutUserInput, Prisma.AgentUpdateWithoutUserInput>, Prisma.AgentUncheckedUpdateWithoutUserInput> update?: Prisma.XOR<Prisma.XOR<Prisma.AgentUpdateToOneWithWhereWithoutUserInput, Prisma.AgentUpdateWithoutUserInput>, Prisma.AgentUncheckedUpdateWithoutUserInput>
} }
export type AgentCreateNestedManyWithoutTeamInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
}
export type AgentUncheckedCreateNestedManyWithoutTeamInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
}
export type AgentUpdateManyWithoutTeamNestedInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
upsert?: Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput | Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
set?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
disconnect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
delete?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
update?: Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput | Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput[]
updateMany?: Prisma.AgentUpdateManyWithWhereWithoutTeamInput | Prisma.AgentUpdateManyWithWhereWithoutTeamInput[]
deleteMany?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
}
export type AgentUncheckedUpdateManyWithoutTeamNestedInput = {
create?: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput> | Prisma.AgentCreateWithoutTeamInput[] | Prisma.AgentUncheckedCreateWithoutTeamInput[]
connectOrCreate?: Prisma.AgentCreateOrConnectWithoutTeamInput | Prisma.AgentCreateOrConnectWithoutTeamInput[]
upsert?: Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput | Prisma.AgentUpsertWithWhereUniqueWithoutTeamInput[]
createMany?: Prisma.AgentCreateManyTeamInputEnvelope
set?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
disconnect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
delete?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
connect?: Prisma.AgentWhereUniqueInput | Prisma.AgentWhereUniqueInput[]
update?: Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput | Prisma.AgentUpdateWithWhereUniqueWithoutTeamInput[]
updateMany?: Prisma.AgentUpdateManyWithWhereWithoutTeamInput | Prisma.AgentUpdateManyWithWhereWithoutTeamInput[]
deleteMany?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
}
export type EnumAgentTypeFieldUpdateOperationsInput = { export type EnumAgentTypeFieldUpdateOperationsInput = {
set?: $Enums.AgentType set?: $Enums.AgentType
} }
@@ -586,6 +652,7 @@ export type AgentCreateWithoutUserInput = {
updatedAt?: Date | string updatedAt?: Date | string
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
} }
@@ -596,6 +663,7 @@ export type AgentUncheckedCreateWithoutUserInput = {
soul?: string | null soul?: string | null
providerId?: string | null providerId?: string | null
modelId?: string | null modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -628,6 +696,7 @@ export type AgentUpdateWithoutUserInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
} }
@@ -638,6 +707,7 @@ export type AgentUncheckedUpdateWithoutUserInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -645,6 +715,76 @@ export type AgentUncheckedUpdateWithoutUserInput = {
skills?: Prisma.AgentSkillUncheckedUpdateManyWithoutAgentNestedInput skills?: Prisma.AgentSkillUncheckedUpdateManyWithoutAgentNestedInput
} }
export type AgentCreateWithoutTeamInput = {
type: $Enums.AgentType
enabled?: boolean
soul?: string | null
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
}
export type AgentUncheckedCreateWithoutTeamInput = {
id: string
type: $Enums.AgentType
enabled?: boolean
soul?: string | null
providerId?: string | null
modelId?: string | null
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
agentSessions?: Prisma.AgentSessionUncheckedCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillUncheckedCreateNestedManyWithoutAgentInput
}
export type AgentCreateOrConnectWithoutTeamInput = {
where: Prisma.AgentWhereUniqueInput
create: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput>
}
export type AgentCreateManyTeamInputEnvelope = {
data: Prisma.AgentCreateManyTeamInput | Prisma.AgentCreateManyTeamInput[]
skipDuplicates?: boolean
}
export type AgentUpsertWithWhereUniqueWithoutTeamInput = {
where: Prisma.AgentWhereUniqueInput
update: Prisma.XOR<Prisma.AgentUpdateWithoutTeamInput, Prisma.AgentUncheckedUpdateWithoutTeamInput>
create: Prisma.XOR<Prisma.AgentCreateWithoutTeamInput, Prisma.AgentUncheckedCreateWithoutTeamInput>
}
export type AgentUpdateWithWhereUniqueWithoutTeamInput = {
where: Prisma.AgentWhereUniqueInput
data: Prisma.XOR<Prisma.AgentUpdateWithoutTeamInput, Prisma.AgentUncheckedUpdateWithoutTeamInput>
}
export type AgentUpdateManyWithWhereWithoutTeamInput = {
where: Prisma.AgentScalarWhereInput
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutTeamInput>
}
export type AgentScalarWhereInput = {
AND?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
OR?: Prisma.AgentScalarWhereInput[]
NOT?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
id?: Prisma.StringFilter<"Agent"> | string
type?: Prisma.EnumAgentTypeFilter<"Agent"> | $Enums.AgentType
enabled?: Prisma.BoolFilter<"Agent"> | boolean
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
teamId?: Prisma.StringFilter<"Agent"> | string
config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
}
export type AgentCreateWithoutSkillsInput = { export type AgentCreateWithoutSkillsInput = {
type: $Enums.AgentType type: $Enums.AgentType
enabled?: boolean enabled?: boolean
@@ -655,6 +795,7 @@ export type AgentCreateWithoutSkillsInput = {
user: Prisma.UserCreateNestedOneWithoutAgentInput user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
} }
@@ -665,6 +806,7 @@ export type AgentUncheckedCreateWithoutSkillsInput = {
soul?: string | null soul?: string | null
providerId?: string | null providerId?: string | null
modelId?: string | null modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -697,6 +839,7 @@ export type AgentUpdateWithoutSkillsInput = {
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
} }
@@ -707,6 +850,7 @@ export type AgentUncheckedUpdateWithoutSkillsInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -723,6 +867,7 @@ export type AgentCreateWithoutAgentSessionsInput = {
user: Prisma.UserCreateNestedOneWithoutAgentInput user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
} }
@@ -733,6 +878,7 @@ export type AgentUncheckedCreateWithoutAgentSessionsInput = {
soul?: string | null soul?: string | null
providerId?: string | null providerId?: string | null
modelId?: string | null modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -765,6 +911,7 @@ export type AgentUpdateWithoutAgentSessionsInput = {
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
} }
@@ -775,6 +922,7 @@ export type AgentUncheckedUpdateWithoutAgentSessionsInput = {
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -790,6 +938,7 @@ export type AgentCreateWithoutModelRefInput = {
updatedAt?: Date | string updatedAt?: Date | string
user: Prisma.UserCreateNestedOneWithoutAgentInput user: Prisma.UserCreateNestedOneWithoutAgentInput
provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput provider?: Prisma.ProviderCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
} }
@@ -800,6 +949,7 @@ export type AgentUncheckedCreateWithoutModelRefInput = {
enabled?: boolean enabled?: boolean
soul?: string | null soul?: string | null
providerId?: string | null providerId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -833,21 +983,6 @@ export type AgentUpdateManyWithWhereWithoutModelRefInput = {
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutModelRefInput> data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutModelRefInput>
} }
export type AgentScalarWhereInput = {
AND?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
OR?: Prisma.AgentScalarWhereInput[]
NOT?: Prisma.AgentScalarWhereInput | Prisma.AgentScalarWhereInput[]
id?: Prisma.StringFilter<"Agent"> | string
type?: Prisma.EnumAgentTypeFilter<"Agent"> | $Enums.AgentType
enabled?: Prisma.BoolFilter<"Agent"> | boolean
soul?: Prisma.StringNullableFilter<"Agent"> | string | null
providerId?: Prisma.StringNullableFilter<"Agent"> | string | null
modelId?: Prisma.StringNullableFilter<"Agent"> | string | null
config?: Prisma.JsonFilter<"Agent">
createdAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"Agent"> | Date | string
}
export type AgentCreateWithoutProviderInput = { export type AgentCreateWithoutProviderInput = {
type: $Enums.AgentType type: $Enums.AgentType
enabled?: boolean enabled?: boolean
@@ -857,6 +992,7 @@ export type AgentCreateWithoutProviderInput = {
updatedAt?: Date | string updatedAt?: Date | string
user: Prisma.UserCreateNestedOneWithoutAgentInput user: Prisma.UserCreateNestedOneWithoutAgentInput
modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput modelRef?: Prisma.ModelCreateNestedOneWithoutAgentsInput
team: Prisma.TeamCreateNestedOneWithoutAgentsInput
agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput agentSessions?: Prisma.AgentSessionCreateNestedManyWithoutAgentInput
skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput skills?: Prisma.AgentSkillCreateNestedManyWithoutAgentInput
} }
@@ -867,6 +1003,7 @@ export type AgentUncheckedCreateWithoutProviderInput = {
enabled?: boolean enabled?: boolean
soul?: string | null soul?: string | null
modelId?: string | null modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -900,12 +1037,65 @@ export type AgentUpdateManyWithWhereWithoutProviderInput = {
data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutProviderInput> data: Prisma.XOR<Prisma.AgentUpdateManyMutationInput, Prisma.AgentUncheckedUpdateManyWithoutProviderInput>
} }
export type AgentCreateManyTeamInput = {
id: string
type: $Enums.AgentType
enabled?: boolean
soul?: string | null
providerId?: string | null
modelId?: string | null
config:PrismaJson.AgentConfig
createdAt?: Date | string
updatedAt?: Date | string
}
export type AgentUpdateWithoutTeamInput = {
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
}
export type AgentUncheckedUpdateWithoutTeamInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
agentSessions?: Prisma.AgentSessionUncheckedUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUncheckedUpdateManyWithoutAgentNestedInput
}
export type AgentUncheckedUpdateManyWithoutTeamInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
type?: Prisma.EnumAgentTypeFieldUpdateOperationsInput | $Enums.AgentType
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
}
export type AgentCreateManyModelRefInput = { export type AgentCreateManyModelRefInput = {
id: string id: string
type: $Enums.AgentType type: $Enums.AgentType
enabled?: boolean enabled?: boolean
soul?: string | null soul?: string | null
providerId?: string | null providerId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -920,6 +1110,7 @@ export type AgentUpdateWithoutModelRefInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput provider?: Prisma.ProviderUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
} }
@@ -930,6 +1121,7 @@ export type AgentUncheckedUpdateWithoutModelRefInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -943,6 +1135,7 @@ export type AgentUncheckedUpdateManyWithoutModelRefInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null providerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -954,6 +1147,7 @@ export type AgentCreateManyProviderInput = {
enabled?: boolean enabled?: boolean
soul?: string | null soul?: string | null
modelId?: string | null modelId?: string | null
teamId: string
config:PrismaJson.AgentConfig config:PrismaJson.AgentConfig
createdAt?: Date | string createdAt?: Date | string
updatedAt?: Date | string updatedAt?: Date | string
@@ -968,6 +1162,7 @@ export type AgentUpdateWithoutProviderInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput user?: Prisma.UserUpdateOneRequiredWithoutAgentNestedInput
modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput modelRef?: Prisma.ModelUpdateOneWithoutAgentsNestedInput
team?: Prisma.TeamUpdateOneRequiredWithoutAgentsNestedInput
agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput agentSessions?: Prisma.AgentSessionUpdateManyWithoutAgentNestedInput
skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput skills?: Prisma.AgentSkillUpdateManyWithoutAgentNestedInput
} }
@@ -978,6 +1173,7 @@ export type AgentUncheckedUpdateWithoutProviderInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -991,6 +1187,7 @@ export type AgentUncheckedUpdateManyWithoutProviderInput = {
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null soul?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null modelId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
teamId?: Prisma.StringFieldUpdateOperationsInput | string
config?:PrismaJson.AgentConfig config?:PrismaJson.AgentConfig
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
@@ -1043,12 +1240,14 @@ export type AgentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
soul?: boolean soul?: boolean
providerId?: boolean providerId?: boolean
modelId?: boolean modelId?: boolean
teamId?: boolean
config?: boolean config?: boolean
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs> user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs> provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs> modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs> agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs>
skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs> skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs>
_count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs>
@@ -1061,12 +1260,14 @@ export type AgentSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensi
soul?: boolean soul?: boolean
providerId?: boolean providerId?: boolean
modelId?: boolean modelId?: boolean
teamId?: boolean
config?: boolean config?: boolean
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs> user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs> provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs> modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
}, ExtArgs["result"]["agent"]> }, ExtArgs["result"]["agent"]>
export type AgentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{ export type AgentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
@@ -1076,12 +1277,14 @@ export type AgentSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensi
soul?: boolean soul?: boolean
providerId?: boolean providerId?: boolean
modelId?: boolean modelId?: boolean
teamId?: boolean
config?: boolean config?: boolean
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
user?: boolean | Prisma.UserDefaultArgs<ExtArgs> user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs> provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs> modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
}, ExtArgs["result"]["agent"]> }, ExtArgs["result"]["agent"]>
export type AgentSelectScalar = { export type AgentSelectScalar = {
@@ -1091,16 +1294,18 @@ export type AgentSelectScalar = {
soul?: boolean soul?: boolean
providerId?: boolean providerId?: boolean
modelId?: boolean modelId?: boolean
teamId?: boolean
config?: boolean config?: boolean
createdAt?: boolean createdAt?: boolean
updatedAt?: boolean updatedAt?: boolean
} }
export type AgentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "enabled" | "soul" | "providerId" | "modelId" | "config" | "createdAt" | "updatedAt", ExtArgs["result"]["agent"]> export type AgentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "enabled" | "soul" | "providerId" | "modelId" | "teamId" | "config" | "createdAt" | "updatedAt", ExtArgs["result"]["agent"]>
export type AgentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type AgentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs> user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs> provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs> modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs> agentSessions?: boolean | Prisma.Agent$agentSessionsArgs<ExtArgs>
skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs> skills?: boolean | Prisma.Agent$skillsArgs<ExtArgs>
_count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.AgentCountOutputTypeDefaultArgs<ExtArgs>
@@ -1109,11 +1314,13 @@ export type AgentIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extens
user?: boolean | Prisma.UserDefaultArgs<ExtArgs> user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs> provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs> modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
} }
export type AgentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type AgentIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs> user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
provider?: boolean | Prisma.Agent$providerArgs<ExtArgs> provider?: boolean | Prisma.Agent$providerArgs<ExtArgs>
modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs> modelRef?: boolean | Prisma.Agent$modelRefArgs<ExtArgs>
team?: boolean | Prisma.TeamDefaultArgs<ExtArgs>
} }
export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -1122,6 +1329,7 @@ export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
user: Prisma.$UserPayload<ExtArgs> user: Prisma.$UserPayload<ExtArgs>
provider: Prisma.$ProviderPayload<ExtArgs> | null provider: Prisma.$ProviderPayload<ExtArgs> | null
modelRef: Prisma.$ModelPayload<ExtArgs> | null modelRef: Prisma.$ModelPayload<ExtArgs> | null
team: Prisma.$TeamPayload<ExtArgs>
agentSessions: Prisma.$AgentSessionPayload<ExtArgs>[] agentSessions: Prisma.$AgentSessionPayload<ExtArgs>[]
skills: Prisma.$AgentSkillPayload<ExtArgs>[] skills: Prisma.$AgentSkillPayload<ExtArgs>[]
} }
@@ -1132,6 +1340,7 @@ export type $AgentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
soul: string | null soul: string | null
providerId: string | null providerId: string | null
modelId: string | null modelId: string | null
teamId: string
/** /**
* [AgentConfig] * [AgentConfig]
*/ */
@@ -1535,6 +1744,7 @@ export interface Prisma__AgentClient<T, Null = never, ExtArgs extends runtime.Ty
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
provider<T extends Prisma.Agent$providerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$providerArgs<ExtArgs>>): Prisma.Prisma__ProviderClient<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> provider<T extends Prisma.Agent$providerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$providerArgs<ExtArgs>>): Prisma.Prisma__ProviderClient<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
modelRef<T extends Prisma.Agent$modelRefArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$modelRefArgs<ExtArgs>>): Prisma.Prisma__ModelClient<runtime.Types.Result.GetResult<Prisma.$ModelPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> modelRef<T extends Prisma.Agent$modelRefArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$modelRefArgs<ExtArgs>>): Prisma.Prisma__ModelClient<runtime.Types.Result.GetResult<Prisma.$ModelPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
team<T extends Prisma.TeamDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.TeamDefaultArgs<ExtArgs>>): Prisma.Prisma__TeamClient<runtime.Types.Result.GetResult<Prisma.$TeamPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
agentSessions<T extends Prisma.Agent$agentSessionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$agentSessionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSessionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> agentSessions<T extends Prisma.Agent$agentSessionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$agentSessionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSessionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
skills<T extends Prisma.Agent$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> skills<T extends Prisma.Agent$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Agent$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/** /**
@@ -1572,6 +1782,7 @@ export interface AgentFieldRefs {
readonly soul: Prisma.FieldRef<"Agent", 'String'> readonly soul: Prisma.FieldRef<"Agent", 'String'>
readonly providerId: Prisma.FieldRef<"Agent", 'String'> readonly providerId: Prisma.FieldRef<"Agent", 'String'>
readonly modelId: Prisma.FieldRef<"Agent", 'String'> readonly modelId: Prisma.FieldRef<"Agent", 'String'>
readonly teamId: Prisma.FieldRef<"Agent", 'String'>
readonly config: Prisma.FieldRef<"Agent", 'Json'> readonly config: Prisma.FieldRef<"Agent", 'Json'>
readonly createdAt: Prisma.FieldRef<"Agent", 'DateTime'> readonly createdAt: Prisma.FieldRef<"Agent", 'DateTime'>
readonly updatedAt: Prisma.FieldRef<"Agent", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Agent", 'DateTime'>
+186
View File
@@ -198,6 +198,7 @@ export type TeamWhereInput = {
providers?: Prisma.ProviderListRelationFilter providers?: Prisma.ProviderListRelationFilter
skills?: Prisma.SkillListRelationFilter skills?: Prisma.SkillListRelationFilter
sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null
agents?: Prisma.AgentListRelationFilter
} }
export type TeamOrderByWithRelationInput = { export type TeamOrderByWithRelationInput = {
@@ -217,6 +218,7 @@ export type TeamOrderByWithRelationInput = {
providers?: Prisma.ProviderOrderByRelationAggregateInput providers?: Prisma.ProviderOrderByRelationAggregateInput
skills?: Prisma.SkillOrderByRelationAggregateInput skills?: Prisma.SkillOrderByRelationAggregateInput
sandbox?: Prisma.SandboxOrderByWithRelationInput sandbox?: Prisma.SandboxOrderByWithRelationInput
agents?: Prisma.AgentOrderByRelationAggregateInput
} }
export type TeamWhereUniqueInput = Prisma.AtLeast<{ export type TeamWhereUniqueInput = Prisma.AtLeast<{
@@ -239,6 +241,7 @@ export type TeamWhereUniqueInput = Prisma.AtLeast<{
providers?: Prisma.ProviderListRelationFilter providers?: Prisma.ProviderListRelationFilter
skills?: Prisma.SkillListRelationFilter skills?: Prisma.SkillListRelationFilter
sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null sandbox?: Prisma.XOR<Prisma.SandboxNullableScalarRelationFilter, Prisma.SandboxWhereInput> | null
agents?: Prisma.AgentListRelationFilter
}, "id" | "rootFolderId"> }, "id" | "rootFolderId">
export type TeamOrderByWithAggregationInput = { export type TeamOrderByWithAggregationInput = {
@@ -281,6 +284,7 @@ export type TeamCreateInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateInput = { export type TeamUncheckedCreateInput = {
@@ -299,6 +303,7 @@ export type TeamUncheckedCreateInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamUpdateInput = { export type TeamUpdateInput = {
@@ -317,6 +322,7 @@ export type TeamUpdateInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateInput = { export type TeamUncheckedUpdateInput = {
@@ -335,6 +341,7 @@ export type TeamUncheckedUpdateInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateManyInput = { export type TeamCreateManyInput = {
@@ -530,6 +537,20 @@ export type TeamUpdateOneRequiredWithoutNotificationsNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutNotificationsInput, Prisma.TeamUpdateWithoutNotificationsInput>, Prisma.TeamUncheckedUpdateWithoutNotificationsInput> update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutNotificationsInput, Prisma.TeamUpdateWithoutNotificationsInput>, Prisma.TeamUncheckedUpdateWithoutNotificationsInput>
} }
export type TeamCreateNestedOneWithoutAgentsInput = {
create?: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutAgentsInput
connect?: Prisma.TeamWhereUniqueInput
}
export type TeamUpdateOneRequiredWithoutAgentsNestedInput = {
create?: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutAgentsInput
upsert?: Prisma.TeamUpsertWithoutAgentsInput
connect?: Prisma.TeamWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.TeamUpdateToOneWithWhereWithoutAgentsInput, Prisma.TeamUpdateWithoutAgentsInput>, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
}
export type TeamCreateNestedOneWithoutUserMetadataInput = { export type TeamCreateNestedOneWithoutUserMetadataInput = {
create?: Prisma.XOR<Prisma.TeamCreateWithoutUserMetadataInput, Prisma.TeamUncheckedCreateWithoutUserMetadataInput> create?: Prisma.XOR<Prisma.TeamCreateWithoutUserMetadataInput, Prisma.TeamUncheckedCreateWithoutUserMetadataInput>
connectOrCreate?: Prisma.TeamCreateOrConnectWithoutUserMetadataInput connectOrCreate?: Prisma.TeamCreateOrConnectWithoutUserMetadataInput
@@ -573,6 +594,7 @@ export type TeamCreateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutSandboxInput = { export type TeamUncheckedCreateWithoutSandboxInput = {
@@ -590,6 +612,7 @@ export type TeamUncheckedCreateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutSandboxInput = { export type TeamCreateOrConnectWithoutSandboxInput = {
@@ -623,6 +646,7 @@ export type TeamUpdateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutSandboxInput = { export type TeamUncheckedUpdateWithoutSandboxInput = {
@@ -640,6 +664,7 @@ export type TeamUncheckedUpdateWithoutSandboxInput = {
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutSkillsInput = { export type TeamCreateWithoutSkillsInput = {
@@ -657,6 +682,7 @@ export type TeamCreateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutSkillsInput = { export type TeamUncheckedCreateWithoutSkillsInput = {
@@ -674,6 +700,7 @@ export type TeamUncheckedCreateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutSkillsInput = { export type TeamCreateOrConnectWithoutSkillsInput = {
@@ -707,6 +734,7 @@ export type TeamUpdateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutSkillsInput = { export type TeamUncheckedUpdateWithoutSkillsInput = {
@@ -724,6 +752,7 @@ export type TeamUncheckedUpdateWithoutSkillsInput = {
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutMembersInput = { export type TeamCreateWithoutMembersInput = {
@@ -741,6 +770,7 @@ export type TeamCreateWithoutMembersInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutMembersInput = { export type TeamUncheckedCreateWithoutMembersInput = {
@@ -758,6 +788,7 @@ export type TeamUncheckedCreateWithoutMembersInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutMembersInput = { export type TeamCreateOrConnectWithoutMembersInput = {
@@ -791,6 +822,7 @@ export type TeamUpdateWithoutMembersInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutMembersInput = { export type TeamUncheckedUpdateWithoutMembersInput = {
@@ -808,6 +840,7 @@ export type TeamUncheckedUpdateWithoutMembersInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutProjectsInput = { export type TeamCreateWithoutProjectsInput = {
@@ -825,6 +858,7 @@ export type TeamCreateWithoutProjectsInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutProjectsInput = { export type TeamUncheckedCreateWithoutProjectsInput = {
@@ -842,6 +876,7 @@ export type TeamUncheckedCreateWithoutProjectsInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutProjectsInput = { export type TeamCreateOrConnectWithoutProjectsInput = {
@@ -875,6 +910,7 @@ export type TeamUpdateWithoutProjectsInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutProjectsInput = { export type TeamUncheckedUpdateWithoutProjectsInput = {
@@ -892,6 +928,7 @@ export type TeamUncheckedUpdateWithoutProjectsInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutRootFolderInput = { export type TeamCreateWithoutRootFolderInput = {
@@ -909,6 +946,7 @@ export type TeamCreateWithoutRootFolderInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutRootFolderInput = { export type TeamUncheckedCreateWithoutRootFolderInput = {
@@ -926,6 +964,7 @@ export type TeamUncheckedCreateWithoutRootFolderInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutRootFolderInput = { export type TeamCreateOrConnectWithoutRootFolderInput = {
@@ -959,6 +998,7 @@ export type TeamUpdateWithoutRootFolderInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutRootFolderInput = { export type TeamUncheckedUpdateWithoutRootFolderInput = {
@@ -976,6 +1016,7 @@ export type TeamUncheckedUpdateWithoutRootFolderInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutInvitesInput = { export type TeamCreateWithoutInvitesInput = {
@@ -993,6 +1034,7 @@ export type TeamCreateWithoutInvitesInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutInvitesInput = { export type TeamUncheckedCreateWithoutInvitesInput = {
@@ -1010,6 +1052,7 @@ export type TeamUncheckedCreateWithoutInvitesInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutInvitesInput = { export type TeamCreateOrConnectWithoutInvitesInput = {
@@ -1043,6 +1086,7 @@ export type TeamUpdateWithoutInvitesInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutInvitesInput = { export type TeamUncheckedUpdateWithoutInvitesInput = {
@@ -1060,6 +1104,7 @@ export type TeamUncheckedUpdateWithoutInvitesInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutMetadataFieldsInput = { export type TeamCreateWithoutMetadataFieldsInput = {
@@ -1077,6 +1122,7 @@ export type TeamCreateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutMetadataFieldsInput = { export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
@@ -1094,6 +1140,7 @@ export type TeamUncheckedCreateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutMetadataFieldsInput = { export type TeamCreateOrConnectWithoutMetadataFieldsInput = {
@@ -1127,6 +1174,7 @@ export type TeamUpdateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutMetadataFieldsInput = { export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
@@ -1144,6 +1192,7 @@ export type TeamUncheckedUpdateWithoutMetadataFieldsInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutNotificationsInput = { export type TeamCreateWithoutNotificationsInput = {
@@ -1161,6 +1210,7 @@ export type TeamCreateWithoutNotificationsInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutNotificationsInput = { export type TeamUncheckedCreateWithoutNotificationsInput = {
@@ -1178,6 +1228,7 @@ export type TeamUncheckedCreateWithoutNotificationsInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutNotificationsInput = { export type TeamCreateOrConnectWithoutNotificationsInput = {
@@ -1211,6 +1262,7 @@ export type TeamUpdateWithoutNotificationsInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutNotificationsInput = { export type TeamUncheckedUpdateWithoutNotificationsInput = {
@@ -1228,6 +1280,95 @@ export type TeamUncheckedUpdateWithoutNotificationsInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
}
export type TeamCreateWithoutAgentsInput = {
id?: string
name: string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Date | string
updatedAt?: Date | string
rootFolder?: Prisma.AssetCreateNestedOneWithoutTeamRootFolderInput
members?: Prisma.TeamMemberCreateNestedManyWithoutTeamInput
projects?: Prisma.ProjectCreateNestedManyWithoutTeamInput
metadataFields?: Prisma.MetadataFieldCreateNestedManyWithoutTeamInput
invites?: Prisma.InviteCreateNestedManyWithoutTeamInput
notifications?: Prisma.NotificationCreateNestedManyWithoutTeamInput
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
}
export type TeamUncheckedCreateWithoutAgentsInput = {
id?: string
name: string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Date | string
updatedAt?: Date | string
rootFolderId?: string | null
members?: Prisma.TeamMemberUncheckedCreateNestedManyWithoutTeamInput
projects?: Prisma.ProjectUncheckedCreateNestedManyWithoutTeamInput
metadataFields?: Prisma.MetadataFieldUncheckedCreateNestedManyWithoutTeamInput
invites?: Prisma.InviteUncheckedCreateNestedManyWithoutTeamInput
notifications?: Prisma.NotificationUncheckedCreateNestedManyWithoutTeamInput
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
}
export type TeamCreateOrConnectWithoutAgentsInput = {
where: Prisma.TeamWhereUniqueInput
create: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
}
export type TeamUpsertWithoutAgentsInput = {
update: Prisma.XOR<Prisma.TeamUpdateWithoutAgentsInput, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
create: Prisma.XOR<Prisma.TeamCreateWithoutAgentsInput, Prisma.TeamUncheckedCreateWithoutAgentsInput>
where?: Prisma.TeamWhereInput
}
export type TeamUpdateToOneWithWhereWithoutAgentsInput = {
where?: Prisma.TeamWhereInput
data: Prisma.XOR<Prisma.TeamUpdateWithoutAgentsInput, Prisma.TeamUncheckedUpdateWithoutAgentsInput>
}
export type TeamUpdateWithoutAgentsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
rootFolder?: Prisma.AssetUpdateOneWithoutTeamRootFolderNestedInput
members?: Prisma.TeamMemberUpdateManyWithoutTeamNestedInput
projects?: Prisma.ProjectUpdateManyWithoutTeamNestedInput
metadataFields?: Prisma.MetadataFieldUpdateManyWithoutTeamNestedInput
invites?: Prisma.InviteUpdateManyWithoutTeamNestedInput
notifications?: Prisma.NotificationUpdateManyWithoutTeamNestedInput
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
}
export type TeamUncheckedUpdateWithoutAgentsInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
name?: Prisma.StringFieldUpdateOperationsInput | string
settings?:PrismaJson.Settings | Prisma.NullableJsonNullValueInput
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
rootFolderId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
members?: Prisma.TeamMemberUncheckedUpdateManyWithoutTeamNestedInput
projects?: Prisma.ProjectUncheckedUpdateManyWithoutTeamNestedInput
metadataFields?: Prisma.MetadataFieldUncheckedUpdateManyWithoutTeamNestedInput
invites?: Prisma.InviteUncheckedUpdateManyWithoutTeamNestedInput
notifications?: Prisma.NotificationUncheckedUpdateManyWithoutTeamNestedInput
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
} }
export type TeamCreateWithoutUserMetadataInput = { export type TeamCreateWithoutUserMetadataInput = {
@@ -1245,6 +1386,7 @@ export type TeamCreateWithoutUserMetadataInput = {
providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutUserMetadataInput = { export type TeamUncheckedCreateWithoutUserMetadataInput = {
@@ -1262,6 +1404,7 @@ export type TeamUncheckedCreateWithoutUserMetadataInput = {
providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput providers?: Prisma.ProviderUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutUserMetadataInput = { export type TeamCreateOrConnectWithoutUserMetadataInput = {
@@ -1295,6 +1438,7 @@ export type TeamUpdateWithoutUserMetadataInput = {
providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutUserMetadataInput = { export type TeamUncheckedUpdateWithoutUserMetadataInput = {
@@ -1312,6 +1456,7 @@ export type TeamUncheckedUpdateWithoutUserMetadataInput = {
providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput providers?: Prisma.ProviderUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
export type TeamCreateWithoutProvidersInput = { export type TeamCreateWithoutProvidersInput = {
@@ -1329,6 +1474,7 @@ export type TeamCreateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput userMetadata?: Prisma.UserMetadataCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillCreateNestedManyWithoutTeamInput skills?: Prisma.SkillCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentCreateNestedManyWithoutTeamInput
} }
export type TeamUncheckedCreateWithoutProvidersInput = { export type TeamUncheckedCreateWithoutProvidersInput = {
@@ -1346,6 +1492,7 @@ export type TeamUncheckedCreateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput userMetadata?: Prisma.UserMetadataUncheckedCreateNestedManyWithoutTeamInput
skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput skills?: Prisma.SkillUncheckedCreateNestedManyWithoutTeamInput
sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput sandbox?: Prisma.SandboxUncheckedCreateNestedOneWithoutTeamInput
agents?: Prisma.AgentUncheckedCreateNestedManyWithoutTeamInput
} }
export type TeamCreateOrConnectWithoutProvidersInput = { export type TeamCreateOrConnectWithoutProvidersInput = {
@@ -1379,6 +1526,7 @@ export type TeamUpdateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput userMetadata?: Prisma.UserMetadataUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUpdateManyWithoutTeamNestedInput
} }
export type TeamUncheckedUpdateWithoutProvidersInput = { export type TeamUncheckedUpdateWithoutProvidersInput = {
@@ -1396,6 +1544,7 @@ export type TeamUncheckedUpdateWithoutProvidersInput = {
userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput userMetadata?: Prisma.UserMetadataUncheckedUpdateManyWithoutTeamNestedInput
skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput skills?: Prisma.SkillUncheckedUpdateManyWithoutTeamNestedInput
sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput sandbox?: Prisma.SandboxUncheckedUpdateOneWithoutTeamNestedInput
agents?: Prisma.AgentUncheckedUpdateManyWithoutTeamNestedInput
} }
@@ -1412,6 +1561,7 @@ export type TeamCountOutputType = {
userMetadata: number userMetadata: number
providers: number providers: number
skills: number skills: number
agents: number
} }
export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -1423,6 +1573,7 @@ export type TeamCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.I
userMetadata?: boolean | TeamCountOutputTypeCountUserMetadataArgs userMetadata?: boolean | TeamCountOutputTypeCountUserMetadataArgs
providers?: boolean | TeamCountOutputTypeCountProvidersArgs providers?: boolean | TeamCountOutputTypeCountProvidersArgs
skills?: boolean | TeamCountOutputTypeCountSkillsArgs skills?: boolean | TeamCountOutputTypeCountSkillsArgs
agents?: boolean | TeamCountOutputTypeCountAgentsArgs
} }
/** /**
@@ -1491,6 +1642,13 @@ export type TeamCountOutputTypeCountSkillsArgs<ExtArgs extends runtime.Types.Ext
where?: Prisma.SkillWhereInput where?: Prisma.SkillWhereInput
} }
/**
* TeamCountOutputType without action
*/
export type TeamCountOutputTypeCountAgentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.AgentWhereInput
}
export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{ export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean id?: boolean
@@ -1509,6 +1667,7 @@ export type TeamSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
providers?: boolean | Prisma.Team$providersArgs<ExtArgs> providers?: boolean | Prisma.Team$providersArgs<ExtArgs>
skills?: boolean | Prisma.Team$skillsArgs<ExtArgs> skills?: boolean | Prisma.Team$skillsArgs<ExtArgs>
sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs> sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs>
agents?: boolean | Prisma.Team$agentsArgs<ExtArgs>
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["team"]> }, ExtArgs["result"]["team"]>
@@ -1553,6 +1712,7 @@ export type TeamInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs =
providers?: boolean | Prisma.Team$providersArgs<ExtArgs> providers?: boolean | Prisma.Team$providersArgs<ExtArgs>
skills?: boolean | Prisma.Team$skillsArgs<ExtArgs> skills?: boolean | Prisma.Team$skillsArgs<ExtArgs>
sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs> sandbox?: boolean | Prisma.Team$sandboxArgs<ExtArgs>
agents?: boolean | Prisma.Team$agentsArgs<ExtArgs>
_count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs> _count?: boolean | Prisma.TeamCountOutputTypeDefaultArgs<ExtArgs>
} }
export type TeamIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = { export type TeamIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -1575,6 +1735,7 @@ export type $TeamPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
providers: Prisma.$ProviderPayload<ExtArgs>[] providers: Prisma.$ProviderPayload<ExtArgs>[]
skills: Prisma.$SkillPayload<ExtArgs>[] skills: Prisma.$SkillPayload<ExtArgs>[]
sandbox: Prisma.$SandboxPayload<ExtArgs> | null sandbox: Prisma.$SandboxPayload<ExtArgs> | null
agents: Prisma.$AgentPayload<ExtArgs>[]
} }
scalars: runtime.Types.Extensions.GetPayloadResult<{ scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string id: string
@@ -1990,6 +2151,7 @@ export interface Prisma__TeamClient<T, Null = never, ExtArgs extends runtime.Typ
providers<T extends Prisma.Team$providersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$providersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> providers<T extends Prisma.Team$providersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$providersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
skills<T extends Prisma.Team$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null> skills<T extends Prisma.Team$skillsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$skillsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SkillPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
sandbox<T extends Prisma.Team$sandboxArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$sandboxArgs<ExtArgs>>): Prisma.Prisma__SandboxClient<runtime.Types.Result.GetResult<Prisma.$SandboxPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> sandbox<T extends Prisma.Team$sandboxArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$sandboxArgs<ExtArgs>>): Prisma.Prisma__SandboxClient<runtime.Types.Result.GetResult<Prisma.$SandboxPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
agents<T extends Prisma.Team$agentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Team$agentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/** /**
* Attaches callbacks for the resolution and/or rejection of the Promise. * Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved. * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -2655,6 +2817,30 @@ export type Team$sandboxArgs<ExtArgs extends runtime.Types.Extensions.InternalAr
where?: Prisma.SandboxWhereInput where?: Prisma.SandboxWhereInput
} }
/**
* Team.agents
*/
export type Team$agentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the Agent
*/
select?: Prisma.AgentSelect<ExtArgs> | null
/**
* Omit specific fields from the Agent
*/
omit?: Prisma.AgentOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AgentInclude<ExtArgs> | null
where?: Prisma.AgentWhereInput
orderBy?: Prisma.AgentOrderByWithRelationInput | Prisma.AgentOrderByWithRelationInput[]
cursor?: Prisma.AgentWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.AgentScalarFieldEnum | Prisma.AgentScalarFieldEnum[]
}
/** /**
* Team without action * Team without action
*/ */
+4
View File
@@ -63,6 +63,7 @@ describe('AgentService', () => {
const agent = await db.agent.create({ const agent = await db.agent.create({
data: { data: {
id: user.id, id: user.id,
teamId: team.id,
type: 'chat', type: 'chat',
providerId: provider.id, providerId: provider.id,
modelId: model.id, modelId: model.id,
@@ -290,6 +291,7 @@ describe('AgentService', () => {
type: 'agent', type: 'agent',
agent: { agent: {
create: { create: {
teamId: team.id,
type: 'autofill', type: 'autofill',
enabled: true, enabled: true,
providerId: provider.id, providerId: provider.id,
@@ -378,6 +380,7 @@ describe('AgentService', () => {
type: 'agent', type: 'agent',
agent: { agent: {
create: { create: {
teamId: team.id,
type: 'chat', type: 'chat',
enabled: true, enabled: true,
providerId: provider.id, providerId: provider.id,
@@ -456,6 +459,7 @@ describe('AgentService', () => {
const agent = await db.agent.create({ const agent = await db.agent.create({
data: { data: {
id: botUser.id, id: botUser.id,
teamId: team.id,
type: 'chat', type: 'chat',
enabled: true, enabled: true,
providerId: provider.id, providerId: provider.id,
+14 -36
View File
@@ -35,11 +35,7 @@ export class AgentService {
const existing = await this.prismaClient.agent.findFirst({ const existing = await this.prismaClient.agent.findFirst({
where: { where: {
type, type,
user: { teamId,
teamMembers: {
some: { teamId },
},
},
}, },
}) })
if (existing) { if (existing) {
@@ -85,6 +81,7 @@ export class AgentService {
const agent = await tx.agent.create({ const agent = await tx.agent.create({
data: { data: {
id: user.id, id: user.id,
teamId,
type, type,
enabled: enabled ?? true, enabled: enabled ?? true,
providerId: providerId || null, providerId: providerId || null,
@@ -139,22 +136,15 @@ export class AgentService {
if (!agent) throw new Error('agent not found') if (!agent) throw new Error('agent not found')
if (type === 'embedding' || type === 'transcription' || type === 'autofill') { if (type === 'embedding' || type === 'transcription' || type === 'autofill') {
const teamId = agent.user.teamMembers[0]?.teamId const existing = await this.prismaClient.agent.findFirst({
if (teamId) { where: {
const existing = await this.prismaClient.agent.findFirst({ type,
where: { id: { not: agentId },
type, teamId: agent.teamId,
id: { not: agentId }, },
user: { })
teamMembers: { if (existing) {
some: { teamId }, throw new Error(`Agent of type ${type} already exists for this team`)
},
},
},
})
if (existing) {
throw new Error(`Agent of type ${type} already exists for this team`)
}
} }
} }
@@ -232,11 +222,7 @@ export class AgentService {
async listAgents(params: ListAgentsParams) { async listAgents(params: ListAgentsParams) {
return this.prismaClient.agent.findMany({ return this.prismaClient.agent.findMany({
where: { where: {
user: { teamId: params.teamId,
teamMembers: {
some: { teamId: params.teamId },
},
},
}, },
orderBy: { orderBy: {
id: 'desc', id: 'desc',
@@ -271,11 +257,7 @@ export class AgentService {
where: { where: {
type: 'chat', type: 'chat',
enabled: true, enabled: true,
user: { teamId,
teamMembers: {
some: { teamId },
},
},
}, },
}) })
if (!agent) { if (!agent) {
@@ -426,11 +408,7 @@ export class AgentService {
where: { where: {
type: 'autofill', type: 'autofill',
enabled: true, enabled: true,
user: { teamId,
teamMembers: {
some: { teamId },
},
},
}, },
}) })
if (!agent) { if (!agent) {
+1
View File
@@ -70,6 +70,7 @@ describe('AiService', () => {
type: 'agent', type: 'agent',
agent: { agent: {
create: { create: {
teamId: team.id,
type: 'transcription', type: 'transcription',
enabled: true, enabled: true,
providerId: provider.id, providerId: provider.id,
+3 -1
View File
@@ -483,7 +483,7 @@ describe('AssetService', () => {
}) })
it('correctly handles AI comments with agent identity', async () => { it('correctly handles AI comments with agent identity', async () => {
const { assets } = await setupBasicAssets() const { assets, project } = await setupBasicAssets()
// Create an agent user // Create an agent user
const agentUser = await prisma.user.create({ const agentUser = await prisma.user.create({
@@ -499,6 +499,7 @@ describe('AssetService', () => {
await prisma.agent.create({ await prisma.agent.create({
data: { data: {
id: agentUser.id, id: agentUser.id,
teamId: project.teamId,
type: 'autofill', type: 'autofill',
config: { config: {
provider: 'test', provider: 'test',
@@ -617,6 +618,7 @@ describe('AssetService', () => {
const agent = await prisma.agent.create({ const agent = await prisma.agent.create({
data: { data: {
id: botUser.id, id: botUser.id,
teamId: project.teamId,
type: 'chat', type: 'chat',
config: { config: {
provider: 'google', provider: 'google',
+1
View File
@@ -152,6 +152,7 @@ describe('ProjectService', () => {
type: 'agent', type: 'agent',
agent: { agent: {
create: { create: {
teamId: team.id,
type: 'chat', type: 'chat',
enabled: true, enabled: true,
config: { config: {
+6 -4
View File
@@ -120,6 +120,11 @@ describe('TeamService', () => {
const user = await prisma.user.create({ const user = await prisma.user.create({
data: { name: 'Human', email: `human-${Date.now()}@example.com`, password: 'pw' }, data: { name: 'Human', email: `human-${Date.now()}@example.com`, password: 'pw' },
}) })
const team = await teamService.createTeam(user, {
name: 'Test Team',
})
const bot = await prisma.user.create({ const bot = await prisma.user.create({
data: { data: {
name: 'Bot', name: 'Bot',
@@ -128,6 +133,7 @@ describe('TeamService', () => {
type: 'agent', type: 'agent',
agent: { agent: {
create: { create: {
teamId: team.id,
type: 'chat', type: 'chat',
enabled: true, enabled: true,
config: { config: {
@@ -139,10 +145,6 @@ describe('TeamService', () => {
}, },
}) })
const team = await teamService.createTeam(user, {
name: 'Test Team',
})
await teamService.joinTeam({ await teamService.joinTeam({
teamId: team.id, teamId: team.id,
userId: bot.id, userId: bot.id,
+9
View File
@@ -50,6 +50,14 @@ export async function createCommentActivity(params: CreateCommentParams) {
if (params.sessionId) { if (params.sessionId) {
const agentId = params.agentId && params.agentId !== 'default' ? params.agentId : 'default' const agentId = params.agentId && params.agentId !== 'default' ? params.agentId : 'default'
// Fetch teamId from asset
const asset = await prisma.asset.findUnique({
where: { id: params.assetId },
include: { project: true },
})
if (!asset || !asset.project) throw new Error('asset or project not found')
const teamId = asset.project.teamId
// Ensure user exists for agent // Ensure user exists for agent
const userExists = await prisma.user.findUnique({ where: { id: agentId } }) const userExists = await prisma.user.findUnique({ where: { id: agentId } })
if (!userExists) { if (!userExists) {
@@ -69,6 +77,7 @@ export async function createCommentActivity(params: CreateCommentParams) {
await prisma.agent.create({ await prisma.agent.create({
data: { data: {
id: agentId, id: agentId,
teamId,
type: 'chat', type: 'chat',
config: { config: {
provider: 'openai', provider: 'openai',
+15 -1
View File
@@ -47,12 +47,19 @@ describe('WorkflowService', () => {
contentType: 'audio/mpeg', contentType: 'audio/mpeg',
}) })
const team = await prisma.team.create({
data: { name: 'Transcription Team' },
})
const project = await prisma.project.create({
data: { name: 'Transcription Project', teamId: team.id },
})
const asset = await prisma.asset.create({ const asset = await prisma.asset.create({
data: { data: {
name: 'test.mp3', name: 'test.mp3',
key: 'test/test.mp3', key: 'test/test.mp3',
status: 'uploaded', status: 'uploaded',
type: 'file', type: 'file',
projectId: project.id,
}, },
}) })
@@ -84,6 +91,12 @@ describe('WorkflowService', () => {
}, 15000) }, 15000)
it('should process ai_embedding task locally', async () => { it('should process ai_embedding task locally', async () => {
const team = await prisma.team.create({
data: { name: 'Embedding Team' },
})
const project = await prisma.project.create({
data: { name: 'Embedding Project', teamId: team.id },
})
const asset = await prisma.asset.create({ const asset = await prisma.asset.create({
data: { data: {
name: 'test.png', name: 'test.png',
@@ -91,6 +104,7 @@ describe('WorkflowService', () => {
status: 'uploaded', status: 'uploaded',
type: 'file', type: 'file',
mediaType: 'image/png', mediaType: 'image/png',
projectId: project.id,
}, },
}) })
@@ -99,7 +113,7 @@ describe('WorkflowService', () => {
assetId: asset.id, assetId: asset.id,
type: WorkflowTaskType.ai_embedding, type: WorkflowTaskType.ai_embedding,
status: WorkflowTaskStatus.pending, status: WorkflowTaskStatus.pending,
teamId: 'test-team', // Needs a teamId for embeddings teamId: team.id,
}, },
}) })