@nice2dev/ui-tools 1.0.10

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 (158) hide show
  1. package/README.md +36 -0
  2. package/dist/access-control.d.ts +726 -0
  3. package/dist/access-control.d.ts.map +1 -0
  4. package/dist/accessibility-i18n.d.ts +1017 -0
  5. package/dist/accessibility-i18n.d.ts.map +1 -0
  6. package/dist/ai-assistant.d.ts +263 -0
  7. package/dist/ai-assistant.d.ts.map +1 -0
  8. package/dist/ai-playgrounds.d.ts +842 -0
  9. package/dist/ai-playgrounds.d.ts.map +1 -0
  10. package/dist/alerting-incidents.d.ts +558 -0
  11. package/dist/alerting-incidents.d.ts.map +1 -0
  12. package/dist/api-designer.d.ts +1568 -0
  13. package/dist/api-designer.d.ts.map +1 -0
  14. package/dist/api-testing.d.ts +1146 -0
  15. package/dist/api-testing.d.ts.map +1 -0
  16. package/dist/apm-profiling.d.ts +656 -0
  17. package/dist/apm-profiling.d.ts.map +1 -0
  18. package/dist/artifacts.d.ts +421 -0
  19. package/dist/artifacts.d.ts.map +1 -0
  20. package/dist/audit-compliance.d.ts +752 -0
  21. package/dist/audit-compliance.d.ts.map +1 -0
  22. package/dist/certificates.d.ts +256 -0
  23. package/dist/certificates.d.ts.map +1 -0
  24. package/dist/chart-builder.d.ts +1404 -0
  25. package/dist/chart-builder.d.ts.map +1 -0
  26. package/dist/cloud-instances.d.ts +169 -0
  27. package/dist/cloud-instances.d.ts.map +1 -0
  28. package/dist/config-management.d.ts +350 -0
  29. package/dist/config-management.d.ts.map +1 -0
  30. package/dist/containers.d.ts +256 -0
  31. package/dist/containers.d.ts.map +1 -0
  32. package/dist/dashboard-designer.d.ts +1238 -0
  33. package/dist/dashboard-designer.d.ts.map +1 -0
  34. package/dist/data-management.d.ts +496 -0
  35. package/dist/data-management.d.ts.map +1 -0
  36. package/dist/data-pipeline.d.ts +1105 -0
  37. package/dist/data-pipeline.d.ts.map +1 -0
  38. package/dist/data-warehouse.d.ts +1097 -0
  39. package/dist/data-warehouse.d.ts.map +1 -0
  40. package/dist/dataset-management.d.ts +782 -0
  41. package/dist/dataset-management.d.ts.map +1 -0
  42. package/dist/db-adapters.d.ts +704 -0
  43. package/dist/db-adapters.d.ts.map +1 -0
  44. package/dist/db-admin.d.ts +699 -0
  45. package/dist/db-admin.d.ts.map +1 -0
  46. package/dist/db-designer.d.ts +366 -0
  47. package/dist/db-designer.d.ts.map +1 -0
  48. package/dist/debugger.d.ts +356 -0
  49. package/dist/debugger.d.ts.map +1 -0
  50. package/dist/device-management.d.ts +871 -0
  51. package/dist/device-management.d.ts.map +1 -0
  52. package/dist/distributed-tracing.d.ts +427 -0
  53. package/dist/distributed-tracing.d.ts.map +1 -0
  54. package/dist/dns-management.d.ts +215 -0
  55. package/dist/dns-management.d.ts.map +1 -0
  56. package/dist/download-manager.d.ts +271 -0
  57. package/dist/download-manager.d.ts.map +1 -0
  58. package/dist/download-torrent.d.ts +1062 -0
  59. package/dist/download-torrent.d.ts.map +1 -0
  60. package/dist/edge-computing.d.ts +720 -0
  61. package/dist/edge-computing.d.ts.map +1 -0
  62. package/dist/education.d.ts +1135 -0
  63. package/dist/education.d.ts.map +1 -0
  64. package/dist/email-template.d.ts +1141 -0
  65. package/dist/email-template.d.ts.map +1 -0
  66. package/dist/erp-enterprise.d.ts +1270 -0
  67. package/dist/erp-enterprise.d.ts.map +1 -0
  68. package/dist/form-builder.d.ts +1117 -0
  69. package/dist/form-builder.d.ts.map +1 -0
  70. package/dist/game-engine-advanced.d.ts +1049 -0
  71. package/dist/game-engine-advanced.d.ts.map +1 -0
  72. package/dist/git.d.ts +415 -0
  73. package/dist/git.d.ts.map +1 -0
  74. package/dist/hardware-integration.d.ts +966 -0
  75. package/dist/hardware-integration.d.ts.map +1 -0
  76. package/dist/iac.d.ts +318 -0
  77. package/dist/iac.d.ts.map +1 -0
  78. package/dist/icon-tools.d.ts +1023 -0
  79. package/dist/icon-tools.d.ts.map +1 -0
  80. package/dist/ide.d.ts +322 -0
  81. package/dist/ide.d.ts.map +1 -0
  82. package/dist/index.cjs +2 -0
  83. package/dist/index.cjs.map +1 -0
  84. package/dist/index.d.ts +176 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.mjs +1887 -0
  87. package/dist/index.mjs.map +1 -0
  88. package/dist/integration-platform.d.ts +857 -0
  89. package/dist/integration-platform.d.ts.map +1 -0
  90. package/dist/kubernetes.d.ts +278 -0
  91. package/dist/kubernetes.d.ts.map +1 -0
  92. package/dist/life-management.d.ts +1132 -0
  93. package/dist/life-management.d.ts.map +1 -0
  94. package/dist/log-management.d.ts +473 -0
  95. package/dist/log-management.d.ts.map +1 -0
  96. package/dist/mathematics.d.ts +870 -0
  97. package/dist/mathematics.d.ts.map +1 -0
  98. package/dist/message-queue.d.ts +1006 -0
  99. package/dist/message-queue.d.ts.map +1 -0
  100. package/dist/metrics-dashboard.d.ts +596 -0
  101. package/dist/metrics-dashboard.d.ts.map +1 -0
  102. package/dist/mobile-components.d.ts +766 -0
  103. package/dist/mobile-components.d.ts.map +1 -0
  104. package/dist/model-deployment.d.ts +787 -0
  105. package/dist/model-deployment.d.ts.map +1 -0
  106. package/dist/model-registry.d.ts +740 -0
  107. package/dist/model-registry.d.ts.map +1 -0
  108. package/dist/model-training.d.ts +706 -0
  109. package/dist/model-training.d.ts.map +1 -0
  110. package/dist/network-config.d.ts +334 -0
  111. package/dist/network-config.d.ts.map +1 -0
  112. package/dist/network-monitoring.d.ts +291 -0
  113. package/dist/network-monitoring.d.ts.map +1 -0
  114. package/dist/pdf-tools.d.ts +1003 -0
  115. package/dist/pdf-tools.d.ts.map +1 -0
  116. package/dist/pipelines.d.ts +250 -0
  117. package/dist/pipelines.d.ts.map +1 -0
  118. package/dist/remote-desktop.d.ts +207 -0
  119. package/dist/remote-desktop.d.ts.map +1 -0
  120. package/dist/report-designer.d.ts +1153 -0
  121. package/dist/report-designer.d.ts.map +1 -0
  122. package/dist/scada-industrial.d.ts +848 -0
  123. package/dist/scada-industrial.d.ts.map +1 -0
  124. package/dist/scientific-research.d.ts +1149 -0
  125. package/dist/scientific-research.d.ts.map +1 -0
  126. package/dist/secret-management.d.ts +617 -0
  127. package/dist/secret-management.d.ts.map +1 -0
  128. package/dist/security-scanning.d.ts +714 -0
  129. package/dist/security-scanning.d.ts.map +1 -0
  130. package/dist/self-service-analytics.d.ts +1208 -0
  131. package/dist/self-service-analytics.d.ts.map +1 -0
  132. package/dist/sensor-dashboard.d.ts +845 -0
  133. package/dist/sensor-dashboard.d.ts.map +1 -0
  134. package/dist/server-management.d.ts +331 -0
  135. package/dist/server-management.d.ts.map +1 -0
  136. package/dist/smart-home.d.ts +861 -0
  137. package/dist/smart-home.d.ts.map +1 -0
  138. package/dist/spreadsheet.d.ts +1043 -0
  139. package/dist/spreadsheet.d.ts.map +1 -0
  140. package/dist/sql-editor.d.ts +402 -0
  141. package/dist/sql-editor.d.ts.map +1 -0
  142. package/dist/terminal.d.ts +245 -0
  143. package/dist/terminal.d.ts.map +1 -0
  144. package/dist/testing-qa.d.ts +1013 -0
  145. package/dist/testing-qa.d.ts.map +1 -0
  146. package/dist/torrent-client.d.ts +298 -0
  147. package/dist/torrent-client.d.ts.map +1 -0
  148. package/dist/traceless.d.ts +759 -0
  149. package/dist/traceless.d.ts.map +1 -0
  150. package/dist/virtual-machines.d.ts +199 -0
  151. package/dist/virtual-machines.d.ts.map +1 -0
  152. package/dist/visual-scripting.d.ts +381 -0
  153. package/dist/visual-scripting.d.ts.map +1 -0
  154. package/dist/word-processor.d.ts +1124 -0
  155. package/dist/word-processor.d.ts.map +1 -0
  156. package/dist/workspace.d.ts +333 -0
  157. package/dist/workspace.d.ts.map +1 -0
  158. package/package.json +62 -0
