@derwinjs/db 0.7.0 → 0.8.0

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.
Files changed (41) hide show
  1. package/dist/budget-gate.d.ts +43 -0
  2. package/dist/budget-gate.d.ts.map +1 -0
  3. package/dist/budget-gate.js +110 -0
  4. package/dist/budget-gate.js.map +1 -0
  5. package/dist/classification-override-store.d.ts +24 -0
  6. package/dist/classification-override-store.d.ts.map +1 -0
  7. package/dist/classification-override-store.js +131 -0
  8. package/dist/classification-override-store.js.map +1 -0
  9. package/dist/freeze-window-evaluator.d.ts +62 -0
  10. package/dist/freeze-window-evaluator.d.ts.map +1 -0
  11. package/dist/freeze-window-evaluator.js +236 -0
  12. package/dist/freeze-window-evaluator.js.map +1 -0
  13. package/dist/index.d.ts +6 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +6 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/kill-switch-evaluator.d.ts +68 -0
  18. package/dist/kill-switch-evaluator.d.ts.map +1 -0
  19. package/dist/kill-switch-evaluator.js +389 -0
  20. package/dist/kill-switch-evaluator.js.map +1 -0
  21. package/dist/path-tier-resolver.d.ts +47 -0
  22. package/dist/path-tier-resolver.d.ts.map +1 -0
  23. package/dist/path-tier-resolver.js +177 -0
  24. package/dist/path-tier-resolver.js.map +1 -0
  25. package/dist/trust-threshold-config-store.d.ts +20 -0
  26. package/dist/trust-threshold-config-store.d.ts.map +1 -0
  27. package/dist/trust-threshold-config-store.js +88 -0
  28. package/dist/trust-threshold-config-store.js.map +1 -0
  29. package/package.json +3 -3
  30. package/prisma/migrations/20260507120000_sprint8_policy_governance/migration.sql +58 -0
  31. package/prisma/migrations/20260507120100_sprint8_phase2_thresholds_and_freeze/migration.sql +33 -0
  32. package/prisma/migrations/20260507120200_sprint8_phase3_budget_cap/migration.sql +21 -0
  33. package/prisma/migrations/20260507120300_sprint8_phase4_kill_switches/migration.sql +74 -0
  34. package/prisma/schema.prisma +183 -11
  35. package/prisma-client/edge.js +96 -19
  36. package/prisma-client/index-browser.js +93 -16
  37. package/prisma-client/index.d.ts +10997 -3426
  38. package/prisma-client/index.js +96 -19
  39. package/prisma-client/package.json +1 -1
  40. package/prisma-client/schema.prisma +183 -11
  41. package/prisma-client/wasm.js +93 -16
@@ -135,9 +135,14 @@ exports.Prisma.ProjectScalarFieldEnum = {
135
135
  monthlyBudgetCents: 'monthlyBudgetCents',
136
136
  dailyDispatchLimit: 'dailyDispatchLimit',
137
137
  testCommand: 'testCommand',
138
+ monthlyBudgetUsd: 'monthlyBudgetUsd',
139
+ budgetSoftWarnPct: 'budgetSoftWarnPct',
138
140
  repoFullName: 'repoFullName',
139
141
  webhookSecret: 'webhookSecret',
140
- authorModel: 'authorModel'
142
+ authorModel: 'authorModel',
143
+ defaultTier: 'defaultTier',
144
+ trustThresholds: 'trustThresholds',
145
+ killSwitchConfig: 'killSwitchConfig'
141
146
  };
142
147
 
