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