@komatikai/trailhead 4.1.0 → 4.2.2

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.
@@ -0,0 +1,1813 @@
1
+ import { z } from "zod";
2
+ import type { CiManifest } from "./ci-manifest.js";
3
+ export declare const GateDecision: z.ZodEnum<["allow", "warn", "block"]>;
4
+ export type GateDecision = z.infer<typeof GateDecision>;
5
+ export declare const HealthCheckResult: z.ZodObject<{
6
+ target: z.ZodString;
7
+ status: z.ZodEnum<["allow", "warn", "block"]>;
8
+ latencyMs: z.ZodNumber;
9
+ detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ status: "allow" | "warn" | "block";
12
+ target: string;
13
+ latencyMs: number;
14
+ detail?: Record<string, unknown> | undefined;
15
+ }, {
16
+ status: "allow" | "warn" | "block";
17
+ target: string;
18
+ latencyMs: number;
19
+ detail?: Record<string, unknown> | undefined;
20
+ }>;
21
+ export type HealthCheckResult = z.infer<typeof HealthCheckResult>;
22
+ export declare const RiskFactor: z.ZodObject<{
23
+ type: z.ZodEnum<["code_churn", "test_coverage", "file_count", "sensitive_files", "author_history", "dependency_changes", "pr_age", "security_alerts", "deployment_history", "canary_status", "ci_integrity", "workflow_security", "prompt_injection_risk", "supply_chain", "pr_scope", "duplicate_logic", "cross_repo_impact"]>;
24
+ score: z.ZodNumber;
25
+ detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
28
+ score: number;
29
+ detail?: Record<string, unknown> | undefined;
30
+ }, {
31
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
32
+ score: number;
33
+ detail?: Record<string, unknown> | undefined;
34
+ }>;
35
+ export type RiskFactor = z.infer<typeof RiskFactor>;
36
+ export declare const PrProvenance: z.ZodObject<{
37
+ type: z.ZodEnum<["human", "dependabot", "copilot", "codex", "claude", "custom-bot", "unknown"]>;
38
+ confidence: z.ZodNumber;
39
+ source: z.ZodOptional<z.ZodString>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
42
+ confidence: number;
43
+ source?: string | undefined;
44
+ }, {
45
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
46
+ confidence: number;
47
+ source?: string | undefined;
48
+ }>;
49
+ export type PrProvenance = z.infer<typeof PrProvenance>;
50
+ export declare const GateMode: z.ZodEnum<["release-ready", "advisory", "risk-only"]>;
51
+ export type GateMode = z.infer<typeof GateMode>;
52
+ export declare const CiCheckStatusEnum: z.ZodEnum<["pass", "fail", "skip", "pending", "stale", "missing"]>;
53
+ export type CiCheckStatusEnum = z.infer<typeof CiCheckStatusEnum>;
54
+ export declare const CiCheck: z.ZodObject<{
55
+ name: z.ZodString;
56
+ status: z.ZodEnum<["pass", "fail", "skip", "pending", "stale", "missing"]>;
57
+ conclusion: z.ZodOptional<z.ZodString>;
58
+ detailsUrl: z.ZodOptional<z.ZodString>;
59
+ required: z.ZodBoolean;
60
+ }, "strip", z.ZodTypeAny, {
61
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
62
+ name: string;
63
+ required: boolean;
64
+ conclusion?: string | undefined;
65
+ detailsUrl?: string | undefined;
66
+ }, {
67
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
68
+ name: string;
69
+ required: boolean;
70
+ conclusion?: string | undefined;
71
+ detailsUrl?: string | undefined;
72
+ }>;
73
+ export type CiCheck = z.infer<typeof CiCheck>;
74
+ export declare const CiSummary: z.ZodObject<{
75
+ checks: z.ZodArray<z.ZodObject<{
76
+ name: z.ZodString;
77
+ status: z.ZodEnum<["pass", "fail", "skip", "pending", "stale", "missing"]>;
78
+ conclusion: z.ZodOptional<z.ZodString>;
79
+ detailsUrl: z.ZodOptional<z.ZodString>;
80
+ required: z.ZodBoolean;
81
+ }, "strip", z.ZodTypeAny, {
82
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
83
+ name: string;
84
+ required: boolean;
85
+ conclusion?: string | undefined;
86
+ detailsUrl?: string | undefined;
87
+ }, {
88
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
89
+ name: string;
90
+ required: boolean;
91
+ conclusion?: string | undefined;
92
+ detailsUrl?: string | undefined;
93
+ }>, "many">;
94
+ allRequiredPassed: z.ZodBoolean;
95
+ pendingCount: z.ZodNumber;
96
+ failedCount: z.ZodNumber;
97
+ missingCount: z.ZodNumber;
98
+ }, "strip", z.ZodTypeAny, {
99
+ checks: {
100
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
101
+ name: string;
102
+ required: boolean;
103
+ conclusion?: string | undefined;
104
+ detailsUrl?: string | undefined;
105
+ }[];
106
+ allRequiredPassed: boolean;
107
+ pendingCount: number;
108
+ failedCount: number;
109
+ missingCount: number;
110
+ }, {
111
+ checks: {
112
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
113
+ name: string;
114
+ required: boolean;
115
+ conclusion?: string | undefined;
116
+ detailsUrl?: string | undefined;
117
+ }[];
118
+ allRequiredPassed: boolean;
119
+ pendingCount: number;
120
+ failedCount: number;
121
+ missingCount: number;
122
+ }>;
123
+ export type CiSummary = z.infer<typeof CiSummary>;
124
+ export declare const MatchedContext: z.ZodObject<{
125
+ name: z.ZodString;
126
+ environment: z.ZodOptional<z.ZodString>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ name: string;
129
+ environment?: string | undefined;
130
+ }, {
131
+ name: string;
132
+ environment?: string | undefined;
133
+ }>;
134
+ export type MatchedContext = z.infer<typeof MatchedContext>;
135
+ export declare const GateEvaluation: z.ZodObject<{
136
+ id: z.ZodString;
137
+ repoId: z.ZodString;
138
+ commitSha: z.ZodString;
139
+ prNumber: z.ZodOptional<z.ZodNumber>;
140
+ healthScore: z.ZodNumber;
141
+ riskScore: z.ZodNumber;
142
+ gateDecision: z.ZodEnum<["allow", "warn", "block"]>;
143
+ healthChecks: z.ZodArray<z.ZodObject<{
144
+ target: z.ZodString;
145
+ status: z.ZodEnum<["allow", "warn", "block"]>;
146
+ latencyMs: z.ZodNumber;
147
+ detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
148
+ }, "strip", z.ZodTypeAny, {
149
+ status: "allow" | "warn" | "block";
150
+ target: string;
151
+ latencyMs: number;
152
+ detail?: Record<string, unknown> | undefined;
153
+ }, {
154
+ status: "allow" | "warn" | "block";
155
+ target: string;
156
+ latencyMs: number;
157
+ detail?: Record<string, unknown> | undefined;
158
+ }>, "many">;
159
+ riskFactors: z.ZodArray<z.ZodObject<{
160
+ type: z.ZodEnum<["code_churn", "test_coverage", "file_count", "sensitive_files", "author_history", "dependency_changes", "pr_age", "security_alerts", "deployment_history", "canary_status", "ci_integrity", "workflow_security", "prompt_injection_risk", "supply_chain", "pr_scope", "duplicate_logic", "cross_repo_impact"]>;
161
+ score: z.ZodNumber;
162
+ detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
165
+ score: number;
166
+ detail?: Record<string, unknown> | undefined;
167
+ }, {
168
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
169
+ score: number;
170
+ detail?: Record<string, unknown> | undefined;
171
+ }>, "many">;
172
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
173
+ evaluationMs: z.ZodNumber;
174
+ reportUrl: z.ZodOptional<z.ZodString>;
175
+ environment: z.ZodOptional<z.ZodString>;
176
+ service: z.ZodOptional<z.ZodString>;
177
+ policyFindings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
178
+ pr: z.ZodOptional<z.ZodObject<{
179
+ provenance: z.ZodOptional<z.ZodObject<{
180
+ type: z.ZodEnum<["human", "dependabot", "copilot", "codex", "claude", "custom-bot", "unknown"]>;
181
+ confidence: z.ZodNumber;
182
+ source: z.ZodOptional<z.ZodString>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
185
+ confidence: number;
186
+ source?: string | undefined;
187
+ }, {
188
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
189
+ confidence: number;
190
+ source?: string | undefined;
191
+ }>>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ provenance?: {
194
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
195
+ confidence: number;
196
+ source?: string | undefined;
197
+ } | undefined;
198
+ }, {
199
+ provenance?: {
200
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
201
+ confidence: number;
202
+ source?: string | undefined;
203
+ } | undefined;
204
+ }>>;
205
+ session_correlation: z.ZodOptional<z.ZodObject<{
206
+ burst_count: z.ZodNumber;
207
+ window: z.ZodString;
208
+ }, "strip", z.ZodTypeAny, {
209
+ burst_count: number;
210
+ window: string;
211
+ }, {
212
+ burst_count: number;
213
+ window: string;
214
+ }>>;
215
+ escalation_status: z.ZodOptional<z.ZodObject<{
216
+ enabled: z.ZodBoolean;
217
+ target_count: z.ZodNumber;
218
+ acknowledge_sla_minutes: z.ZodOptional<z.ZodNumber>;
219
+ resolve_sla_minutes: z.ZodOptional<z.ZodNumber>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ enabled: boolean;
222
+ target_count: number;
223
+ acknowledge_sla_minutes?: number | undefined;
224
+ resolve_sla_minutes?: number | undefined;
225
+ }, {
226
+ enabled: boolean;
227
+ target_count: number;
228
+ acknowledge_sla_minutes?: number | undefined;
229
+ resolve_sla_minutes?: number | undefined;
230
+ }>>;
231
+ trust_profile: z.ZodOptional<z.ZodObject<{
232
+ strictness: z.ZodEnum<["baseline", "elevated", "strict"]>;
233
+ reason: z.ZodString;
234
+ }, "strip", z.ZodTypeAny, {
235
+ reason: string;
236
+ strictness: "baseline" | "elevated" | "strict";
237
+ }, {
238
+ reason: string;
239
+ strictness: "baseline" | "elevated" | "strict";
240
+ }>>;
241
+ policyOverride: z.ZodOptional<z.ZodObject<{
242
+ owner: z.ZodString;
243
+ reason: z.ZodString;
244
+ linkedTicket: z.ZodString;
245
+ expiresAt: z.ZodString;
246
+ appliedAt: z.ZodString;
247
+ changes: z.ZodDefault<z.ZodObject<{
248
+ failMode: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
249
+ riskThreshold: z.ZodOptional<z.ZodNumber>;
250
+ warnThreshold: z.ZodOptional<z.ZodNumber>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ failMode?: "open" | "closed" | undefined;
253
+ riskThreshold?: number | undefined;
254
+ warnThreshold?: number | undefined;
255
+ }, {
256
+ failMode?: "open" | "closed" | undefined;
257
+ riskThreshold?: number | undefined;
258
+ warnThreshold?: number | undefined;
259
+ }>>;
260
+ }, "strip", z.ZodTypeAny, {
261
+ reason: string;
262
+ owner: string;
263
+ linkedTicket: string;
264
+ expiresAt: string;
265
+ appliedAt: string;
266
+ changes: {
267
+ failMode?: "open" | "closed" | undefined;
268
+ riskThreshold?: number | undefined;
269
+ warnThreshold?: number | undefined;
270
+ };
271
+ }, {
272
+ reason: string;
273
+ owner: string;
274
+ linkedTicket: string;
275
+ expiresAt: string;
276
+ appliedAt: string;
277
+ changes?: {
278
+ failMode?: "open" | "closed" | undefined;
279
+ riskThreshold?: number | undefined;
280
+ warnThreshold?: number | undefined;
281
+ } | undefined;
282
+ }>>;
283
+ releaseReady: z.ZodOptional<z.ZodBoolean>;
284
+ releaseReadyReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
285
+ ci: z.ZodOptional<z.ZodObject<{
286
+ checks: z.ZodArray<z.ZodObject<{
287
+ name: z.ZodString;
288
+ status: z.ZodEnum<["pass", "fail", "skip", "pending", "stale", "missing"]>;
289
+ conclusion: z.ZodOptional<z.ZodString>;
290
+ detailsUrl: z.ZodOptional<z.ZodString>;
291
+ required: z.ZodBoolean;
292
+ }, "strip", z.ZodTypeAny, {
293
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
294
+ name: string;
295
+ required: boolean;
296
+ conclusion?: string | undefined;
297
+ detailsUrl?: string | undefined;
298
+ }, {
299
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
300
+ name: string;
301
+ required: boolean;
302
+ conclusion?: string | undefined;
303
+ detailsUrl?: string | undefined;
304
+ }>, "many">;
305
+ allRequiredPassed: z.ZodBoolean;
306
+ pendingCount: z.ZodNumber;
307
+ failedCount: z.ZodNumber;
308
+ missingCount: z.ZodNumber;
309
+ }, "strip", z.ZodTypeAny, {
310
+ checks: {
311
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
312
+ name: string;
313
+ required: boolean;
314
+ conclusion?: string | undefined;
315
+ detailsUrl?: string | undefined;
316
+ }[];
317
+ allRequiredPassed: boolean;
318
+ pendingCount: number;
319
+ failedCount: number;
320
+ missingCount: number;
321
+ }, {
322
+ checks: {
323
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
324
+ name: string;
325
+ required: boolean;
326
+ conclusion?: string | undefined;
327
+ detailsUrl?: string | undefined;
328
+ }[];
329
+ allRequiredPassed: boolean;
330
+ pendingCount: number;
331
+ failedCount: number;
332
+ missingCount: number;
333
+ }>>;
334
+ context: z.ZodOptional<z.ZodObject<{
335
+ name: z.ZodString;
336
+ environment: z.ZodOptional<z.ZodString>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ name: string;
339
+ environment?: string | undefined;
340
+ }, {
341
+ name: string;
342
+ environment?: string | undefined;
343
+ }>>;
344
+ gateMode: z.ZodOptional<z.ZodEnum<["release-ready", "advisory", "risk-only"]>>;
345
+ storePersisted: z.ZodOptional<z.ZodBoolean>;
346
+ cross_repo_impact: z.ZodOptional<z.ZodObject<{
347
+ services: z.ZodArray<z.ZodObject<{
348
+ serviceName: z.ZodString;
349
+ touchedFiles: z.ZodArray<z.ZodString, "many">;
350
+ consumers: z.ZodArray<z.ZodObject<{
351
+ id: z.ZodString;
352
+ repo: z.ZodOptional<z.ZodString>;
353
+ branch: z.ZodOptional<z.ZodString>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ id: string;
356
+ repo?: string | undefined;
357
+ branch?: string | undefined;
358
+ }, {
359
+ id: string;
360
+ repo?: string | undefined;
361
+ branch?: string | undefined;
362
+ }>, "many">;
363
+ notify_webhook: z.ZodOptional<z.ZodString>;
364
+ }, "strip", z.ZodTypeAny, {
365
+ serviceName: string;
366
+ touchedFiles: string[];
367
+ consumers: {
368
+ id: string;
369
+ repo?: string | undefined;
370
+ branch?: string | undefined;
371
+ }[];
372
+ notify_webhook?: string | undefined;
373
+ }, {
374
+ serviceName: string;
375
+ touchedFiles: string[];
376
+ consumers: {
377
+ id: string;
378
+ repo?: string | undefined;
379
+ branch?: string | undefined;
380
+ }[];
381
+ notify_webhook?: string | undefined;
382
+ }>, "many">;
383
+ }, "strip", z.ZodTypeAny, {
384
+ services: {
385
+ serviceName: string;
386
+ touchedFiles: string[];
387
+ consumers: {
388
+ id: string;
389
+ repo?: string | undefined;
390
+ branch?: string | undefined;
391
+ }[];
392
+ notify_webhook?: string | undefined;
393
+ }[];
394
+ }, {
395
+ services: {
396
+ serviceName: string;
397
+ touchedFiles: string[];
398
+ consumers: {
399
+ id: string;
400
+ repo?: string | undefined;
401
+ branch?: string | undefined;
402
+ }[];
403
+ notify_webhook?: string | undefined;
404
+ }[];
405
+ }>>;
406
+ }, "strip", z.ZodTypeAny, {
407
+ id: string;
408
+ repoId: string;
409
+ commitSha: string;
410
+ healthScore: number;
411
+ riskScore: number;
412
+ gateDecision: "allow" | "warn" | "block";
413
+ healthChecks: {
414
+ status: "allow" | "warn" | "block";
415
+ target: string;
416
+ latencyMs: number;
417
+ detail?: Record<string, unknown> | undefined;
418
+ }[];
419
+ riskFactors: {
420
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
421
+ score: number;
422
+ detail?: Record<string, unknown> | undefined;
423
+ }[];
424
+ evaluationMs: number;
425
+ cross_repo_impact?: {
426
+ services: {
427
+ serviceName: string;
428
+ touchedFiles: string[];
429
+ consumers: {
430
+ id: string;
431
+ repo?: string | undefined;
432
+ branch?: string | undefined;
433
+ }[];
434
+ notify_webhook?: string | undefined;
435
+ }[];
436
+ } | undefined;
437
+ environment?: string | undefined;
438
+ prNumber?: number | undefined;
439
+ files?: string[] | undefined;
440
+ reportUrl?: string | undefined;
441
+ service?: string | undefined;
442
+ policyFindings?: string[] | undefined;
443
+ pr?: {
444
+ provenance?: {
445
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
446
+ confidence: number;
447
+ source?: string | undefined;
448
+ } | undefined;
449
+ } | undefined;
450
+ session_correlation?: {
451
+ burst_count: number;
452
+ window: string;
453
+ } | undefined;
454
+ escalation_status?: {
455
+ enabled: boolean;
456
+ target_count: number;
457
+ acknowledge_sla_minutes?: number | undefined;
458
+ resolve_sla_minutes?: number | undefined;
459
+ } | undefined;
460
+ trust_profile?: {
461
+ reason: string;
462
+ strictness: "baseline" | "elevated" | "strict";
463
+ } | undefined;
464
+ policyOverride?: {
465
+ reason: string;
466
+ owner: string;
467
+ linkedTicket: string;
468
+ expiresAt: string;
469
+ appliedAt: string;
470
+ changes: {
471
+ failMode?: "open" | "closed" | undefined;
472
+ riskThreshold?: number | undefined;
473
+ warnThreshold?: number | undefined;
474
+ };
475
+ } | undefined;
476
+ releaseReady?: boolean | undefined;
477
+ releaseReadyReasons?: string[] | undefined;
478
+ ci?: {
479
+ checks: {
480
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
481
+ name: string;
482
+ required: boolean;
483
+ conclusion?: string | undefined;
484
+ detailsUrl?: string | undefined;
485
+ }[];
486
+ allRequiredPassed: boolean;
487
+ pendingCount: number;
488
+ failedCount: number;
489
+ missingCount: number;
490
+ } | undefined;
491
+ context?: {
492
+ name: string;
493
+ environment?: string | undefined;
494
+ } | undefined;
495
+ gateMode?: "release-ready" | "advisory" | "risk-only" | undefined;
496
+ storePersisted?: boolean | undefined;
497
+ }, {
498
+ id: string;
499
+ repoId: string;
500
+ commitSha: string;
501
+ healthScore: number;
502
+ riskScore: number;
503
+ gateDecision: "allow" | "warn" | "block";
504
+ healthChecks: {
505
+ status: "allow" | "warn" | "block";
506
+ target: string;
507
+ latencyMs: number;
508
+ detail?: Record<string, unknown> | undefined;
509
+ }[];
510
+ riskFactors: {
511
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
512
+ score: number;
513
+ detail?: Record<string, unknown> | undefined;
514
+ }[];
515
+ evaluationMs: number;
516
+ cross_repo_impact?: {
517
+ services: {
518
+ serviceName: string;
519
+ touchedFiles: string[];
520
+ consumers: {
521
+ id: string;
522
+ repo?: string | undefined;
523
+ branch?: string | undefined;
524
+ }[];
525
+ notify_webhook?: string | undefined;
526
+ }[];
527
+ } | undefined;
528
+ environment?: string | undefined;
529
+ prNumber?: number | undefined;
530
+ files?: string[] | undefined;
531
+ reportUrl?: string | undefined;
532
+ service?: string | undefined;
533
+ policyFindings?: string[] | undefined;
534
+ pr?: {
535
+ provenance?: {
536
+ type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
537
+ confidence: number;
538
+ source?: string | undefined;
539
+ } | undefined;
540
+ } | undefined;
541
+ session_correlation?: {
542
+ burst_count: number;
543
+ window: string;
544
+ } | undefined;
545
+ escalation_status?: {
546
+ enabled: boolean;
547
+ target_count: number;
548
+ acknowledge_sla_minutes?: number | undefined;
549
+ resolve_sla_minutes?: number | undefined;
550
+ } | undefined;
551
+ trust_profile?: {
552
+ reason: string;
553
+ strictness: "baseline" | "elevated" | "strict";
554
+ } | undefined;
555
+ policyOverride?: {
556
+ reason: string;
557
+ owner: string;
558
+ linkedTicket: string;
559
+ expiresAt: string;
560
+ appliedAt: string;
561
+ changes?: {
562
+ failMode?: "open" | "closed" | undefined;
563
+ riskThreshold?: number | undefined;
564
+ warnThreshold?: number | undefined;
565
+ } | undefined;
566
+ } | undefined;
567
+ releaseReady?: boolean | undefined;
568
+ releaseReadyReasons?: string[] | undefined;
569
+ ci?: {
570
+ checks: {
571
+ status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
572
+ name: string;
573
+ required: boolean;
574
+ conclusion?: string | undefined;
575
+ detailsUrl?: string | undefined;
576
+ }[];
577
+ allRequiredPassed: boolean;
578
+ pendingCount: number;
579
+ failedCount: number;
580
+ missingCount: number;
581
+ } | undefined;
582
+ context?: {
583
+ name: string;
584
+ environment?: string | undefined;
585
+ } | undefined;
586
+ gateMode?: "release-ready" | "advisory" | "risk-only" | undefined;
587
+ storePersisted?: boolean | undefined;
588
+ }>;
589
+ export type GateEvaluation = z.infer<typeof GateEvaluation>;
590
+ export declare const GateApiResponse: z.ZodObject<{
591
+ id: z.ZodOptional<z.ZodString>;
592
+ reportUrl: z.ZodOptional<z.ZodString>;
593
+ healthScore: z.ZodOptional<z.ZodNumber>;
594
+ riskScore: z.ZodOptional<z.ZodNumber>;
595
+ gateDecision: z.ZodOptional<z.ZodEnum<["allow", "warn", "block"]>>;
596
+ healthChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
597
+ target: z.ZodString;
598
+ status: z.ZodEnum<["allow", "warn", "block"]>;
599
+ latencyMs: z.ZodNumber;
600
+ detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
601
+ }, "strip", z.ZodTypeAny, {
602
+ status: "allow" | "warn" | "block";
603
+ target: string;
604
+ latencyMs: number;
605
+ detail?: Record<string, unknown> | undefined;
606
+ }, {
607
+ status: "allow" | "warn" | "block";
608
+ target: string;
609
+ latencyMs: number;
610
+ detail?: Record<string, unknown> | undefined;
611
+ }>, "many">>;
612
+ riskFactors: z.ZodOptional<z.ZodArray<z.ZodObject<{
613
+ type: z.ZodEnum<["code_churn", "test_coverage", "file_count", "sensitive_files", "author_history", "dependency_changes", "pr_age", "security_alerts", "deployment_history", "canary_status", "ci_integrity", "workflow_security", "prompt_injection_risk", "supply_chain", "pr_scope", "duplicate_logic", "cross_repo_impact"]>;
614
+ score: z.ZodNumber;
615
+ detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
616
+ }, "strip", z.ZodTypeAny, {
617
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
618
+ score: number;
619
+ detail?: Record<string, unknown> | undefined;
620
+ }, {
621
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
622
+ score: number;
623
+ detail?: Record<string, unknown> | undefined;
624
+ }>, "many">>;
625
+ }, "strip", z.ZodTypeAny, {
626
+ id?: string | undefined;
627
+ healthScore?: number | undefined;
628
+ riskScore?: number | undefined;
629
+ gateDecision?: "allow" | "warn" | "block" | undefined;
630
+ healthChecks?: {
631
+ status: "allow" | "warn" | "block";
632
+ target: string;
633
+ latencyMs: number;
634
+ detail?: Record<string, unknown> | undefined;
635
+ }[] | undefined;
636
+ riskFactors?: {
637
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
638
+ score: number;
639
+ detail?: Record<string, unknown> | undefined;
640
+ }[] | undefined;
641
+ reportUrl?: string | undefined;
642
+ }, {
643
+ id?: string | undefined;
644
+ healthScore?: number | undefined;
645
+ riskScore?: number | undefined;
646
+ gateDecision?: "allow" | "warn" | "block" | undefined;
647
+ healthChecks?: {
648
+ status: "allow" | "warn" | "block";
649
+ target: string;
650
+ latencyMs: number;
651
+ detail?: Record<string, unknown> | undefined;
652
+ }[] | undefined;
653
+ riskFactors?: {
654
+ type: "code_churn" | "test_coverage" | "file_count" | "sensitive_files" | "author_history" | "dependency_changes" | "pr_age" | "security_alerts" | "deployment_history" | "canary_status" | "ci_integrity" | "workflow_security" | "prompt_injection_risk" | "supply_chain" | "pr_scope" | "duplicate_logic" | "cross_repo_impact";
655
+ score: number;
656
+ detail?: Record<string, unknown> | undefined;
657
+ }[] | undefined;
658
+ reportUrl?: string | undefined;
659
+ }>;
660
+ export type GateApiResponse = z.infer<typeof GateApiResponse>;
661
+ export declare const FreezeWindow: z.ZodObject<{
662
+ days: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
663
+ afterHour: z.ZodOptional<z.ZodNumber>;
664
+ beforeHour: z.ZodOptional<z.ZodNumber>;
665
+ timezone: z.ZodDefault<z.ZodString>;
666
+ message: z.ZodOptional<z.ZodString>;
667
+ }, "strip", z.ZodTypeAny, {
668
+ days: string[];
669
+ timezone: string;
670
+ message?: string | undefined;
671
+ afterHour?: number | undefined;
672
+ beforeHour?: number | undefined;
673
+ }, {
674
+ message?: string | undefined;
675
+ days?: string[] | undefined;
676
+ afterHour?: number | undefined;
677
+ beforeHour?: number | undefined;
678
+ timezone?: string | undefined;
679
+ }>;
680
+ export type FreezeWindow = z.infer<typeof FreezeWindow>;
681
+ export declare const EnvironmentConfig: z.ZodObject<{
682
+ risk: z.ZodOptional<z.ZodNumber>;
683
+ warn: z.ZodOptional<z.ZodNumber>;
684
+ require_security_clear: z.ZodOptional<z.ZodBoolean>;
685
+ }, "strip", z.ZodTypeAny, {
686
+ warn?: number | undefined;
687
+ risk?: number | undefined;
688
+ require_security_clear?: boolean | undefined;
689
+ }, {
690
+ warn?: number | undefined;
691
+ risk?: number | undefined;
692
+ require_security_clear?: boolean | undefined;
693
+ }>;
694
+ export type EnvironmentConfig = z.infer<typeof EnvironmentConfig>;
695
+ export declare const ServiceConsumerRef: z.ZodObject<{
696
+ repo: z.ZodString;
697
+ name: z.ZodOptional<z.ZodString>;
698
+ branch: z.ZodOptional<z.ZodString>;
699
+ notify_webhook: z.ZodOptional<z.ZodString>;
700
+ }, "strip", z.ZodTypeAny, {
701
+ repo: string;
702
+ name?: string | undefined;
703
+ branch?: string | undefined;
704
+ notify_webhook?: string | undefined;
705
+ }, {
706
+ repo: string;
707
+ name?: string | undefined;
708
+ branch?: string | undefined;
709
+ notify_webhook?: string | undefined;
710
+ }>;
711
+ export declare const ServiceConsumer: z.ZodUnion<[z.ZodString, z.ZodObject<{
712
+ repo: z.ZodString;
713
+ name: z.ZodOptional<z.ZodString>;
714
+ branch: z.ZodOptional<z.ZodString>;
715
+ notify_webhook: z.ZodOptional<z.ZodString>;
716
+ }, "strip", z.ZodTypeAny, {
717
+ repo: string;
718
+ name?: string | undefined;
719
+ branch?: string | undefined;
720
+ notify_webhook?: string | undefined;
721
+ }, {
722
+ repo: string;
723
+ name?: string | undefined;
724
+ branch?: string | undefined;
725
+ notify_webhook?: string | undefined;
726
+ }>]>;
727
+ export type ServiceConsumer = z.infer<typeof ServiceConsumer>;
728
+ export declare const ConsumerRegistry: z.ZodRecord<z.ZodString, z.ZodObject<{
729
+ repo: z.ZodString;
730
+ name: z.ZodOptional<z.ZodString>;
731
+ branch: z.ZodOptional<z.ZodString>;
732
+ notify_webhook: z.ZodOptional<z.ZodString>;
733
+ }, "strip", z.ZodTypeAny, {
734
+ repo: string;
735
+ name?: string | undefined;
736
+ branch?: string | undefined;
737
+ notify_webhook?: string | undefined;
738
+ }, {
739
+ repo: string;
740
+ name?: string | undefined;
741
+ branch?: string | undefined;
742
+ notify_webhook?: string | undefined;
743
+ }>>;
744
+ export type ConsumerRegistry = z.infer<typeof ConsumerRegistry>;
745
+ export declare const ServiceMapping: z.ZodObject<{
746
+ paths: z.ZodArray<z.ZodString, "many">;
747
+ environment: z.ZodOptional<z.ZodString>;
748
+ consumers: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
749
+ repo: z.ZodString;
750
+ name: z.ZodOptional<z.ZodString>;
751
+ branch: z.ZodOptional<z.ZodString>;
752
+ notify_webhook: z.ZodOptional<z.ZodString>;
753
+ }, "strip", z.ZodTypeAny, {
754
+ repo: string;
755
+ name?: string | undefined;
756
+ branch?: string | undefined;
757
+ notify_webhook?: string | undefined;
758
+ }, {
759
+ repo: string;
760
+ name?: string | undefined;
761
+ branch?: string | undefined;
762
+ notify_webhook?: string | undefined;
763
+ }>]>, "many">>;
764
+ contracts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
765
+ notify_webhook: z.ZodOptional<z.ZodString>;
766
+ }, "strip", z.ZodTypeAny, {
767
+ consumers: (string | {
768
+ repo: string;
769
+ name?: string | undefined;
770
+ branch?: string | undefined;
771
+ notify_webhook?: string | undefined;
772
+ })[];
773
+ paths: string[];
774
+ contracts: string[];
775
+ environment?: string | undefined;
776
+ notify_webhook?: string | undefined;
777
+ }, {
778
+ paths: string[];
779
+ environment?: string | undefined;
780
+ consumers?: (string | {
781
+ repo: string;
782
+ name?: string | undefined;
783
+ branch?: string | undefined;
784
+ notify_webhook?: string | undefined;
785
+ })[] | undefined;
786
+ notify_webhook?: string | undefined;
787
+ contracts?: string[] | undefined;
788
+ }>;
789
+ export type ServiceMapping = z.infer<typeof ServiceMapping>;
790
+ export declare const SecurityConfig: z.ZodObject<{
791
+ severity_threshold: z.ZodDefault<z.ZodEnum<["error", "warning", "note", "none"]>>;
792
+ block_on_critical: z.ZodDefault<z.ZodBoolean>;
793
+ ignore_rules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
794
+ }, "strip", z.ZodTypeAny, {
795
+ severity_threshold: "error" | "warning" | "note" | "none";
796
+ block_on_critical: boolean;
797
+ ignore_rules: string[];
798
+ }, {
799
+ severity_threshold?: "error" | "warning" | "note" | "none" | undefined;
800
+ block_on_critical?: boolean | undefined;
801
+ ignore_rules?: string[] | undefined;
802
+ }>;
803
+ export type SecurityConfig = z.infer<typeof SecurityConfig>;
804
+ export declare const CanaryConfig: z.ZodObject<{
805
+ webhook_type: z.ZodDefault<z.ZodEnum<["vercel", "generic"]>>;
806
+ field_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
807
+ rollback_on_failure: z.ZodDefault<z.ZodBoolean>;
808
+ }, "strip", z.ZodTypeAny, {
809
+ webhook_type: "vercel" | "generic";
810
+ rollback_on_failure: boolean;
811
+ field_map?: Record<string, string> | undefined;
812
+ }, {
813
+ webhook_type?: "vercel" | "generic" | undefined;
814
+ field_map?: Record<string, string> | undefined;
815
+ rollback_on_failure?: boolean | undefined;
816
+ }>;
817
+ export type CanaryConfig = z.infer<typeof CanaryConfig>;
818
+ export declare const RiskProfileMatch: z.ZodObject<{
819
+ files_include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
820
+ files_exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
821
+ min_files: z.ZodOptional<z.ZodNumber>;
822
+ max_files: z.ZodOptional<z.ZodNumber>;
823
+ }, "strip", z.ZodTypeAny, {
824
+ files_include: string[];
825
+ files_exclude: string[];
826
+ min_files?: number | undefined;
827
+ max_files?: number | undefined;
828
+ }, {
829
+ files_include?: string[] | undefined;
830
+ files_exclude?: string[] | undefined;
831
+ min_files?: number | undefined;
832
+ max_files?: number | undefined;
833
+ }>;
834
+ export type RiskProfileMatch = z.infer<typeof RiskProfileMatch>;
835
+ export declare const RiskProfile: z.ZodObject<{
836
+ name: z.ZodOptional<z.ZodString>;
837
+ match: z.ZodObject<{
838
+ files_include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
839
+ files_exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
840
+ min_files: z.ZodOptional<z.ZodNumber>;
841
+ max_files: z.ZodOptional<z.ZodNumber>;
842
+ }, "strip", z.ZodTypeAny, {
843
+ files_include: string[];
844
+ files_exclude: string[];
845
+ min_files?: number | undefined;
846
+ max_files?: number | undefined;
847
+ }, {
848
+ files_include?: string[] | undefined;
849
+ files_exclude?: string[] | undefined;
850
+ min_files?: number | undefined;
851
+ max_files?: number | undefined;
852
+ }>;
853
+ weights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ match: {
856
+ files_include: string[];
857
+ files_exclude: string[];
858
+ min_files?: number | undefined;
859
+ max_files?: number | undefined;
860
+ };
861
+ weights: Record<string, number>;
862
+ name?: string | undefined;
863
+ }, {
864
+ match: {
865
+ files_include?: string[] | undefined;
866
+ files_exclude?: string[] | undefined;
867
+ min_files?: number | undefined;
868
+ max_files?: number | undefined;
869
+ };
870
+ name?: string | undefined;
871
+ weights?: Record<string, number> | undefined;
872
+ }>;
873
+ export type RiskProfile = z.infer<typeof RiskProfile>;
874
+ export declare const ContextMatch: z.ZodObject<{
875
+ base_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
876
+ head_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
877
+ labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
878
+ }, "strip", z.ZodTypeAny, {
879
+ base_branch: string[];
880
+ head_branch: string[];
881
+ labels: string[];
882
+ }, {
883
+ base_branch?: string[] | undefined;
884
+ head_branch?: string[] | undefined;
885
+ labels?: string[] | undefined;
886
+ }>;
887
+ export type ContextMatch = z.infer<typeof ContextMatch>;
888
+ export declare const ContextCiConfig: z.ZodObject<{
889
+ required_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
890
+ optional_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
891
+ missing_required: z.ZodDefault<z.ZodEnum<["fail", "skip"]>>;
892
+ }, "strip", z.ZodTypeAny, {
893
+ required_checks: string[];
894
+ optional_checks: string[];
895
+ missing_required: "fail" | "skip";
896
+ }, {
897
+ required_checks?: string[] | undefined;
898
+ optional_checks?: string[] | undefined;
899
+ missing_required?: "fail" | "skip" | undefined;
900
+ }>;
901
+ export type ContextCiConfig = z.infer<typeof ContextCiConfig>;
902
+ export declare const TrailheadContext: z.ZodObject<{
903
+ name: z.ZodString;
904
+ match: z.ZodObject<{
905
+ base_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
906
+ head_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
907
+ labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
908
+ }, "strip", z.ZodTypeAny, {
909
+ base_branch: string[];
910
+ head_branch: string[];
911
+ labels: string[];
912
+ }, {
913
+ base_branch?: string[] | undefined;
914
+ head_branch?: string[] | undefined;
915
+ labels?: string[] | undefined;
916
+ }>;
917
+ environment: z.ZodOptional<z.ZodString>;
918
+ thresholds: z.ZodDefault<z.ZodObject<{
919
+ risk: z.ZodOptional<z.ZodNumber>;
920
+ warn: z.ZodOptional<z.ZodNumber>;
921
+ }, "strip", z.ZodTypeAny, {
922
+ warn?: number | undefined;
923
+ risk?: number | undefined;
924
+ }, {
925
+ warn?: number | undefined;
926
+ risk?: number | undefined;
927
+ }>>;
928
+ ci: z.ZodDefault<z.ZodObject<{
929
+ required_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
930
+ optional_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
931
+ missing_required: z.ZodDefault<z.ZodEnum<["fail", "skip"]>>;
932
+ }, "strip", z.ZodTypeAny, {
933
+ required_checks: string[];
934
+ optional_checks: string[];
935
+ missing_required: "fail" | "skip";
936
+ }, {
937
+ required_checks?: string[] | undefined;
938
+ optional_checks?: string[] | undefined;
939
+ missing_required?: "fail" | "skip" | undefined;
940
+ }>>;
941
+ }, "strip", z.ZodTypeAny, {
942
+ name: string;
943
+ match: {
944
+ base_branch: string[];
945
+ head_branch: string[];
946
+ labels: string[];
947
+ };
948
+ ci: {
949
+ required_checks: string[];
950
+ optional_checks: string[];
951
+ missing_required: "fail" | "skip";
952
+ };
953
+ thresholds: {
954
+ warn?: number | undefined;
955
+ risk?: number | undefined;
956
+ };
957
+ environment?: string | undefined;
958
+ }, {
959
+ name: string;
960
+ match: {
961
+ base_branch?: string[] | undefined;
962
+ head_branch?: string[] | undefined;
963
+ labels?: string[] | undefined;
964
+ };
965
+ environment?: string | undefined;
966
+ ci?: {
967
+ required_checks?: string[] | undefined;
968
+ optional_checks?: string[] | undefined;
969
+ missing_required?: "fail" | "skip" | undefined;
970
+ } | undefined;
971
+ thresholds?: {
972
+ warn?: number | undefined;
973
+ risk?: number | undefined;
974
+ } | undefined;
975
+ }>;
976
+ export type TrailheadContext = z.infer<typeof TrailheadContext>;
977
+ export declare const GateConfig: z.ZodObject<{
978
+ mode: z.ZodDefault<z.ZodEnum<["release-ready", "advisory", "risk-only"]>>;
979
+ check_name: z.ZodDefault<z.ZodString>;
980
+ }, "strip", z.ZodTypeAny, {
981
+ mode: "release-ready" | "advisory" | "risk-only";
982
+ check_name: string;
983
+ }, {
984
+ mode?: "release-ready" | "advisory" | "risk-only" | undefined;
985
+ check_name?: string | undefined;
986
+ }>;
987
+ export type GateConfig = z.infer<typeof GateConfig>;
988
+ export declare const RepoConfig: z.ZodObject<{
989
+ schema_version: z.ZodDefault<z.ZodNumber>;
990
+ gate: z.ZodDefault<z.ZodObject<{
991
+ mode: z.ZodDefault<z.ZodEnum<["release-ready", "advisory", "risk-only"]>>;
992
+ check_name: z.ZodDefault<z.ZodString>;
993
+ }, "strip", z.ZodTypeAny, {
994
+ mode: "release-ready" | "advisory" | "risk-only";
995
+ check_name: string;
996
+ }, {
997
+ mode?: "release-ready" | "advisory" | "risk-only" | undefined;
998
+ check_name?: string | undefined;
999
+ }>>;
1000
+ contexts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1001
+ name: z.ZodString;
1002
+ match: z.ZodObject<{
1003
+ base_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1004
+ head_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1005
+ labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1006
+ }, "strip", z.ZodTypeAny, {
1007
+ base_branch: string[];
1008
+ head_branch: string[];
1009
+ labels: string[];
1010
+ }, {
1011
+ base_branch?: string[] | undefined;
1012
+ head_branch?: string[] | undefined;
1013
+ labels?: string[] | undefined;
1014
+ }>;
1015
+ environment: z.ZodOptional<z.ZodString>;
1016
+ thresholds: z.ZodDefault<z.ZodObject<{
1017
+ risk: z.ZodOptional<z.ZodNumber>;
1018
+ warn: z.ZodOptional<z.ZodNumber>;
1019
+ }, "strip", z.ZodTypeAny, {
1020
+ warn?: number | undefined;
1021
+ risk?: number | undefined;
1022
+ }, {
1023
+ warn?: number | undefined;
1024
+ risk?: number | undefined;
1025
+ }>>;
1026
+ ci: z.ZodDefault<z.ZodObject<{
1027
+ required_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1028
+ optional_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1029
+ missing_required: z.ZodDefault<z.ZodEnum<["fail", "skip"]>>;
1030
+ }, "strip", z.ZodTypeAny, {
1031
+ required_checks: string[];
1032
+ optional_checks: string[];
1033
+ missing_required: "fail" | "skip";
1034
+ }, {
1035
+ required_checks?: string[] | undefined;
1036
+ optional_checks?: string[] | undefined;
1037
+ missing_required?: "fail" | "skip" | undefined;
1038
+ }>>;
1039
+ }, "strip", z.ZodTypeAny, {
1040
+ name: string;
1041
+ match: {
1042
+ base_branch: string[];
1043
+ head_branch: string[];
1044
+ labels: string[];
1045
+ };
1046
+ ci: {
1047
+ required_checks: string[];
1048
+ optional_checks: string[];
1049
+ missing_required: "fail" | "skip";
1050
+ };
1051
+ thresholds: {
1052
+ warn?: number | undefined;
1053
+ risk?: number | undefined;
1054
+ };
1055
+ environment?: string | undefined;
1056
+ }, {
1057
+ name: string;
1058
+ match: {
1059
+ base_branch?: string[] | undefined;
1060
+ head_branch?: string[] | undefined;
1061
+ labels?: string[] | undefined;
1062
+ };
1063
+ environment?: string | undefined;
1064
+ ci?: {
1065
+ required_checks?: string[] | undefined;
1066
+ optional_checks?: string[] | undefined;
1067
+ missing_required?: "fail" | "skip" | undefined;
1068
+ } | undefined;
1069
+ thresholds?: {
1070
+ warn?: number | undefined;
1071
+ risk?: number | undefined;
1072
+ } | undefined;
1073
+ }>, "many">>;
1074
+ sensitivity: z.ZodDefault<z.ZodObject<{
1075
+ high: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1076
+ medium: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1077
+ low: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ high: string[];
1080
+ medium: string[];
1081
+ low: string[];
1082
+ }, {
1083
+ high?: string[] | undefined;
1084
+ medium?: string[] | undefined;
1085
+ low?: string[] | undefined;
1086
+ }>>;
1087
+ weights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1088
+ profiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
1089
+ name: z.ZodOptional<z.ZodString>;
1090
+ match: z.ZodObject<{
1091
+ files_include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1092
+ files_exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1093
+ min_files: z.ZodOptional<z.ZodNumber>;
1094
+ max_files: z.ZodOptional<z.ZodNumber>;
1095
+ }, "strip", z.ZodTypeAny, {
1096
+ files_include: string[];
1097
+ files_exclude: string[];
1098
+ min_files?: number | undefined;
1099
+ max_files?: number | undefined;
1100
+ }, {
1101
+ files_include?: string[] | undefined;
1102
+ files_exclude?: string[] | undefined;
1103
+ min_files?: number | undefined;
1104
+ max_files?: number | undefined;
1105
+ }>;
1106
+ weights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1107
+ }, "strip", z.ZodTypeAny, {
1108
+ match: {
1109
+ files_include: string[];
1110
+ files_exclude: string[];
1111
+ min_files?: number | undefined;
1112
+ max_files?: number | undefined;
1113
+ };
1114
+ weights: Record<string, number>;
1115
+ name?: string | undefined;
1116
+ }, {
1117
+ match: {
1118
+ files_include?: string[] | undefined;
1119
+ files_exclude?: string[] | undefined;
1120
+ min_files?: number | undefined;
1121
+ max_files?: number | undefined;
1122
+ };
1123
+ name?: string | undefined;
1124
+ weights?: Record<string, number> | undefined;
1125
+ }>, "many">>;
1126
+ thresholds: z.ZodDefault<z.ZodObject<{
1127
+ risk: z.ZodOptional<z.ZodNumber>;
1128
+ warn: z.ZodOptional<z.ZodNumber>;
1129
+ }, "strip", z.ZodTypeAny, {
1130
+ warn?: number | undefined;
1131
+ risk?: number | undefined;
1132
+ }, {
1133
+ warn?: number | undefined;
1134
+ risk?: number | undefined;
1135
+ }>>;
1136
+ ignore: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1137
+ freeze: z.ZodDefault<z.ZodArray<z.ZodObject<{
1138
+ days: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1139
+ afterHour: z.ZodOptional<z.ZodNumber>;
1140
+ beforeHour: z.ZodOptional<z.ZodNumber>;
1141
+ timezone: z.ZodDefault<z.ZodString>;
1142
+ message: z.ZodOptional<z.ZodString>;
1143
+ }, "strip", z.ZodTypeAny, {
1144
+ days: string[];
1145
+ timezone: string;
1146
+ message?: string | undefined;
1147
+ afterHour?: number | undefined;
1148
+ beforeHour?: number | undefined;
1149
+ }, {
1150
+ message?: string | undefined;
1151
+ days?: string[] | undefined;
1152
+ afterHour?: number | undefined;
1153
+ beforeHour?: number | undefined;
1154
+ timezone?: string | undefined;
1155
+ }>, "many">>;
1156
+ environments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1157
+ risk: z.ZodOptional<z.ZodNumber>;
1158
+ warn: z.ZodOptional<z.ZodNumber>;
1159
+ require_security_clear: z.ZodOptional<z.ZodBoolean>;
1160
+ }, "strip", z.ZodTypeAny, {
1161
+ warn?: number | undefined;
1162
+ risk?: number | undefined;
1163
+ require_security_clear?: boolean | undefined;
1164
+ }, {
1165
+ warn?: number | undefined;
1166
+ risk?: number | undefined;
1167
+ require_security_clear?: boolean | undefined;
1168
+ }>>>;
1169
+ services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1170
+ paths: z.ZodArray<z.ZodString, "many">;
1171
+ environment: z.ZodOptional<z.ZodString>;
1172
+ consumers: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1173
+ repo: z.ZodString;
1174
+ name: z.ZodOptional<z.ZodString>;
1175
+ branch: z.ZodOptional<z.ZodString>;
1176
+ notify_webhook: z.ZodOptional<z.ZodString>;
1177
+ }, "strip", z.ZodTypeAny, {
1178
+ repo: string;
1179
+ name?: string | undefined;
1180
+ branch?: string | undefined;
1181
+ notify_webhook?: string | undefined;
1182
+ }, {
1183
+ repo: string;
1184
+ name?: string | undefined;
1185
+ branch?: string | undefined;
1186
+ notify_webhook?: string | undefined;
1187
+ }>]>, "many">>;
1188
+ contracts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1189
+ notify_webhook: z.ZodOptional<z.ZodString>;
1190
+ }, "strip", z.ZodTypeAny, {
1191
+ consumers: (string | {
1192
+ repo: string;
1193
+ name?: string | undefined;
1194
+ branch?: string | undefined;
1195
+ notify_webhook?: string | undefined;
1196
+ })[];
1197
+ paths: string[];
1198
+ contracts: string[];
1199
+ environment?: string | undefined;
1200
+ notify_webhook?: string | undefined;
1201
+ }, {
1202
+ paths: string[];
1203
+ environment?: string | undefined;
1204
+ consumers?: (string | {
1205
+ repo: string;
1206
+ name?: string | undefined;
1207
+ branch?: string | undefined;
1208
+ notify_webhook?: string | undefined;
1209
+ })[] | undefined;
1210
+ notify_webhook?: string | undefined;
1211
+ contracts?: string[] | undefined;
1212
+ }>>>;
1213
+ consumer_registry: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1214
+ repo: z.ZodString;
1215
+ name: z.ZodOptional<z.ZodString>;
1216
+ branch: z.ZodOptional<z.ZodString>;
1217
+ notify_webhook: z.ZodOptional<z.ZodString>;
1218
+ }, "strip", z.ZodTypeAny, {
1219
+ repo: string;
1220
+ name?: string | undefined;
1221
+ branch?: string | undefined;
1222
+ notify_webhook?: string | undefined;
1223
+ }, {
1224
+ repo: string;
1225
+ name?: string | undefined;
1226
+ branch?: string | undefined;
1227
+ notify_webhook?: string | undefined;
1228
+ }>>>;
1229
+ security: z.ZodDefault<z.ZodObject<{
1230
+ severity_threshold: z.ZodDefault<z.ZodEnum<["error", "warning", "note", "none"]>>;
1231
+ block_on_critical: z.ZodDefault<z.ZodBoolean>;
1232
+ ignore_rules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1233
+ }, "strip", z.ZodTypeAny, {
1234
+ severity_threshold: "error" | "warning" | "note" | "none";
1235
+ block_on_critical: boolean;
1236
+ ignore_rules: string[];
1237
+ }, {
1238
+ severity_threshold?: "error" | "warning" | "note" | "none" | undefined;
1239
+ block_on_critical?: boolean | undefined;
1240
+ ignore_rules?: string[] | undefined;
1241
+ }>>;
1242
+ canary: z.ZodOptional<z.ZodObject<{
1243
+ webhook_type: z.ZodDefault<z.ZodEnum<["vercel", "generic"]>>;
1244
+ field_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1245
+ rollback_on_failure: z.ZodDefault<z.ZodBoolean>;
1246
+ }, "strip", z.ZodTypeAny, {
1247
+ webhook_type: "vercel" | "generic";
1248
+ rollback_on_failure: boolean;
1249
+ field_map?: Record<string, string> | undefined;
1250
+ }, {
1251
+ webhook_type?: "vercel" | "generic" | undefined;
1252
+ field_map?: Record<string, string> | undefined;
1253
+ rollback_on_failure?: boolean | undefined;
1254
+ }>>;
1255
+ escalation: z.ZodDefault<z.ZodObject<{
1256
+ targets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1257
+ acknowledge_sla_minutes: z.ZodDefault<z.ZodNumber>;
1258
+ resolve_sla_minutes: z.ZodDefault<z.ZodNumber>;
1259
+ }, "strip", z.ZodTypeAny, {
1260
+ acknowledge_sla_minutes: number;
1261
+ resolve_sla_minutes: number;
1262
+ targets: string[];
1263
+ }, {
1264
+ acknowledge_sla_minutes?: number | undefined;
1265
+ resolve_sla_minutes?: number | undefined;
1266
+ targets?: string[] | undefined;
1267
+ }>>;
1268
+ policies: z.ZodDefault<z.ZodObject<{
1269
+ agent_prs: z.ZodDefault<z.ZodObject<{
1270
+ enabled: z.ZodDefault<z.ZodBoolean>;
1271
+ risk_threshold: z.ZodOptional<z.ZodNumber>;
1272
+ required_approvals: z.ZodDefault<z.ZodNumber>;
1273
+ require_code_owner_approval: z.ZodDefault<z.ZodBoolean>;
1274
+ code_owner_reviewers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1275
+ sensitive_paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1276
+ strict_on_unknown_provenance: z.ZodDefault<z.ZodBoolean>;
1277
+ }, "strip", z.ZodTypeAny, {
1278
+ enabled: boolean;
1279
+ required_approvals: number;
1280
+ require_code_owner_approval: boolean;
1281
+ code_owner_reviewers: string[];
1282
+ sensitive_paths: string[];
1283
+ strict_on_unknown_provenance: boolean;
1284
+ risk_threshold?: number | undefined;
1285
+ }, {
1286
+ enabled?: boolean | undefined;
1287
+ risk_threshold?: number | undefined;
1288
+ required_approvals?: number | undefined;
1289
+ require_code_owner_approval?: boolean | undefined;
1290
+ code_owner_reviewers?: string[] | undefined;
1291
+ sensitive_paths?: string[] | undefined;
1292
+ strict_on_unknown_provenance?: boolean | undefined;
1293
+ }>>;
1294
+ session_correlation: z.ZodDefault<z.ZodObject<{
1295
+ enabled: z.ZodDefault<z.ZodBoolean>;
1296
+ threshold: z.ZodDefault<z.ZodNumber>;
1297
+ window_minutes: z.ZodDefault<z.ZodNumber>;
1298
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1299
+ }, "strip", z.ZodTypeAny, {
1300
+ enabled: boolean;
1301
+ mode: "warn" | "block";
1302
+ threshold: number;
1303
+ window_minutes: number;
1304
+ }, {
1305
+ enabled?: boolean | undefined;
1306
+ mode?: "warn" | "block" | undefined;
1307
+ threshold?: number | undefined;
1308
+ window_minutes?: number | undefined;
1309
+ }>>;
1310
+ ci_integrity: z.ZodDefault<z.ZodObject<{
1311
+ enabled: z.ZodDefault<z.ZodBoolean>;
1312
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1313
+ }, "strip", z.ZodTypeAny, {
1314
+ enabled: boolean;
1315
+ mode: "warn" | "block";
1316
+ }, {
1317
+ enabled?: boolean | undefined;
1318
+ mode?: "warn" | "block" | undefined;
1319
+ }>>;
1320
+ workflow_security: z.ZodDefault<z.ZodObject<{
1321
+ enabled: z.ZodDefault<z.ZodBoolean>;
1322
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1323
+ allow_unpinned_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1324
+ }, "strip", z.ZodTypeAny, {
1325
+ enabled: boolean;
1326
+ mode: "warn" | "block";
1327
+ allow_unpinned_actions: string[];
1328
+ }, {
1329
+ enabled?: boolean | undefined;
1330
+ mode?: "warn" | "block" | undefined;
1331
+ allow_unpinned_actions?: string[] | undefined;
1332
+ }>>;
1333
+ prompt_injection: z.ZodDefault<z.ZodObject<{
1334
+ enabled: z.ZodDefault<z.ZodBoolean>;
1335
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1336
+ }, "strip", z.ZodTypeAny, {
1337
+ enabled: boolean;
1338
+ mode: "warn" | "block";
1339
+ }, {
1340
+ enabled?: boolean | undefined;
1341
+ mode?: "warn" | "block" | undefined;
1342
+ }>>;
1343
+ supply_chain: z.ZodDefault<z.ZodObject<{
1344
+ enabled: z.ZodDefault<z.ZodBoolean>;
1345
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1346
+ force_score_on_critical: z.ZodDefault<z.ZodNumber>;
1347
+ }, "strip", z.ZodTypeAny, {
1348
+ enabled: boolean;
1349
+ mode: "warn" | "block";
1350
+ force_score_on_critical: number;
1351
+ }, {
1352
+ enabled?: boolean | undefined;
1353
+ mode?: "warn" | "block" | undefined;
1354
+ force_score_on_critical?: number | undefined;
1355
+ }>>;
1356
+ pr_scope: z.ZodDefault<z.ZodObject<{
1357
+ enabled: z.ZodDefault<z.ZodBoolean>;
1358
+ max_files: z.ZodDefault<z.ZodNumber>;
1359
+ max_changes: z.ZodDefault<z.ZodNumber>;
1360
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1361
+ require_plan_for_agent_prs: z.ZodDefault<z.ZodBoolean>;
1362
+ }, "strip", z.ZodTypeAny, {
1363
+ enabled: boolean;
1364
+ max_files: number;
1365
+ mode: "warn" | "block";
1366
+ max_changes: number;
1367
+ require_plan_for_agent_prs: boolean;
1368
+ }, {
1369
+ enabled?: boolean | undefined;
1370
+ max_files?: number | undefined;
1371
+ mode?: "warn" | "block" | undefined;
1372
+ max_changes?: number | undefined;
1373
+ require_plan_for_agent_prs?: boolean | undefined;
1374
+ }>>;
1375
+ duplicate_logic: z.ZodDefault<z.ZodObject<{
1376
+ enabled: z.ZodDefault<z.ZodBoolean>;
1377
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1378
+ }, "strip", z.ZodTypeAny, {
1379
+ enabled: boolean;
1380
+ mode: "warn" | "block";
1381
+ }, {
1382
+ enabled?: boolean | undefined;
1383
+ mode?: "warn" | "block" | undefined;
1384
+ }>>;
1385
+ cross_repo_impact: z.ZodDefault<z.ZodObject<{
1386
+ enabled: z.ZodDefault<z.ZodBoolean>;
1387
+ mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1388
+ consumer_registry_path: z.ZodOptional<z.ZodString>;
1389
+ }, "strip", z.ZodTypeAny, {
1390
+ enabled: boolean;
1391
+ mode: "warn" | "block";
1392
+ consumer_registry_path?: string | undefined;
1393
+ }, {
1394
+ enabled?: boolean | undefined;
1395
+ mode?: "warn" | "block" | undefined;
1396
+ consumer_registry_path?: string | undefined;
1397
+ }>>;
1398
+ }, "strip", z.ZodTypeAny, {
1399
+ ci_integrity: {
1400
+ enabled: boolean;
1401
+ mode: "warn" | "block";
1402
+ };
1403
+ workflow_security: {
1404
+ enabled: boolean;
1405
+ mode: "warn" | "block";
1406
+ allow_unpinned_actions: string[];
1407
+ };
1408
+ supply_chain: {
1409
+ enabled: boolean;
1410
+ mode: "warn" | "block";
1411
+ force_score_on_critical: number;
1412
+ };
1413
+ pr_scope: {
1414
+ enabled: boolean;
1415
+ max_files: number;
1416
+ mode: "warn" | "block";
1417
+ max_changes: number;
1418
+ require_plan_for_agent_prs: boolean;
1419
+ };
1420
+ duplicate_logic: {
1421
+ enabled: boolean;
1422
+ mode: "warn" | "block";
1423
+ };
1424
+ cross_repo_impact: {
1425
+ enabled: boolean;
1426
+ mode: "warn" | "block";
1427
+ consumer_registry_path?: string | undefined;
1428
+ };
1429
+ session_correlation: {
1430
+ enabled: boolean;
1431
+ mode: "warn" | "block";
1432
+ threshold: number;
1433
+ window_minutes: number;
1434
+ };
1435
+ agent_prs: {
1436
+ enabled: boolean;
1437
+ required_approvals: number;
1438
+ require_code_owner_approval: boolean;
1439
+ code_owner_reviewers: string[];
1440
+ sensitive_paths: string[];
1441
+ strict_on_unknown_provenance: boolean;
1442
+ risk_threshold?: number | undefined;
1443
+ };
1444
+ prompt_injection: {
1445
+ enabled: boolean;
1446
+ mode: "warn" | "block";
1447
+ };
1448
+ }, {
1449
+ ci_integrity?: {
1450
+ enabled?: boolean | undefined;
1451
+ mode?: "warn" | "block" | undefined;
1452
+ } | undefined;
1453
+ workflow_security?: {
1454
+ enabled?: boolean | undefined;
1455
+ mode?: "warn" | "block" | undefined;
1456
+ allow_unpinned_actions?: string[] | undefined;
1457
+ } | undefined;
1458
+ supply_chain?: {
1459
+ enabled?: boolean | undefined;
1460
+ mode?: "warn" | "block" | undefined;
1461
+ force_score_on_critical?: number | undefined;
1462
+ } | undefined;
1463
+ pr_scope?: {
1464
+ enabled?: boolean | undefined;
1465
+ max_files?: number | undefined;
1466
+ mode?: "warn" | "block" | undefined;
1467
+ max_changes?: number | undefined;
1468
+ require_plan_for_agent_prs?: boolean | undefined;
1469
+ } | undefined;
1470
+ duplicate_logic?: {
1471
+ enabled?: boolean | undefined;
1472
+ mode?: "warn" | "block" | undefined;
1473
+ } | undefined;
1474
+ cross_repo_impact?: {
1475
+ enabled?: boolean | undefined;
1476
+ mode?: "warn" | "block" | undefined;
1477
+ consumer_registry_path?: string | undefined;
1478
+ } | undefined;
1479
+ session_correlation?: {
1480
+ enabled?: boolean | undefined;
1481
+ mode?: "warn" | "block" | undefined;
1482
+ threshold?: number | undefined;
1483
+ window_minutes?: number | undefined;
1484
+ } | undefined;
1485
+ agent_prs?: {
1486
+ enabled?: boolean | undefined;
1487
+ risk_threshold?: number | undefined;
1488
+ required_approvals?: number | undefined;
1489
+ require_code_owner_approval?: boolean | undefined;
1490
+ code_owner_reviewers?: string[] | undefined;
1491
+ sensitive_paths?: string[] | undefined;
1492
+ strict_on_unknown_provenance?: boolean | undefined;
1493
+ } | undefined;
1494
+ prompt_injection?: {
1495
+ enabled?: boolean | undefined;
1496
+ mode?: "warn" | "block" | undefined;
1497
+ } | undefined;
1498
+ }>>;
1499
+ }, "strip", z.ZodTypeAny, {
1500
+ schema_version: number;
1501
+ services: Record<string, {
1502
+ consumers: (string | {
1503
+ repo: string;
1504
+ name?: string | undefined;
1505
+ branch?: string | undefined;
1506
+ notify_webhook?: string | undefined;
1507
+ })[];
1508
+ paths: string[];
1509
+ contracts: string[];
1510
+ environment?: string | undefined;
1511
+ notify_webhook?: string | undefined;
1512
+ }>;
1513
+ weights: Record<string, number>;
1514
+ thresholds: {
1515
+ warn?: number | undefined;
1516
+ risk?: number | undefined;
1517
+ };
1518
+ gate: {
1519
+ mode: "release-ready" | "advisory" | "risk-only";
1520
+ check_name: string;
1521
+ };
1522
+ contexts: {
1523
+ name: string;
1524
+ match: {
1525
+ base_branch: string[];
1526
+ head_branch: string[];
1527
+ labels: string[];
1528
+ };
1529
+ ci: {
1530
+ required_checks: string[];
1531
+ optional_checks: string[];
1532
+ missing_required: "fail" | "skip";
1533
+ };
1534
+ thresholds: {
1535
+ warn?: number | undefined;
1536
+ risk?: number | undefined;
1537
+ };
1538
+ environment?: string | undefined;
1539
+ }[];
1540
+ sensitivity: {
1541
+ high: string[];
1542
+ medium: string[];
1543
+ low: string[];
1544
+ };
1545
+ profiles: {
1546
+ match: {
1547
+ files_include: string[];
1548
+ files_exclude: string[];
1549
+ min_files?: number | undefined;
1550
+ max_files?: number | undefined;
1551
+ };
1552
+ weights: Record<string, number>;
1553
+ name?: string | undefined;
1554
+ }[];
1555
+ ignore: string[];
1556
+ freeze: {
1557
+ days: string[];
1558
+ timezone: string;
1559
+ message?: string | undefined;
1560
+ afterHour?: number | undefined;
1561
+ beforeHour?: number | undefined;
1562
+ }[];
1563
+ environments: Record<string, {
1564
+ warn?: number | undefined;
1565
+ risk?: number | undefined;
1566
+ require_security_clear?: boolean | undefined;
1567
+ }>;
1568
+ consumer_registry: Record<string, {
1569
+ repo: string;
1570
+ name?: string | undefined;
1571
+ branch?: string | undefined;
1572
+ notify_webhook?: string | undefined;
1573
+ }>;
1574
+ security: {
1575
+ severity_threshold: "error" | "warning" | "note" | "none";
1576
+ block_on_critical: boolean;
1577
+ ignore_rules: string[];
1578
+ };
1579
+ escalation: {
1580
+ acknowledge_sla_minutes: number;
1581
+ resolve_sla_minutes: number;
1582
+ targets: string[];
1583
+ };
1584
+ policies: {
1585
+ ci_integrity: {
1586
+ enabled: boolean;
1587
+ mode: "warn" | "block";
1588
+ };
1589
+ workflow_security: {
1590
+ enabled: boolean;
1591
+ mode: "warn" | "block";
1592
+ allow_unpinned_actions: string[];
1593
+ };
1594
+ supply_chain: {
1595
+ enabled: boolean;
1596
+ mode: "warn" | "block";
1597
+ force_score_on_critical: number;
1598
+ };
1599
+ pr_scope: {
1600
+ enabled: boolean;
1601
+ max_files: number;
1602
+ mode: "warn" | "block";
1603
+ max_changes: number;
1604
+ require_plan_for_agent_prs: boolean;
1605
+ };
1606
+ duplicate_logic: {
1607
+ enabled: boolean;
1608
+ mode: "warn" | "block";
1609
+ };
1610
+ cross_repo_impact: {
1611
+ enabled: boolean;
1612
+ mode: "warn" | "block";
1613
+ consumer_registry_path?: string | undefined;
1614
+ };
1615
+ session_correlation: {
1616
+ enabled: boolean;
1617
+ mode: "warn" | "block";
1618
+ threshold: number;
1619
+ window_minutes: number;
1620
+ };
1621
+ agent_prs: {
1622
+ enabled: boolean;
1623
+ required_approvals: number;
1624
+ require_code_owner_approval: boolean;
1625
+ code_owner_reviewers: string[];
1626
+ sensitive_paths: string[];
1627
+ strict_on_unknown_provenance: boolean;
1628
+ risk_threshold?: number | undefined;
1629
+ };
1630
+ prompt_injection: {
1631
+ enabled: boolean;
1632
+ mode: "warn" | "block";
1633
+ };
1634
+ };
1635
+ canary?: {
1636
+ webhook_type: "vercel" | "generic";
1637
+ rollback_on_failure: boolean;
1638
+ field_map?: Record<string, string> | undefined;
1639
+ } | undefined;
1640
+ }, {
1641
+ schema_version?: number | undefined;
1642
+ services?: Record<string, {
1643
+ paths: string[];
1644
+ environment?: string | undefined;
1645
+ consumers?: (string | {
1646
+ repo: string;
1647
+ name?: string | undefined;
1648
+ branch?: string | undefined;
1649
+ notify_webhook?: string | undefined;
1650
+ })[] | undefined;
1651
+ notify_webhook?: string | undefined;
1652
+ contracts?: string[] | undefined;
1653
+ }> | undefined;
1654
+ weights?: Record<string, number> | undefined;
1655
+ thresholds?: {
1656
+ warn?: number | undefined;
1657
+ risk?: number | undefined;
1658
+ } | undefined;
1659
+ gate?: {
1660
+ mode?: "release-ready" | "advisory" | "risk-only" | undefined;
1661
+ check_name?: string | undefined;
1662
+ } | undefined;
1663
+ contexts?: {
1664
+ name: string;
1665
+ match: {
1666
+ base_branch?: string[] | undefined;
1667
+ head_branch?: string[] | undefined;
1668
+ labels?: string[] | undefined;
1669
+ };
1670
+ environment?: string | undefined;
1671
+ ci?: {
1672
+ required_checks?: string[] | undefined;
1673
+ optional_checks?: string[] | undefined;
1674
+ missing_required?: "fail" | "skip" | undefined;
1675
+ } | undefined;
1676
+ thresholds?: {
1677
+ warn?: number | undefined;
1678
+ risk?: number | undefined;
1679
+ } | undefined;
1680
+ }[] | undefined;
1681
+ sensitivity?: {
1682
+ high?: string[] | undefined;
1683
+ medium?: string[] | undefined;
1684
+ low?: string[] | undefined;
1685
+ } | undefined;
1686
+ profiles?: {
1687
+ match: {
1688
+ files_include?: string[] | undefined;
1689
+ files_exclude?: string[] | undefined;
1690
+ min_files?: number | undefined;
1691
+ max_files?: number | undefined;
1692
+ };
1693
+ name?: string | undefined;
1694
+ weights?: Record<string, number> | undefined;
1695
+ }[] | undefined;
1696
+ ignore?: string[] | undefined;
1697
+ freeze?: {
1698
+ message?: string | undefined;
1699
+ days?: string[] | undefined;
1700
+ afterHour?: number | undefined;
1701
+ beforeHour?: number | undefined;
1702
+ timezone?: string | undefined;
1703
+ }[] | undefined;
1704
+ environments?: Record<string, {
1705
+ warn?: number | undefined;
1706
+ risk?: number | undefined;
1707
+ require_security_clear?: boolean | undefined;
1708
+ }> | undefined;
1709
+ consumer_registry?: Record<string, {
1710
+ repo: string;
1711
+ name?: string | undefined;
1712
+ branch?: string | undefined;
1713
+ notify_webhook?: string | undefined;
1714
+ }> | undefined;
1715
+ security?: {
1716
+ severity_threshold?: "error" | "warning" | "note" | "none" | undefined;
1717
+ block_on_critical?: boolean | undefined;
1718
+ ignore_rules?: string[] | undefined;
1719
+ } | undefined;
1720
+ canary?: {
1721
+ webhook_type?: "vercel" | "generic" | undefined;
1722
+ field_map?: Record<string, string> | undefined;
1723
+ rollback_on_failure?: boolean | undefined;
1724
+ } | undefined;
1725
+ escalation?: {
1726
+ acknowledge_sla_minutes?: number | undefined;
1727
+ resolve_sla_minutes?: number | undefined;
1728
+ targets?: string[] | undefined;
1729
+ } | undefined;
1730
+ policies?: {
1731
+ ci_integrity?: {
1732
+ enabled?: boolean | undefined;
1733
+ mode?: "warn" | "block" | undefined;
1734
+ } | undefined;
1735
+ workflow_security?: {
1736
+ enabled?: boolean | undefined;
1737
+ mode?: "warn" | "block" | undefined;
1738
+ allow_unpinned_actions?: string[] | undefined;
1739
+ } | undefined;
1740
+ supply_chain?: {
1741
+ enabled?: boolean | undefined;
1742
+ mode?: "warn" | "block" | undefined;
1743
+ force_score_on_critical?: number | undefined;
1744
+ } | undefined;
1745
+ pr_scope?: {
1746
+ enabled?: boolean | undefined;
1747
+ max_files?: number | undefined;
1748
+ mode?: "warn" | "block" | undefined;
1749
+ max_changes?: number | undefined;
1750
+ require_plan_for_agent_prs?: boolean | undefined;
1751
+ } | undefined;
1752
+ duplicate_logic?: {
1753
+ enabled?: boolean | undefined;
1754
+ mode?: "warn" | "block" | undefined;
1755
+ } | undefined;
1756
+ cross_repo_impact?: {
1757
+ enabled?: boolean | undefined;
1758
+ mode?: "warn" | "block" | undefined;
1759
+ consumer_registry_path?: string | undefined;
1760
+ } | undefined;
1761
+ session_correlation?: {
1762
+ enabled?: boolean | undefined;
1763
+ mode?: "warn" | "block" | undefined;
1764
+ threshold?: number | undefined;
1765
+ window_minutes?: number | undefined;
1766
+ } | undefined;
1767
+ agent_prs?: {
1768
+ enabled?: boolean | undefined;
1769
+ risk_threshold?: number | undefined;
1770
+ required_approvals?: number | undefined;
1771
+ require_code_owner_approval?: boolean | undefined;
1772
+ code_owner_reviewers?: string[] | undefined;
1773
+ sensitive_paths?: string[] | undefined;
1774
+ strict_on_unknown_provenance?: boolean | undefined;
1775
+ } | undefined;
1776
+ prompt_injection?: {
1777
+ enabled?: boolean | undefined;
1778
+ mode?: "warn" | "block" | undefined;
1779
+ } | undefined;
1780
+ } | undefined;
1781
+ }>;
1782
+ export type RepoConfig = z.infer<typeof RepoConfig>;
1783
+ export interface TrailheadConfig {
1784
+ apiKey: string;
1785
+ apiUrl: string;
1786
+ githubToken?: string;
1787
+ healthCheckUrls: string[];
1788
+ riskThreshold: number;
1789
+ warnThreshold?: number;
1790
+ failMode: "open" | "closed";
1791
+ selfHeal: boolean;
1792
+ addRiskLabels: boolean;
1793
+ reviewersOnRisk: string[];
1794
+ webhookUrl?: string;
1795
+ webhookEvents: string[];
1796
+ evaluationStoreUrl?: string;
1797
+ trailheadApiKey?: string;
1798
+ environment?: string;
1799
+ securityGate?: boolean;
1800
+ gateMode?: GateMode;
1801
+ waitForChecks?: boolean;
1802
+ waitTimeoutMinutes?: number;
1803
+ checkName?: string;
1804
+ ciManifest?: CiManifest | null;
1805
+ ciManifestPath?: string;
1806
+ }
1807
+ export interface TestRepairResult {
1808
+ testFile: string;
1809
+ failureType: string;
1810
+ strategy: string;
1811
+ success: boolean;
1812
+ diff?: string;
1813
+ }