@damn-dev/cli 0.9.20 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,18 +69,20 @@ model Verification {
69
69
  }
70
70
 
71
71
  model Workspace {
72
- id String @id @default(cuid())
73
- name String
74
- ownerId String
75
- owner User @relation(fields: [ownerId], references: [id])
76
- createdAt DateTime @default(now())
77
- agents Agent[]
78
- channels Channel[]
79
- skills Skill[]
80
- tasks Task[]
81
- missions Mission[]
82
- members WorkspaceMember[]
83
- invitations WorkspaceInvitation[]
72
+ id String @id @default(cuid())
73
+ name String
74
+ ownerId String
75
+ owner User @relation(fields: [ownerId], references: [id])
76
+ createdAt DateTime @default(now())
77
+ // JSON: { policy: 'all'|'allowlist'|'denylist', allowedDomains: string[], deniedDomains: string[] }
78
+ browserPolicy String?
79
+ agents Agent[]
80
+ channels Channel[]
81
+ skills Skill[]
82
+ tasks Task[]
83
+ missions Mission[]
84
+ members WorkspaceMember[]
85
+ invitations WorkspaceInvitation[]
84
86
  }
85
87
 
86
88
  model Agent {
@@ -439,12 +441,26 @@ model FileEditApproval {
439
441
  createdAt DateTime @default(now())
440
442
  }
441
443
 
444
+ // Historically named DelegationRule; now stores approval rules for every
445
+ // auto-approvable approval type (shell / delegate / skill_tool / git_pr).
446
+ // `agentId = null` means workspace-scoped (applies to every agent in
447
+ // the workspace that owns the rule). `workspaceId` is set on every new row
448
+ // and denormalized on agent-scoped rows too — enforces workspace isolation
449
+ // at the query layer. Table name preserved to avoid a SQLite
450
+ // drop-and-recreate under `prisma db push`.
442
451
  model DelegationRule {
443
452
  id String @id @default(cuid())
444
- agentId String
453
+ agentId String?
454
+ workspaceId String?
445
455
  pattern String
456
+ type String?
457
+ reason String?
458
+ createdBy String?
446
459
  autoApprove Boolean @default(true)
447
460
  createdAt DateTime @default(now())
461
+
462
+ @@index([agentId, type])
463
+ @@index([workspaceId, agentId, type])
448
464
  }
449
465
 
450
466
  model PushToken {