@@ -0,0 +1,740 @@
1
+ /**
2
+ * @file model-registry.ts
3
+ * @module @nice2dev/ui-tools
4
+ * @description PRO-18.3 — Model Registry
5
+ *
6
+ * Types for ML model registry: versioning, artifacts, lineage,
7
+ * approval workflows, A/B testing, model cards, fairness/explainability.
8
+ */
9
+ /** Model stage */
10
+ export type ModelStage = 'none' | 'staging' | 'production' | 'archived';
11
+ /** Model status */
12
+ export type ModelRegistryStatus = 'draft' | 'pending_review' | 'approved' | 'rejected' | 'deprecated';
13
+ /** Model format */
14
+ export type ModelFormat = 'pytorch' | 'tensorflow_savedmodel' | 'keras' | 'onnx' | 'torchscript' | 'sklearn' | 'xgboost' | 'lightgbm' | 'catboost' | 'huggingface' | 'coreml' | 'tflite' | 'custom';
15
+ /** Model registry config */
16
+ export interface ModelRegistryConfig {
17
+ /** Theme */
18
+ theme?: RegistryTheme;
19
+ /** Features */
20
+ features?: RegistryFeatures;
21
+ /** Storage */
22
+ storage?: RegistryStorage;
23
+ /** Approval workflow */
24
+ approval?: ApprovalConfig;
25
+ /** Governance */
26
+ governance?: GovernanceConfig;
27
+ }
28
+ /** Registry theme */
29
+ export interface RegistryTheme {
30
+ name?: string;
31
+ colors?: RegistryColors;
32
+ }
33
+ /** Registry colors */
34
+ export interface RegistryColors {
35
+ primary?: string;
36
+ staging?: string;
37
+ production?: string;
38
+ archived?: string;
39
+ }
40
+ /** Registry features */
41
+ export interface RegistryFeatures {
42
+ versioning?: boolean;
43
+ lineage?: boolean;
44
+ approval?: boolean;
45
+ abTesting?: boolean;
46
+ modelCards?: boolean;
47
+ fairness?: boolean;
48
+ explainability?: boolean;
49
+ monitoring?: boolean;
50
+ }
51
+ /** Registry storage */
52
+ export interface RegistryStorage {
53
+ type: 's3' | 'gcs' | 'azure' | 'mlflow' | 'custom';
54
+ bucket?: string;
55
+ prefix?: string;
56
+ credentials?: StorageCredentials;
57
+ }
58
+ /** Storage credentials */
59
+ export interface StorageCredentials {
60
+ accessKeyId?: string;
61
+ secretAccessKey?: string;
62
+ region?: string;
63
+ [key: string]: unknown;
64
+ }
65
+ /** Approval config */
66
+ export interface ApprovalConfig {
67
+ enabled?: boolean;
68
+ requireReview?: boolean;
69
+ minReviewers?: number;
70
+ autoApprove?: AutoApproveRule[];
71
+ stages?: StageApproval[];
72
+ }
73
+ /** Auto approve rule */
74
+ export interface AutoApproveRule {
75
+ condition: 'metric_threshold' | 'test_pass' | 'no_regression';
76
+ config: Record<string, unknown>;
77
+ }
78
+ /** Stage approval */
79
+ export interface StageApproval {
80
+ stage: ModelStage;
81
+ approvers?: string[];
82
+ checks?: ApprovalCheck[];
83
+ }
84
+ /** Approval check */
85
+ export interface ApprovalCheck {
86
+ type: 'metric' | 'test' | 'security' | 'fairness' | 'custom';
87
+ name: string;
88
+ config?: Record<string, unknown>;
89
+ }
90
+ /** Governance config */
91
+ export interface GovernanceConfig {
92
+ requireModelCard?: boolean;
93
+ requireFairnessReport?: boolean;
94
+ retentionPolicy?: RetentionPolicy;
95
+ accessControl?: AccessControlConfig;
96
+ }
97
+ /** Retention policy */
98
+ export interface RetentionPolicy {
99
+ maxVersions?: number;
100
+ maxAge?: number;
101
+ keepStages?: ModelStage[];
102
+ }
103
+ /** Access control config */
104
+ export interface AccessControlConfig {
105
+ publicModels?: boolean;
106
+ defaultPermissions?: ModelPermissions;
107
+ }
108
+ /** Model permissions */
109
+ export interface ModelPermissions {
110
+ read?: string[];
111
+ write?: string[];
112
+ deploy?: string[];
113
+ admin?: string[];
114
+ }
115
+ /** Registered model */
116
+ export interface RegisteredModel {
117
+ id: string;
118
+ name: string;
119
+ description?: string;
120
+ latestVersion?: ModelVersion;
121
+ versions: ModelVersion[];
122
+ tags?: string[];
123
+ labels?: Record<string, string>;
124
+ owners?: string[];
125
+ permissions?: ModelPermissions;
126
+ metadata?: RegisteredModelMetadata;
127
+ createdAt: Date;
128
+ updatedAt?: Date;
129
+ }
130
+ /** Model version */
131
+ export interface ModelVersion {
132
+ version: string;
133
+ modelId: string;
134
+ stage: ModelStage;
135
+ status: ModelRegistryStatus;
136
+ source: ModelSource;
137
+ artifacts: ModelArtifact[];
138
+ signature?: ModelSignature;
139
+ metrics?: ModelMetrics;
140
+ lineage?: ModelLineage;
141
+ modelCard?: ModelCard;
142
+ approvals?: ModelApproval[];
143
+ tags?: string[];
144
+ labels?: Record<string, string>;
145
+ description?: string;
146
+ createdAt: Date;
147
+ createdBy?: string;
148
+ promotedAt?: Date;
149
+ promotedBy?: string;
150
+ }
151
+ /** Model source */
152
+ export interface ModelSource {
153
+ type: 'run' | 'upload' | 'import' | 'conversion';
154
+ runId?: string;
155
+ experimentId?: string;
156
+ uri?: string;
157
+ framework?: string;
158
+ frameworkVersion?: string;
159
+ }
160
+ /** Model artifact */
161
+ export interface ModelArtifact {
162
+ id: string;
163
+ name: string;
164
+ type: ModelArtifactType;
165
+ format: ModelFormat;
166
+ path: string;
167
+ size: number;
168
+ checksum?: string;
169
+ metadata?: Record<string, unknown>;
170
+ }
171
+ /** Model artifact type */
172
+ export type ModelArtifactType = 'model' | 'weights' | 'config' | 'tokenizer' | 'preprocessor' | 'postprocessor' | 'custom';
173
+ /** Model signature */
174
+ export interface ModelSignature {
175
+ inputs: SignatureSchema[];
176
+ outputs: SignatureSchema[];
177
+ params?: SignatureParam[];
178
+ }
179
+ /** Signature schema */
180
+ export interface SignatureSchema {
181
+ name: string;
182
+ dtype: string;
183
+ shape: (number | string)[];
184
+ description?: string;
185
+ }
186
+ /** Signature param */
187
+ export interface SignatureParam {
188
+ name: string;
189
+ dtype: string;
190
+ default?: unknown;
191
+ description?: string;
192
+ }
193
+ /** Model metrics */
194
+ export interface ModelMetrics {
195
+ training?: Record<string, number>;
196
+ validation?: Record<string, number>;
197
+ test?: Record<string, number>;
198
+ custom?: Record<string, number>;
199
+ }
200
+ /** Model approval */
201
+ export interface ModelApproval {
202
+ id: string;
203
+ stage: ModelStage;
204
+ status: 'pending' | 'approved' | 'rejected';
205
+ reviewer?: string;
206
+ reviewedAt?: Date;
207
+ comments?: string;
208
+ checks?: ApprovalCheckResult[];
209
+ }
210
+ /** Approval check result */
211
+ export interface ApprovalCheckResult {
212
+ check: ApprovalCheck;
213
+ passed: boolean;
214
+ details?: string;
215
+ }
216
+ /** Registered model metadata */
217
+ export interface RegisteredModelMetadata {
218
+ task?: string;
219
+ domain?: string;
220
+ framework?: string;
221
+ language?: string[];
222
+ license?: string;
223
+ paperUrl?: string;
224
+ codeUrl?: string;
225
+ datasetUrl?: string;
226
+ custom?: Record<string, unknown>;
227
+ }
228
+ /** Model lineage */
229
+ export interface ModelLineage {
230
+ modelId: string;
231
+ version: string;
232
+ training: TrainingLineage;
233
+ data: DataLineage;
234
+ code: CodeLineage;
235
+ environment: EnvironmentLineage;
236
+ parent?: ParentLineage;
237
+ }
238
+ /** Training lineage */
239
+ export interface TrainingLineage {
240
+ runId: string;
241
+ experimentId?: string;
242
+ experimentName?: string;
243
+ hyperparameters?: Record<string, unknown>;
244
+ metrics?: Record<string, number>;
245
+ startTime?: Date;
246
+ endTime?: Date;
247
+ }
248
+ /** Data lineage */
249
+ export interface DataLineage {
250
+ datasets: DatasetReference[];
251
+ preprocessing?: PreprocessingLineage[];
252
+ features?: FeatureLineage[];
253
+ }
254
+ /** Dataset reference */
255
+ export interface DatasetReference {
256
+ id: string;
257
+ name: string;
258
+ version?: string;
259
+ split?: string;
260
+ samples?: number;
261
+ path?: string;
262
+ }
263
+ /** Preprocessing lineage */
264
+ export interface PreprocessingLineage {
265
+ step: string;
266
+ params?: Record<string, unknown>;
267
+ }
268
+ /** Feature lineage */
269
+ export interface FeatureLineage {
270
+ name: string;
271
+ source?: string;
272
+ transformation?: string;
273
+ }
274
+ /** Code lineage */
275
+ export interface CodeLineage {
276
+ repository?: string;
277
+ branch?: string;
278
+ commit?: string;
279
+ path?: string;
280
+ entryPoint?: string;
281
+ }
282
+ /** Environment lineage */
283
+ export interface EnvironmentLineage {
284
+ python?: string;
285
+ framework?: string;
286
+ frameworkVersion?: string;
287
+ cuda?: string;
288
+ packages?: PackageInfo[];
289
+ docker?: string;
290
+ hardware?: HardwareInfo;
291
+ }
292
+ /** Package info */
293
+ export interface PackageInfo {
294
+ name: string;
295
+ version: string;
296
+ }
297
+ /** Hardware info */
298
+ export interface HardwareInfo {
299
+ cpu?: string;
300
+ memory?: number;
301
+ gpu?: string;
302
+ gpuCount?: number;
303
+ }
304
+ /** Parent lineage */
305
+ export interface ParentLineage {
306
+ modelId: string;
307
+ version: string;
308
+ relationship: 'fine_tuned' | 'distilled' | 'pruned' | 'quantized' | 'merged';
309
+ }
310
+ /** Model card */
311
+ export interface ModelCard {
312
+ modelId: string;
313
+ version: string;
314
+ overview: ModelOverview;
315
+ intendedUse: IntendedUse;
316
+ factors: ModelFactors;
317
+ metrics: ModelCardMetrics;
318
+ trainingData: TrainingDataInfo;
319
+ evaluationData?: EvaluationDataInfo;
320
+ ethicalConsiderations?: EthicalConsiderations;
321
+ caveatsRecommendations?: CaveatsRecommendations;
322
+ quantitativeAnalysis?: QuantitativeAnalysis;
323
+ createdAt: Date;
324
+ updatedAt?: Date;
325
+ }
326
+ /** Model overview */
327
+ export interface ModelOverview {
328
+ name: string;
329
+ description: string;
330
+ version: string;
331
+ developers?: string[];
332
+ releaseDate?: Date;
333
+ modelType?: string;
334
+ architecture?: string;
335
+ framework?: string;
336
+ license?: string;
337
+ citation?: string;
338
+ }
339
+ /** Intended use */
340
+ export interface IntendedUse {
341
+ primaryUses: string[];
342
+ primaryUsers?: string[];
343
+ outOfScopeUses?: string[];
344
+ }
345
+ /** Model factors */
346
+ export interface ModelFactors {
347
+ relevantFactors?: RelevantFactor[];
348
+ evaluationFactors?: EvaluationFactor[];
349
+ }
350
+ /** Relevant factor */
351
+ export interface RelevantFactor {
352
+ name: string;
353
+ description: string;
354
+ groups?: string[];
355
+ }
356
+ /** Evaluation factor */
357
+ export interface EvaluationFactor {
358
+ name: string;
359
+ description: string;
360
+ disaggregation?: string[];
361
+ }
362
+ /** Model card metrics */
363
+ export interface ModelCardMetrics {
364
+ performanceMetrics: PerformanceMetric[];
365
+ decisionThresholds?: DecisionThreshold[];
366
+ variationApproaches?: string[];
367
+ }
368
+ /** Performance metric */
369
+ export interface PerformanceMetric {
370
+ name: string;
371
+ value: number;
372
+ confidence?: number;
373
+ slice?: string;
374
+ description?: string;
375
+ }
376
+ /** Decision threshold */
377
+ export interface DecisionThreshold {
378
+ metric: string;
379
+ threshold: number;
380
+ rationale?: string;
381
+ }
382
+ /** Training data info */
383
+ export interface TrainingDataInfo {
384
+ datasets?: DatasetInfo[];
385
+ preprocessing?: string[];
386
+ dataAugmentation?: string[];
387
+ }
388
+ /** Dataset info */
389
+ export interface DatasetInfo {
390
+ name: string;
391
+ url?: string;
392
+ description?: string;
393
+ size?: number;
394
+ splits?: Record<string, number>;
395
+ demographics?: Record<string, number>;
396
+ }
397
+ /** Evaluation data info */
398
+ export interface EvaluationDataInfo {
399
+ datasets?: DatasetInfo[];
400
+ evaluationProcess?: string;
401
+ }
402
+ /** Ethical considerations */
403
+ export interface EthicalConsiderations {
404
+ concerns?: string[];
405
+ mitigations?: string[];
406
+ tradeoffs?: string[];
407
+ }
408
+ /** Caveats recommendations */
409
+ export interface CaveatsRecommendations {
410
+ caveats?: string[];
411
+ recommendations?: string[];
412
+ }
413
+ /** Quantitative analysis */
414
+ export interface QuantitativeAnalysis {
415
+ unitaryResults?: UnitaryResult[];
416
+ intersectionalResults?: IntersectionalResult[];
417
+ }
418
+ /** Unitary result */
419
+ export interface UnitaryResult {
420
+ factor: string;
421
+ group: string;
422
+ metrics: Record<string, number>;
423
+ }
424
+ /** Intersectional result */
425
+ export interface IntersectionalResult {
426
+ factors: string[];
427
+ groups: string[];
428
+ metrics: Record<string, number>;
429
+ }
430
+ /** Model experiment */
431
+ export interface ModelABExperiment {
432
+ id: string;
433
+ name: string;
434
+ description?: string;
435
+ status: ABExperimentStatus;
436
+ config: ABExperimentConfig;
437
+ variants: ABVariant[];
438
+ results?: ABExperimentResults;
439
+ createdAt: Date;
440
+ startedAt?: Date;
441
+ endedAt?: Date;
442
+ }
443
+ /** AB experiment status */
444
+ export type ABExperimentStatus = 'draft' | 'running' | 'paused' | 'completed' | 'stopped';
445
+ /** AB experiment config */
446
+ export interface ABExperimentConfig {
447
+ metric: ABMetric;
448
+ hypothesis?: string;
449
+ trafficAllocation: TrafficAllocation;
450
+ duration?: number;
451
+ minSampleSize?: number;
452
+ confidenceLevel?: number;
453
+ earlyStop?: EarlyStopConfig;
454
+ }
455
+ /** AB metric */
456
+ export interface ABMetric {
457
+ name: string;
458
+ type: 'conversion' | 'revenue' | 'latency' | 'custom';
459
+ goal: 'increase' | 'decrease';
460
+ }
461
+ /** Traffic allocation */
462
+ export interface TrafficAllocation {
463
+ type: 'fixed' | 'dynamic' | 'multi_armed_bandit';
464
+ weights?: Record<string, number>;
465
+ }
466
+ /** Early stop config */
467
+ export interface EarlyStopConfig {
468
+ enabled: boolean;
469
+ minRuntime?: number;
470
+ checkInterval?: number;
471
+ threshold?: number;
472
+ }
473
+ /** AB variant */
474
+ export interface ABVariant {
475
+ id: string;
476
+ name: string;
477
+ modelId: string;
478
+ modelVersion: string;
479
+ trafficPercent: number;
480
+ isControl?: boolean;
481
+ }
482
+ /** AB experiment results */
483
+ export interface ABExperimentResults {
484
+ summary: ABResultsSummary;
485
+ variants: ABVariantResult[];
486
+ timeline?: ABTimeline;
487
+ confidence?: ConfidenceAnalysis;
488
+ }
489
+ /** AB results summary */
490
+ export interface ABResultsSummary {
491
+ winner?: string;
492
+ significance: boolean;
493
+ pValue?: number;
494
+ uplift?: number;
495
+ sampleSize: number;
496
+ }
497
+ /** AB variant result */
498
+ export interface ABVariantResult {
499
+ variantId: string;
500
+ sampleSize: number;
501
+ conversions?: number;
502
+ conversionRate?: number;
503
+ mean?: number;
504
+ std?: number;
505
+ confidence?: ConfidenceInterval;
506
+ }
507
+ /** Confidence interval */
508
+ export interface ConfidenceInterval {
509
+ lower: number;
510
+ upper: number;
511
+ level: number;
512
+ }
513
+ /** AB timeline */
514
+ export interface ABTimeline {
515
+ timestamps: Date[];
516
+ metrics: Record<string, number[]>;
517
+ }
518
+ /** Confidence analysis */
519
+ export interface ConfidenceAnalysis {
520
+ method: 'frequentist' | 'bayesian';
521
+ pValue?: number;
522
+ posteriorProbability?: number;
523
+ credibleInterval?: ConfidenceInterval;
524
+ }
525
+ /** Shadow deployment */
526
+ export interface ShadowDeployment {
527
+ id: string;
528
+ name: string;
529
+ description?: string;
530
+ status: ShadowStatus;
531
+ config: ShadowConfig;
532
+ results?: ShadowResults;
533
+ createdAt: Date;
534
+ startedAt?: Date;
535
+ endedAt?: Date;
536
+ }
537
+ /** Shadow status */
538
+ export type ShadowStatus = 'pending' | 'running' | 'completed' | 'stopped';
539
+ /** Shadow config */
540
+ export interface ShadowConfig {
541
+ productionModel: ModelReference;
542
+ shadowModel: ModelReference;
543
+ trafficPercent: number;
544
+ comparisonMetrics: string[];
545
+ duration?: number;
546
+ logPredictions?: boolean;
547
+ }
548
+ /** Model reference */
549
+ export interface ModelReference {
550
+ modelId: string;
551
+ version: string;
552
+ }
553
+ /** Shadow results */
554
+ export interface ShadowResults {
555
+ requestCount: number;
556
+ comparisonSummary: ComparisonSummary[];
557
+ predictionDiffs?: PredictionDiff[];
558
+ latencyComparison?: LatencyComparison;
559
+ }
560
+ /** Comparison summary */
561
+ export interface ComparisonSummary {
562
+ metric: string;
563
+ production: number;
564
+ shadow: number;
565
+ diff: number;
566
+ diffPercent: number;
567
+ }
568
+ /** Prediction diff */
569
+ export interface PredictionDiff {
570
+ requestId: string;
571
+ input: unknown;
572
+ productionOutput: unknown;
573
+ shadowOutput: unknown;
574
+ agreementScore?: number;
575
+ }
576
+ /** Latency comparison */
577
+ export interface LatencyComparison {
578
+ production: LatencyStats;
579
+ shadow: LatencyStats;
580
+ }
581
+ /** Latency stats */
582
+ export interface LatencyStats {
583
+ mean: number;
584
+ p50: number;
585
+ p90: number;
586
+ p99: number;
587
+ }
588
+ /** Fairness report */
589
+ export interface FairnessReport {
590
+ modelId: string;
591
+ version: string;
592
+ timestamp: Date;
593
+ sensitiveAttributes: SensitiveAttribute[];
594
+ metrics: FairnessMetric[];
595
+ sliceAnalysis: SliceAnalysis[];
596
+ biasDetection?: BiasDetection[];
597
+ recommendations?: FairnessRecommendation[];
598
+ }
599
+ /** Sensitive attribute */
600
+ export interface SensitiveAttribute {
601
+ name: string;
602
+ type: 'binary' | 'categorical' | 'continuous';
603
+ groups: string[];
604
+ privilegedGroup?: string;
605
+ }
606
+ /** Fairness metric */
607
+ export interface FairnessMetric {
608
+ name: FairnessMetricType;
609
+ attribute: string;
610
+ overall: number;
611
+ byGroup: Record<string, number>;
612
+ threshold?: number;
613
+ passed?: boolean;
614
+ }
615
+ /** Fairness metric type */
616
+ export type FairnessMetricType = 'demographic_parity' | 'equalized_odds' | 'equal_opportunity' | 'predictive_parity' | 'calibration' | 'disparate_impact' | 'treatment_equality';
617
+ /** Slice analysis */
618
+ export interface SliceAnalysis {
619
+ slice: Record<string, string>;
620
+ sampleSize: number;
621
+ metrics: Record<string, number>;
622
+ }
623
+ /** Bias detection */
624
+ export interface BiasDetection {
625
+ type: BiasType;
626
+ severity: 'low' | 'medium' | 'high';
627
+ description: string;
628
+ affectedAttribute: string;
629
+ evidence: BiasEvidence;
630
+ }
631
+ /** Bias type */
632
+ export type BiasType = 'historical' | 'representation' | 'measurement' | 'aggregation' | 'evaluation' | 'deployment';
633
+ /** Bias evidence */
634
+ export interface BiasEvidence {
635
+ metric?: string;
636
+ value?: number;
637
+ threshold?: number;
638
+ samples?: unknown[];
639
+ }
640
+ /** Fairness recommendation */
641
+ export interface FairnessRecommendation {
642
+ issue: string;
643
+ action: string;
644
+ priority: 'low' | 'medium' | 'high';
645
+ }
646
+ /** Explainability report */
647
+ export interface ExplainabilityReport {
648
+ modelId: string;
649
+ version: string;
650
+ timestamp: Date;
651
+ globalExplanations: GlobalExplanation[];
652
+ localExplanations?: LocalExplanation[];
653
+ interpretability?: InterpretabilityScore;
654
+ }
655
+ /** Global explanation */
656
+ export interface GlobalExplanation {
657
+ method: ExplainabilityMethod;
658
+ featureImportance: FeatureImportanceScore[];
659
+ interactionEffects?: InteractionEffect[];
660
+ partialDependence?: PartialDependencePlot[];
661
+ }
662
+ /** Explainability method */
663
+ export type ExplainabilityMethod = 'shap' | 'lime' | 'permutation' | 'integrated_gradients' | 'attention' | 'counterfactual' | 'anchors';
664
+ /** Feature importance score */
665
+ export interface FeatureImportanceScore {
666
+ feature: string;
667
+ importance: number;
668
+ std?: number;
669
+ direction?: 'positive' | 'negative' | 'mixed';
670
+ }
671
+ /** Interaction effect */
672
+ export interface InteractionEffect {
673
+ features: string[];
674
+ strength: number;
675
+ }
676
+ /** Partial dependence plot */
677
+ export interface PartialDependencePlot {
678
+ feature: string;
679
+ values: number[];
680
+ predictions: number[];
681
+ ice?: number[][];
682
+ }
683
+ /** Local explanation */
684
+ export interface LocalExplanation {
685
+ sampleId: string;
686
+ input: Record<string, unknown>;
687
+ prediction: unknown;
688
+ confidence?: number;
689
+ contributions: FeatureContribution[];
690
+ counterfactuals?: Counterfactual[];
691
+ }
692
+ /** Feature contribution */
693
+ export interface FeatureContribution {
694
+ feature: string;
695
+ value: unknown;
696
+ contribution: number;
697
+ baseValue?: number;
698
+ }
699
+ /** Counterfactual */
700
+ export interface Counterfactual {
701
+ changes: FeatureChange[];
702
+ newPrediction: unknown;
703
+ distance: number;
704
+ }
705
+ /** Feature change */
706
+ export interface FeatureChange {
707
+ feature: string;
708
+ originalValue: unknown;
709
+ newValue: unknown;
710
+ }
711
+ /** Interpretability score */
712
+ export interface InterpretabilityScore {
713
+ overall: number;
714
+ complexity: number;
715
+ transparency: number;
716
+ simulatability: number;
717
+ }
718
+ /** Rollback request */
719
+ export interface RollbackRequest {
720
+ id: string;
721
+ modelId: string;
722
+ fromVersion: string;
723
+ toVersion: string;
724
+ reason: string;
725
+ requestedBy: string;
726
+ requestedAt: Date;
727
+ status: RollbackStatus;
728
+ approvals?: RollbackApproval[];
729
+ executedAt?: Date;
730
+ }
731
+ /** Rollback status */
732
+ export type RollbackStatus = 'pending' | 'approved' | 'rejected' | 'executing' | 'completed' | 'failed';
733
+ /** Rollback approval */
734
+ export interface RollbackApproval {
735
+ approver: string;
736
+ status: 'approved' | 'rejected';
737
+ timestamp: Date;
738
+ comments?: string;
739
+ }
740
+ //# sourceMappingURL=model-registry.d.ts.map