143
148
  exports.Prisma.ProjectProfileScalarFieldEnum = {
@@ -323,6 +328,56 @@ exports.Prisma.PolicyScalarFieldEnum = {
323
328
  updatedBy: 'updatedBy'
324
329
  };
325
330
 
331
+ exports.Prisma.PathTierRuleScalarFieldEnum = {
332
+ id: 'id',
333
+ projectId: 'projectId',
334
+ pattern: 'pattern',
335
+ tier: 'tier',
336
+ priority: 'priority',
337
+ reason: 'reason',
338
+ createdAt: 'createdAt',
339
+ updatedAt: 'updatedAt'
340
+ };
341
+
342
+ exports.Prisma.ClassificationOverrideScalarFieldEnum = {
343
+ id: 'id',
344
+ projectId: 'projectId',
345
+ classification: 'classification',
346
+ surface: 'surface',
347
+ overrideMode: 'overrideMode',
348
+ downgradeTier: 'downgradeTier',
349
+ reason: 'reason',
350
+ createdBy: 'createdBy',
351
+ createdAt: 'createdAt'
352
+ };
353
+
354
+ exports.Prisma.FreezeWindowScalarFieldEnum = {
355
+ id: 'id',
356
+ projectId: 'projectId',
357
+ cronExpression: 'cronExpression',
358
+ durationMinutes: 'durationMinutes',
359
+ label: 'label',
360
+ blocksDispatch: 'blocksDispatch',
361
+ enabled: 'enabled',
362
+ createdAt: 'createdAt'
363
+ };
364
+
365
+ exports.Prisma.KillSwitchStateScalarFieldEnum = {
366
+ id: 'id',
367
+ projectId: 'projectId',
368
+ classification: 'classification',
369
+ surface: 'surface',
370
+ type: 'type',
371
+ scope: 'scope',
372
+ engaged: 'engaged',
373
+ engagedAt: 'engagedAt',
374
+ unblockedAt: 'unblockedAt',
375
+ unblockedBy: 'unblockedBy',
376
+ reason: 'reason',
377
+ triggerMetrics: 'triggerMetrics',
378
+ createdAt: 'createdAt'
379
+ };
380
+
326
381
  exports.Prisma.ProjectModeLogScalarFieldEnum = {
327
382
  id: 'id',
328
383
  projectId: 'projectId',
@@ -400,12 +455,12 @@ exports.Prisma.SortOrder = {
400
455
  desc: 'desc'
401
456
  };
402
457
 
403
- exports.Prisma.JsonNullValueInput = {
458
+ exports.Prisma.NullableJsonNullValueInput = {
459
+ DbNull: Prisma.DbNull,
404
460
  JsonNull: Prisma.JsonNull
405
461
  };
406
462
 
407
- exports.Prisma.NullableJsonNullValueInput = {
408
- DbNull: Prisma.DbNull,
463
+ exports.Prisma.JsonNullValueInput = {
409
464
  JsonNull: Prisma.JsonNull
410
465
  };
411
466
 
@@ -414,16 +469,16 @@ exports.Prisma.QueryMode = {
414
469
  insensitive: 'insensitive'
415
470
  };
416
471
 
417
- exports.Prisma.NullsOrder = {
418
- first: 'first',
419
- last: 'last'
420
- };
421
-
422
472
  exports.Prisma.JsonNullValueFilter = {
423
473
  DbNull: Prisma.DbNull,
424
474
  JsonNull: Prisma.JsonNull,
425
475
  AnyNull: Prisma.AnyNull
426
476
  };
477
+
478
+ exports.Prisma.NullsOrder = {
479
+ first: 'first',
480
+ last: 'last'
481
+ };
427
482
  exports.ProjectType = exports.$Enums.ProjectType = {
428
483
  SAAS: 'SAAS',
429
484
  ECOMMERCE: 'ECOMMERCE',
@@ -441,6 +496,13 @@ exports.ProjectMode = exports.$Enums.ProjectMode = {
441
496
  AUTO: 'AUTO'
442
497
  };
443
498
 
499
+ exports.RiskTier = exports.$Enums.RiskTier = {
500
+ LOW: 'LOW',
501
+ MEDIUM: 'MEDIUM',
502
+ HIGH: 'HIGH',
503
+ NEVER: 'NEVER'
504
+ };
505
+
444
506
  exports.RunTrigger = exports.$Enums.RunTrigger = {
445
507
  CRON: 'CRON',
446
508
  OPERATOR_ON_DEMAND: 'OPERATOR_ON_DEMAND',
@@ -474,13 +536,6 @@ exports.Severity = exports.$Enums.Severity = {
474
536
  LOW: 'LOW'
475
537
  };
476
538
 
477
- exports.RiskTier = exports.$Enums.RiskTier = {
478
- LOW: 'LOW',
479
- MEDIUM: 'MEDIUM',
480
- HIGH: 'HIGH',
481
- NEVER: 'NEVER'
482
- };
483
-
484
539
  exports.TicketStatus = exports.$Enums.TicketStatus = {
485
540
  OPEN: 'OPEN',
486
541
  INVESTIGATING: 'INVESTIGATING',
@@ -543,6 +598,24 @@ exports.PolicyType = exports.$Enums.PolicyType = {
543
598
  ESCALATION: 'ESCALATION'
544
599
  };
545
600
 
601
+ exports.OverrideMode = exports.$Enums.OverrideMode = {
602
+ BLOCK_AUTO_FIX: 'BLOCK_AUTO_FIX',
603
+ FORCE_ESCALATION: 'FORCE_ESCALATION',
604
+ DOWNGRADE_TIER: 'DOWNGRADE_TIER'
605
+ };
606
+
607
+ exports.KillSwitchType = exports.$Enums.KillSwitchType = {
608
+ SUCCESS_RATE_DROP: 'SUCCESS_RATE_DROP',
609
+ CONSECUTIVE_FAILURE: 'CONSECUTIVE_FAILURE',
610
+ REGRESSION_CASCADE: 'REGRESSION_CASCADE'
611
+ };
612
+
613
+ exports.KillSwitchScope = exports.$Enums.KillSwitchScope = {
614
+ CLASSIFICATION: 'CLASSIFICATION',
615
+ PROJECT: 'PROJECT',
616
+ PLATFORM: 'PLATFORM'
617
+ };
618
+
546
619
  exports.QAFailureClass = exports.$Enums.QAFailureClass = {
547
620
  SELECTOR: 'SELECTOR',
548
621
  TIMING: 'TIMING',
@@ -577,6 +650,10 @@ exports.Prisma.ModelName = {
577
650
  RAGCorpus: 'RAGCorpus',
578
651
  AuditArtifact: 'AuditArtifact',
579
652
  Policy: 'Policy',
653
+ PathTierRule: 'PathTierRule',
654
+ ClassificationOverride: 'ClassificationOverride',
655
+ FreezeWindow: 'FreezeWindow',
656
+ KillSwitchState: 'KillSwitchState',
580
657
  ProjectModeLog: 'ProjectModeLog',
581
658
  SpendLedger: 'SpendLedger',
582
659
  QAPattern: 'QAPattern',