feat(ms22-p2): add AgentTemplate and UserAgent prisma schema
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
This commit is contained in:
@@ -1703,3 +1703,39 @@ model UserAgentConfig {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model AgentTemplate {
|
||||
id String @id @default(cuid())
|
||||
name String @unique // "jarvis", "builder", "medic"
|
||||
displayName String // "Jarvis", "Builder", "Medic"
|
||||
role String // "orchestrator" | "coding" | "monitoring"
|
||||
personality String // SOUL.md content (markdown)
|
||||
primaryModel String // "opus", "codex", "haiku"
|
||||
fallbackModels Json @default("[]") // ["sonnet", "haiku"]
|
||||
toolPermissions Json @default("[]") // ["exec", "read", "write", ...]
|
||||
discordChannel String? // "jarvis", "builder", "medic-alerts"
|
||||
isActive Boolean @default(true)
|
||||
isDefault Boolean @default(false) // Include in new user provisioning
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model UserAgent {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
templateId String? // null = custom agent
|
||||
name String // "jarvis", "builder", "medic" or custom
|
||||
displayName String
|
||||
role String
|
||||
personality String // User can customize
|
||||
primaryModel String?
|
||||
fallbackModels Json @default("[]")
|
||||
toolPermissions Json @default("[]")
|
||||
discordChannel String?
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([userId, name])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user