@komatikai/trailhead 4.4.4 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +43 -39
  2. package/dist/index.js +12147 -271
  3. package/dist/index.js.map +1 -1
  4. package/dist/licenses.txt +51 -0
  5. package/dist/sourcemap-register.js +1 -0
  6. package/package.json +8 -7
  7. package/dist/index.d.ts +0 -2
  8. package/dist/run-doctor.d.ts +0 -1
  9. package/dist/run-doctor.js +0 -83
  10. package/dist/run-doctor.js.map +0 -1
  11. package/dist/shared/ci-core.d.ts +0 -18
  12. package/dist/shared/ci-core.js +0 -210
  13. package/dist/shared/ci-core.js.map +0 -1
  14. package/dist/shared/ci-manifest.d.ts +0 -82
  15. package/dist/shared/ci-manifest.js +0 -51
  16. package/dist/shared/ci-manifest.js.map +0 -1
  17. package/dist/shared/config-core.d.ts +0 -5
  18. package/dist/shared/config-core.js +0 -127
  19. package/dist/shared/config-core.js.map +0 -1
  20. package/dist/shared/doctor.d.ts +0 -48
  21. package/dist/shared/doctor.js +0 -308
  22. package/dist/shared/doctor.js.map +0 -1
  23. package/dist/shared/release-ready.d.ts +0 -27
  24. package/dist/shared/release-ready.js +0 -97
  25. package/dist/shared/release-ready.js.map +0 -1
  26. package/dist/shared/submission-checks/detectors.d.ts +0 -23
  27. package/dist/shared/submission-checks/detectors.js +0 -547
  28. package/dist/shared/submission-checks/detectors.js.map +0 -1
  29. package/dist/shared/submission-checks/helpers.d.ts +0 -30
  30. package/dist/shared/submission-checks/helpers.js +0 -119
  31. package/dist/shared/submission-checks/helpers.js.map +0 -1
  32. package/dist/shared/submission-checks/phase0-detectors.d.ts +0 -18
  33. package/dist/shared/submission-checks/phase0-detectors.js +0 -374
  34. package/dist/shared/submission-checks/phase0-detectors.js.map +0 -1
  35. package/dist/shared/submission-checks/syntax-validity.d.ts +0 -2
  36. package/dist/shared/submission-checks/syntax-validity.js +0 -44
  37. package/dist/shared/submission-checks/syntax-validity.js.map +0 -1
  38. package/dist/shared/submission-checks/types.d.ts +0 -33
  39. package/dist/shared/submission-checks/types.js +0 -2
  40. package/dist/shared/submission-checks/types.js.map +0 -1
  41. package/dist/shared/submission-engine.d.ts +0 -19
  42. package/dist/shared/submission-engine.js +0 -51
  43. package/dist/shared/submission-engine.js.map +0 -1
  44. package/dist/shared/types.d.ts +0 -2644
  45. package/dist/shared/types.js +0 -487
  46. package/dist/shared/types.js.map +0 -1
@@ -1,2644 +0,0 @@
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 SubmissionCheckCode: z.ZodEnum<["artifact_integrity", "mock_placeholder", "context_freshness", "destructive_sql", "secrets", "path_format", "syntax_validity", "import_resolution", "rls_new_tables", "auth_route_auth", "hardcoded_env", "external_package_deps", "sql_syntax_basic", "large_file", "soul_integrity", "output_size_min", "action_extraction_present", "delta_section_present", "preamble_absent", "graduation_signals_section_present", "fabricated_id_check", "session_narrative_detection", "incompleteness_self_flag", "referenced_files_exist", "prerequisite_secrets_check", "dependency_dag_validation", "uncommitted_fix_check", "verification_owner_assigned", "external_interface_validation"]>;
140
- export type SubmissionCheckCode = z.infer<typeof SubmissionCheckCode>;
141
- export declare const SubmissionCheckResult: z.ZodObject<{
142
- code: z.ZodEnum<["artifact_integrity", "mock_placeholder", "context_freshness", "destructive_sql", "secrets", "path_format", "syntax_validity", "import_resolution", "rls_new_tables", "auth_route_auth", "hardcoded_env", "external_package_deps", "sql_syntax_basic", "large_file", "soul_integrity", "output_size_min", "action_extraction_present", "delta_section_present", "preamble_absent", "graduation_signals_section_present", "fabricated_id_check", "session_narrative_detection", "incompleteness_self_flag", "referenced_files_exist", "prerequisite_secrets_check", "dependency_dag_validation", "uncommitted_fix_check", "verification_owner_assigned", "external_interface_validation"]>;
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
- autofix_eligible: z.ZodDefault<z.ZodBoolean>;
149
- }, "strip", z.ZodTypeAny, {
150
- code: "artifact_integrity" | "mock_placeholder" | "context_freshness" | "destructive_sql" | "secrets" | "path_format" | "syntax_validity" | "import_resolution" | "rls_new_tables" | "auth_route_auth" | "hardcoded_env" | "external_package_deps" | "sql_syntax_basic" | "large_file" | "soul_integrity" | "output_size_min" | "action_extraction_present" | "delta_section_present" | "preamble_absent" | "graduation_signals_section_present" | "fabricated_id_check" | "session_narrative_detection" | "incompleteness_self_flag" | "referenced_files_exist" | "prerequisite_secrets_check" | "dependency_dag_validation" | "uncommitted_fix_check" | "verification_owner_assigned" | "external_interface_validation";
151
- detail: string;
152
- severity: "warn" | "advisory" | "blocking";
153
- title: string;
154
- files: string[];
155
- autofix_eligible: boolean;
156
- suggested_action?: string | undefined;
157
- }, {
158
- code: "artifact_integrity" | "mock_placeholder" | "context_freshness" | "destructive_sql" | "secrets" | "path_format" | "syntax_validity" | "import_resolution" | "rls_new_tables" | "auth_route_auth" | "hardcoded_env" | "external_package_deps" | "sql_syntax_basic" | "large_file" | "soul_integrity" | "output_size_min" | "action_extraction_present" | "delta_section_present" | "preamble_absent" | "graduation_signals_section_present" | "fabricated_id_check" | "session_narrative_detection" | "incompleteness_self_flag" | "referenced_files_exist" | "prerequisite_secrets_check" | "dependency_dag_validation" | "uncommitted_fix_check" | "verification_owner_assigned" | "external_interface_validation";
159
- detail: string;
160
- severity: "warn" | "advisory" | "blocking";
161
- title: string;
162
- files?: string[] | undefined;
163
- suggested_action?: string | undefined;
164
- autofix_eligible?: boolean | undefined;
165
- }>;
166
- export type SubmissionCheckResult = z.infer<typeof SubmissionCheckResult>;
167
- export declare const RemediationAutofixClass: z.ZodEnum<["format", "lint", "import-fix", "type-narrow", "test-scaffold", "doc-update", "dependency-bump"]>;
168
- export type RemediationAutofixClass = z.infer<typeof RemediationAutofixClass>;
169
- export declare const RemediationFix: z.ZodObject<{
170
- code: z.ZodString;
171
- severity: z.ZodEnum<["blocking", "warn", "advisory"]>;
172
- title: z.ZodString;
173
- detail: z.ZodString;
174
- files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
175
- suggested_action: z.ZodOptional<z.ZodString>;
176
- suggested_command: z.ZodOptional<z.ZodString>;
177
- autofix_eligible: z.ZodDefault<z.ZodBoolean>;
178
- autofix_class: z.ZodOptional<z.ZodEnum<["format", "lint", "import-fix", "type-narrow", "test-scaffold", "doc-update", "dependency-bump"]>>;
179
- policy_link: z.ZodOptional<z.ZodString>;
180
- }, "strip", z.ZodTypeAny, {
181
- code: string;
182
- detail: string;
183
- severity: "warn" | "advisory" | "blocking";
184
- title: string;
185
- files: string[];
186
- autofix_eligible: boolean;
187
- suggested_action?: string | undefined;
188
- suggested_command?: string | undefined;
189
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
190
- policy_link?: string | undefined;
191
- }, {
192
- code: string;
193
- detail: string;
194
- severity: "warn" | "advisory" | "blocking";
195
- title: string;
196
- files?: string[] | undefined;
197
- suggested_action?: string | undefined;
198
- autofix_eligible?: boolean | undefined;
199
- suggested_command?: string | undefined;
200
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
201
- policy_link?: string | undefined;
202
- }>;
203
- export type RemediationFix = z.infer<typeof RemediationFix>;
204
- export declare const RemediationNextAction: z.ZodEnum<["ready_to_merge", "fix_and_retry", "human_review_required", "max_rounds_exceeded"]>;
205
- export type RemediationNextAction = z.infer<typeof RemediationNextAction>;
206
- export declare const Remediation: z.ZodObject<{
207
- schema: z.ZodDefault<z.ZodLiteral<"trailhead.remediation.v1">>;
208
- release_ready: z.ZodBoolean;
209
- fixes: z.ZodArray<z.ZodObject<{
210
- code: z.ZodString;
211
- severity: z.ZodEnum<["blocking", "warn", "advisory"]>;
212
- title: z.ZodString;
213
- detail: z.ZodString;
214
- files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
215
- suggested_action: z.ZodOptional<z.ZodString>;
216
- suggested_command: z.ZodOptional<z.ZodString>;
217
- autofix_eligible: z.ZodDefault<z.ZodBoolean>;
218
- autofix_class: z.ZodOptional<z.ZodEnum<["format", "lint", "import-fix", "type-narrow", "test-scaffold", "doc-update", "dependency-bump"]>>;
219
- policy_link: z.ZodOptional<z.ZodString>;
220
- }, "strip", z.ZodTypeAny, {
221
- code: string;
222
- detail: string;
223
- severity: "warn" | "advisory" | "blocking";
224
- title: string;
225
- files: string[];
226
- autofix_eligible: boolean;
227
- suggested_action?: string | undefined;
228
- suggested_command?: string | undefined;
229
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
230
- policy_link?: string | undefined;
231
- }, {
232
- code: string;
233
- detail: string;
234
- severity: "warn" | "advisory" | "blocking";
235
- title: string;
236
- files?: string[] | undefined;
237
- suggested_action?: string | undefined;
238
- autofix_eligible?: boolean | undefined;
239
- suggested_command?: string | undefined;
240
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
241
- policy_link?: string | undefined;
242
- }>, "many">;
243
- blocking_count: z.ZodNumber;
244
- warn_count: z.ZodNumber;
245
- advisory_count: z.ZodNumber;
246
- autofix_eligible_count: z.ZodNumber;
247
- loop_round: z.ZodDefault<z.ZodNumber>;
248
- max_loop_rounds: z.ZodDefault<z.ZodNumber>;
249
- previous_evaluation_id: z.ZodOptional<z.ZodString>;
250
- fixes_resolved: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
251
- fixes_introduced: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
252
- next_action: z.ZodEnum<["ready_to_merge", "fix_and_retry", "human_review_required", "max_rounds_exceeded"]>;
253
- }, "strip", z.ZodTypeAny, {
254
- schema: "trailhead.remediation.v1";
255
- release_ready: boolean;
256
- fixes: {
257
- code: string;
258
- detail: string;
259
- severity: "warn" | "advisory" | "blocking";
260
- title: string;
261
- files: string[];
262
- autofix_eligible: boolean;
263
- suggested_action?: string | undefined;
264
- suggested_command?: string | undefined;
265
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
266
- policy_link?: string | undefined;
267
- }[];
268
- blocking_count: number;
269
- warn_count: number;
270
- advisory_count: number;
271
- autofix_eligible_count: number;
272
- loop_round: number;
273
- max_loop_rounds: number;
274
- fixes_resolved: string[];
275
- fixes_introduced: string[];
276
- next_action: "ready_to_merge" | "fix_and_retry" | "human_review_required" | "max_rounds_exceeded";
277
- previous_evaluation_id?: string | undefined;
278
- }, {
279
- release_ready: boolean;
280
- fixes: {
281
- code: string;
282
- detail: string;
283
- severity: "warn" | "advisory" | "blocking";
284
- title: string;
285
- files?: string[] | undefined;
286
- suggested_action?: string | undefined;
287
- autofix_eligible?: boolean | undefined;
288
- suggested_command?: string | undefined;
289
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
290
- policy_link?: string | undefined;
291
- }[];
292
- blocking_count: number;
293
- warn_count: number;
294
- advisory_count: number;
295
- autofix_eligible_count: number;
296
- next_action: "ready_to_merge" | "fix_and_retry" | "human_review_required" | "max_rounds_exceeded";
297
- schema?: "trailhead.remediation.v1" | undefined;
298
- loop_round?: number | undefined;
299
- max_loop_rounds?: number | undefined;
300
- previous_evaluation_id?: string | undefined;
301
- fixes_resolved?: string[] | undefined;
302
- fixes_introduced?: string[] | undefined;
303
- }>;
304
- export type Remediation = z.infer<typeof Remediation>;
305
- export declare const PolicyOverrideChanges: z.ZodObject<{
306
- failMode: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
307
- riskThreshold: z.ZodOptional<z.ZodNumber>;
308
- warnThreshold: z.ZodOptional<z.ZodNumber>;
309
- releaseReady: z.ZodOptional<z.ZodLiteral<true>>;
310
- }, "strip", z.ZodTypeAny, {
311
- failMode?: "open" | "closed" | undefined;
312
- riskThreshold?: number | undefined;
313
- warnThreshold?: number | undefined;
314
- releaseReady?: true | undefined;
315
- }, {
316
- failMode?: "open" | "closed" | undefined;
317
- riskThreshold?: number | undefined;
318
- warnThreshold?: number | undefined;
319
- releaseReady?: true | undefined;
320
- }>;
321
- export type PolicyOverrideChanges = z.infer<typeof PolicyOverrideChanges>;
322
- export declare const PolicyOverrideAudit: z.ZodObject<{
323
- source: z.ZodDefault<z.ZodEnum<["workflow", "label"]>>;
324
- owner: z.ZodString;
325
- reason: z.ZodString;
326
- linkedTicket: z.ZodString;
327
- expiresAt: z.ZodString;
328
- appliedAt: z.ZodString;
329
- changes: z.ZodDefault<z.ZodObject<{
330
- failMode: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
331
- riskThreshold: z.ZodOptional<z.ZodNumber>;
332
- warnThreshold: z.ZodOptional<z.ZodNumber>;
333
- releaseReady: z.ZodOptional<z.ZodLiteral<true>>;
334
- }, "strip", z.ZodTypeAny, {
335
- failMode?: "open" | "closed" | undefined;
336
- riskThreshold?: number | undefined;
337
- warnThreshold?: number | undefined;
338
- releaseReady?: true | undefined;
339
- }, {
340
- failMode?: "open" | "closed" | undefined;
341
- riskThreshold?: number | undefined;
342
- warnThreshold?: number | undefined;
343
- releaseReady?: true | undefined;
344
- }>>;
345
- preOverrideDecision: z.ZodOptional<z.ZodEnum<["allow", "warn", "block"]>>;
346
- preOverrideReleaseReady: z.ZodOptional<z.ZodBoolean>;
347
- preOverrideReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
348
- }, "strip", z.ZodTypeAny, {
349
- reason: string;
350
- source: "workflow" | "label";
351
- owner: string;
352
- linkedTicket: string;
353
- expiresAt: string;
354
- appliedAt: string;
355
- changes: {
356
- failMode?: "open" | "closed" | undefined;
357
- riskThreshold?: number | undefined;
358
- warnThreshold?: number | undefined;
359
- releaseReady?: true | undefined;
360
- };
361
- preOverrideDecision?: "allow" | "warn" | "block" | undefined;
362
- preOverrideReleaseReady?: boolean | undefined;
363
- preOverrideReasons?: string[] | undefined;
364
- }, {
365
- reason: string;
366
- owner: string;
367
- linkedTicket: string;
368
- expiresAt: string;
369
- appliedAt: string;
370
- source?: "workflow" | "label" | undefined;
371
- changes?: {
372
- failMode?: "open" | "closed" | undefined;
373
- riskThreshold?: number | undefined;
374
- warnThreshold?: number | undefined;
375
- releaseReady?: true | undefined;
376
- } | undefined;
377
- preOverrideDecision?: "allow" | "warn" | "block" | undefined;
378
- preOverrideReleaseReady?: boolean | undefined;
379
- preOverrideReasons?: string[] | undefined;
380
- }>;
381
- export type PolicyOverrideAudit = z.infer<typeof PolicyOverrideAudit>;
382
- export declare const CreditMeterResult: z.ZodObject<{
383
- metered: z.ZodBoolean;
384
- skipped: z.ZodOptional<z.ZodBoolean>;
385
- reason: z.ZodOptional<z.ZodString>;
386
- shadow: z.ZodOptional<z.ZodBoolean>;
387
- would_charge: z.ZodOptional<z.ZodNumber>;
388
- charged: z.ZodOptional<z.ZodNumber>;
389
- balance: z.ZodOptional<z.ZodNumber>;
390
- allowed: z.ZodOptional<z.ZodBoolean>;
391
- ok: z.ZodOptional<z.ZodBoolean>;
392
- }, "strip", z.ZodTypeAny, {
393
- metered: boolean;
394
- skipped?: boolean | undefined;
395
- reason?: string | undefined;
396
- shadow?: boolean | undefined;
397
- would_charge?: number | undefined;
398
- charged?: number | undefined;
399
- balance?: number | undefined;
400
- allowed?: boolean | undefined;
401
- ok?: boolean | undefined;
402
- }, {
403
- metered: boolean;
404
- skipped?: boolean | undefined;
405
- reason?: string | undefined;
406
- shadow?: boolean | undefined;
407
- would_charge?: number | undefined;
408
- charged?: number | undefined;
409
- balance?: number | undefined;
410
- allowed?: boolean | undefined;
411
- ok?: boolean | undefined;
412
- }>;
413
- export type CreditMeterResult = z.infer<typeof CreditMeterResult>;
414
- export declare const GateEvaluation: z.ZodObject<{
415
- id: z.ZodString;
416
- repoId: z.ZodString;
417
- commitSha: z.ZodString;
418
- prNumber: z.ZodOptional<z.ZodNumber>;
419
- healthScore: z.ZodNumber;
420
- riskScore: z.ZodNumber;
421
- gateDecision: z.ZodEnum<["allow", "warn", "block"]>;
422
- healthChecks: z.ZodArray<z.ZodObject<{
423
- target: z.ZodString;
424
- status: z.ZodEnum<["allow", "warn", "block"]>;
425
- latencyMs: z.ZodNumber;
426
- detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
427
- }, "strip", z.ZodTypeAny, {
428
- status: "allow" | "warn" | "block";
429
- target: string;
430
- latencyMs: number;
431
- detail?: Record<string, unknown> | undefined;
432
- }, {
433
- status: "allow" | "warn" | "block";
434
- target: string;
435
- latencyMs: number;
436
- detail?: Record<string, unknown> | undefined;
437
- }>, "many">;
438
- riskFactors: z.ZodArray<z.ZodObject<{
439
- 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"]>;
440
- score: z.ZodNumber;
441
- detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
442
- }, "strip", z.ZodTypeAny, {
443
- 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";
444
- score: number;
445
- detail?: Record<string, unknown> | undefined;
446
- }, {
447
- 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";
448
- score: number;
449
- detail?: Record<string, unknown> | undefined;
450
- }>, "many">;
451
- files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
452
- evaluationMs: z.ZodNumber;
453
- reportUrl: z.ZodOptional<z.ZodString>;
454
- environment: z.ZodOptional<z.ZodString>;
455
- service: z.ZodOptional<z.ZodString>;
456
- policyFindings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
457
- pr: z.ZodOptional<z.ZodObject<{
458
- provenance: z.ZodOptional<z.ZodObject<{
459
- type: z.ZodEnum<["human", "dependabot", "copilot", "codex", "claude", "custom-bot", "unknown"]>;
460
- confidence: z.ZodNumber;
461
- source: z.ZodOptional<z.ZodString>;
462
- }, "strip", z.ZodTypeAny, {
463
- type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
464
- confidence: number;
465
- source?: string | undefined;
466
- }, {
467
- type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
468
- confidence: number;
469
- source?: string | undefined;
470
- }>>;
471
- headRef: z.ZodOptional<z.ZodString>;
472
- }, "strip", z.ZodTypeAny, {
473
- provenance?: {
474
- type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
475
- confidence: number;
476
- source?: string | undefined;
477
- } | undefined;
478
- headRef?: string | undefined;
479
- }, {
480
- provenance?: {
481
- type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
482
- confidence: number;
483
- source?: string | undefined;
484
- } | undefined;
485
- headRef?: string | undefined;
486
- }>>;
487
- session_correlation: z.ZodOptional<z.ZodObject<{
488
- burst_count: z.ZodNumber;
489
- window: z.ZodString;
490
- }, "strip", z.ZodTypeAny, {
491
- burst_count: number;
492
- window: string;
493
- }, {
494
- burst_count: number;
495
- window: string;
496
- }>>;
497
- escalation_status: z.ZodOptional<z.ZodObject<{
498
- enabled: z.ZodBoolean;
499
- target_count: z.ZodNumber;
500
- acknowledge_sla_minutes: z.ZodOptional<z.ZodNumber>;
501
- resolve_sla_minutes: z.ZodOptional<z.ZodNumber>;
502
- }, "strip", z.ZodTypeAny, {
503
- enabled: boolean;
504
- target_count: number;
505
- acknowledge_sla_minutes?: number | undefined;
506
- resolve_sla_minutes?: number | undefined;
507
- }, {
508
- enabled: boolean;
509
- target_count: number;
510
- acknowledge_sla_minutes?: number | undefined;
511
- resolve_sla_minutes?: number | undefined;
512
- }>>;
513
- trust_profile: z.ZodOptional<z.ZodObject<{
514
- strictness: z.ZodEnum<["baseline", "elevated", "strict"]>;
515
- reason: z.ZodString;
516
- score: z.ZodOptional<z.ZodNumber>;
517
- profile: z.ZodOptional<z.ZodEnum<["fast-track", "standard", "probation"]>>;
518
- factors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
519
- }, "strip", z.ZodTypeAny, {
520
- reason: string;
521
- strictness: "baseline" | "elevated" | "strict";
522
- score?: number | undefined;
523
- profile?: "fast-track" | "standard" | "probation" | undefined;
524
- factors?: Record<string, number> | undefined;
525
- }, {
526
- reason: string;
527
- strictness: "baseline" | "elevated" | "strict";
528
- score?: number | undefined;
529
- profile?: "fast-track" | "standard" | "probation" | undefined;
530
- factors?: Record<string, number> | undefined;
531
- }>>;
532
- policyOverride: z.ZodOptional<z.ZodObject<{
533
- source: z.ZodDefault<z.ZodEnum<["workflow", "label"]>>;
534
- owner: z.ZodString;
535
- reason: z.ZodString;
536
- linkedTicket: z.ZodString;
537
- expiresAt: z.ZodString;
538
- appliedAt: z.ZodString;
539
- changes: z.ZodDefault<z.ZodObject<{
540
- failMode: z.ZodOptional<z.ZodEnum<["open", "closed"]>>;
541
- riskThreshold: z.ZodOptional<z.ZodNumber>;
542
- warnThreshold: z.ZodOptional<z.ZodNumber>;
543
- releaseReady: z.ZodOptional<z.ZodLiteral<true>>;
544
- }, "strip", z.ZodTypeAny, {
545
- failMode?: "open" | "closed" | undefined;
546
- riskThreshold?: number | undefined;
547
- warnThreshold?: number | undefined;
548
- releaseReady?: true | undefined;
549
- }, {
550
- failMode?: "open" | "closed" | undefined;
551
- riskThreshold?: number | undefined;
552
- warnThreshold?: number | undefined;
553
- releaseReady?: true | undefined;
554
- }>>;
555
- preOverrideDecision: z.ZodOptional<z.ZodEnum<["allow", "warn", "block"]>>;
556
- preOverrideReleaseReady: z.ZodOptional<z.ZodBoolean>;
557
- preOverrideReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
558
- }, "strip", z.ZodTypeAny, {
559
- reason: string;
560
- source: "workflow" | "label";
561
- owner: string;
562
- linkedTicket: string;
563
- expiresAt: string;
564
- appliedAt: string;
565
- changes: {
566
- failMode?: "open" | "closed" | undefined;
567
- riskThreshold?: number | undefined;
568
- warnThreshold?: number | undefined;
569
- releaseReady?: true | undefined;
570
- };
571
- preOverrideDecision?: "allow" | "warn" | "block" | undefined;
572
- preOverrideReleaseReady?: boolean | undefined;
573
- preOverrideReasons?: string[] | undefined;
574
- }, {
575
- reason: string;
576
- owner: string;
577
- linkedTicket: string;
578
- expiresAt: string;
579
- appliedAt: string;
580
- source?: "workflow" | "label" | undefined;
581
- changes?: {
582
- failMode?: "open" | "closed" | undefined;
583
- riskThreshold?: number | undefined;
584
- warnThreshold?: number | undefined;
585
- releaseReady?: true | undefined;
586
- } | undefined;
587
- preOverrideDecision?: "allow" | "warn" | "block" | undefined;
588
- preOverrideReleaseReady?: boolean | undefined;
589
- preOverrideReasons?: string[] | undefined;
590
- }>>;
591
- labelOverrideFeedback: z.ZodOptional<z.ZodObject<{
592
- status: z.ZodEnum<["applied", "rejected"]>;
593
- message: z.ZodString;
594
- }, "strip", z.ZodTypeAny, {
595
- message: string;
596
- status: "applied" | "rejected";
597
- }, {
598
- message: string;
599
- status: "applied" | "rejected";
600
- }>>;
601
- releaseReady: z.ZodOptional<z.ZodBoolean>;
602
- releaseReadyReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
603
- ci: z.ZodOptional<z.ZodObject<{
604
- checks: z.ZodArray<z.ZodObject<{
605
- name: z.ZodString;
606
- status: z.ZodEnum<["pass", "fail", "skip", "pending", "stale", "missing"]>;
607
- conclusion: z.ZodOptional<z.ZodString>;
608
- detailsUrl: z.ZodOptional<z.ZodString>;
609
- required: z.ZodBoolean;
610
- }, "strip", z.ZodTypeAny, {
611
- status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
612
- name: string;
613
- required: boolean;
614
- conclusion?: string | undefined;
615
- detailsUrl?: string | undefined;
616
- }, {
617
- status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
618
- name: string;
619
- required: boolean;
620
- conclusion?: string | undefined;
621
- detailsUrl?: string | undefined;
622
- }>, "many">;
623
- allRequiredPassed: z.ZodBoolean;
624
- pendingCount: z.ZodNumber;
625
- failedCount: z.ZodNumber;
626
- missingCount: z.ZodNumber;
627
- }, "strip", z.ZodTypeAny, {
628
- checks: {
629
- status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
630
- name: string;
631
- required: boolean;
632
- conclusion?: string | undefined;
633
- detailsUrl?: string | undefined;
634
- }[];
635
- allRequiredPassed: boolean;
636
- pendingCount: number;
637
- failedCount: number;
638
- missingCount: number;
639
- }, {
640
- checks: {
641
- status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
642
- name: string;
643
- required: boolean;
644
- conclusion?: string | undefined;
645
- detailsUrl?: string | undefined;
646
- }[];
647
- allRequiredPassed: boolean;
648
- pendingCount: number;
649
- failedCount: number;
650
- missingCount: number;
651
- }>>;
652
- context: z.ZodOptional<z.ZodObject<{
653
- name: z.ZodString;
654
- environment: z.ZodOptional<z.ZodString>;
655
- }, "strip", z.ZodTypeAny, {
656
- name: string;
657
- environment?: string | undefined;
658
- }, {
659
- name: string;
660
- environment?: string | undefined;
661
- }>>;
662
- gateMode: z.ZodOptional<z.ZodEnum<["release-ready", "advisory", "risk-only"]>>;
663
- storePersisted: z.ZodOptional<z.ZodBoolean>;
664
- credit_meter: z.ZodOptional<z.ZodObject<{
665
- metered: z.ZodBoolean;
666
- skipped: z.ZodOptional<z.ZodBoolean>;
667
- reason: z.ZodOptional<z.ZodString>;
668
- shadow: z.ZodOptional<z.ZodBoolean>;
669
- would_charge: z.ZodOptional<z.ZodNumber>;
670
- charged: z.ZodOptional<z.ZodNumber>;
671
- balance: z.ZodOptional<z.ZodNumber>;
672
- allowed: z.ZodOptional<z.ZodBoolean>;
673
- ok: z.ZodOptional<z.ZodBoolean>;
674
- }, "strip", z.ZodTypeAny, {
675
- metered: boolean;
676
- skipped?: boolean | undefined;
677
- reason?: string | undefined;
678
- shadow?: boolean | undefined;
679
- would_charge?: number | undefined;
680
- charged?: number | undefined;
681
- balance?: number | undefined;
682
- allowed?: boolean | undefined;
683
- ok?: boolean | undefined;
684
- }, {
685
- metered: boolean;
686
- skipped?: boolean | undefined;
687
- reason?: string | undefined;
688
- shadow?: boolean | undefined;
689
- would_charge?: number | undefined;
690
- charged?: number | undefined;
691
- balance?: number | undefined;
692
- allowed?: boolean | undefined;
693
- ok?: boolean | undefined;
694
- }>>;
695
- remediation: z.ZodOptional<z.ZodObject<{
696
- schema: z.ZodDefault<z.ZodLiteral<"trailhead.remediation.v1">>;
697
- release_ready: z.ZodBoolean;
698
- fixes: z.ZodArray<z.ZodObject<{
699
- code: z.ZodString;
700
- severity: z.ZodEnum<["blocking", "warn", "advisory"]>;
701
- title: z.ZodString;
702
- detail: z.ZodString;
703
- files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
704
- suggested_action: z.ZodOptional<z.ZodString>;
705
- suggested_command: z.ZodOptional<z.ZodString>;
706
- autofix_eligible: z.ZodDefault<z.ZodBoolean>;
707
- autofix_class: z.ZodOptional<z.ZodEnum<["format", "lint", "import-fix", "type-narrow", "test-scaffold", "doc-update", "dependency-bump"]>>;
708
- policy_link: z.ZodOptional<z.ZodString>;
709
- }, "strip", z.ZodTypeAny, {
710
- code: string;
711
- detail: string;
712
- severity: "warn" | "advisory" | "blocking";
713
- title: string;
714
- files: string[];
715
- autofix_eligible: boolean;
716
- suggested_action?: string | undefined;
717
- suggested_command?: string | undefined;
718
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
719
- policy_link?: string | undefined;
720
- }, {
721
- code: string;
722
- detail: string;
723
- severity: "warn" | "advisory" | "blocking";
724
- title: string;
725
- files?: string[] | undefined;
726
- suggested_action?: string | undefined;
727
- autofix_eligible?: boolean | undefined;
728
- suggested_command?: string | undefined;
729
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
730
- policy_link?: string | undefined;
731
- }>, "many">;
732
- blocking_count: z.ZodNumber;
733
- warn_count: z.ZodNumber;
734
- advisory_count: z.ZodNumber;
735
- autofix_eligible_count: z.ZodNumber;
736
- loop_round: z.ZodDefault<z.ZodNumber>;
737
- max_loop_rounds: z.ZodDefault<z.ZodNumber>;
738
- previous_evaluation_id: z.ZodOptional<z.ZodString>;
739
- fixes_resolved: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
740
- fixes_introduced: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
741
- next_action: z.ZodEnum<["ready_to_merge", "fix_and_retry", "human_review_required", "max_rounds_exceeded"]>;
742
- }, "strip", z.ZodTypeAny, {
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
- }, {
768
- release_ready: boolean;
769
- fixes: {
770
- code: string;
771
- detail: string;
772
- severity: "warn" | "advisory" | "blocking";
773
- title: string;
774
- files?: string[] | undefined;
775
- suggested_action?: string | undefined;
776
- autofix_eligible?: boolean | undefined;
777
- suggested_command?: string | undefined;
778
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
779
- policy_link?: string | undefined;
780
- }[];
781
- blocking_count: number;
782
- warn_count: number;
783
- advisory_count: number;
784
- autofix_eligible_count: number;
785
- next_action: "ready_to_merge" | "fix_and_retry" | "human_review_required" | "max_rounds_exceeded";
786
- schema?: "trailhead.remediation.v1" | undefined;
787
- loop_round?: number | undefined;
788
- max_loop_rounds?: number | undefined;
789
- previous_evaluation_id?: string | undefined;
790
- fixes_resolved?: string[] | undefined;
791
- fixes_introduced?: string[] | undefined;
792
- }>>;
793
- agentBriefMode: z.ZodOptional<z.ZodEnum<["off", "collapsed", "expanded"]>>;
794
- submissionChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
795
- code: z.ZodEnum<["artifact_integrity", "mock_placeholder", "context_freshness", "destructive_sql", "secrets", "path_format", "syntax_validity", "import_resolution", "rls_new_tables", "auth_route_auth", "hardcoded_env", "external_package_deps", "sql_syntax_basic", "large_file", "soul_integrity", "output_size_min", "action_extraction_present", "delta_section_present", "preamble_absent", "graduation_signals_section_present", "fabricated_id_check", "session_narrative_detection", "incompleteness_self_flag", "referenced_files_exist", "prerequisite_secrets_check", "dependency_dag_validation", "uncommitted_fix_check", "verification_owner_assigned", "external_interface_validation"]>;
796
- severity: z.ZodEnum<["blocking", "warn", "advisory"]>;
797
- title: z.ZodString;
798
- detail: z.ZodString;
799
- files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
800
- suggested_action: z.ZodOptional<z.ZodString>;
801
- autofix_eligible: z.ZodDefault<z.ZodBoolean>;
802
- }, "strip", z.ZodTypeAny, {
803
- code: "artifact_integrity" | "mock_placeholder" | "context_freshness" | "destructive_sql" | "secrets" | "path_format" | "syntax_validity" | "import_resolution" | "rls_new_tables" | "auth_route_auth" | "hardcoded_env" | "external_package_deps" | "sql_syntax_basic" | "large_file" | "soul_integrity" | "output_size_min" | "action_extraction_present" | "delta_section_present" | "preamble_absent" | "graduation_signals_section_present" | "fabricated_id_check" | "session_narrative_detection" | "incompleteness_self_flag" | "referenced_files_exist" | "prerequisite_secrets_check" | "dependency_dag_validation" | "uncommitted_fix_check" | "verification_owner_assigned" | "external_interface_validation";
804
- detail: string;
805
- severity: "warn" | "advisory" | "blocking";
806
- title: string;
807
- files: string[];
808
- autofix_eligible: boolean;
809
- suggested_action?: string | undefined;
810
- }, {
811
- code: "artifact_integrity" | "mock_placeholder" | "context_freshness" | "destructive_sql" | "secrets" | "path_format" | "syntax_validity" | "import_resolution" | "rls_new_tables" | "auth_route_auth" | "hardcoded_env" | "external_package_deps" | "sql_syntax_basic" | "large_file" | "soul_integrity" | "output_size_min" | "action_extraction_present" | "delta_section_present" | "preamble_absent" | "graduation_signals_section_present" | "fabricated_id_check" | "session_narrative_detection" | "incompleteness_self_flag" | "referenced_files_exist" | "prerequisite_secrets_check" | "dependency_dag_validation" | "uncommitted_fix_check" | "verification_owner_assigned" | "external_interface_validation";
812
- detail: string;
813
- severity: "warn" | "advisory" | "blocking";
814
- title: string;
815
- files?: string[] | undefined;
816
- suggested_action?: string | undefined;
817
- autofix_eligible?: boolean | undefined;
818
- }>, "many">>;
819
- cross_repo_impact: z.ZodOptional<z.ZodObject<{
820
- services: z.ZodArray<z.ZodObject<{
821
- serviceName: z.ZodString;
822
- touchedFiles: z.ZodArray<z.ZodString, "many">;
823
- consumers: z.ZodArray<z.ZodObject<{
824
- id: z.ZodString;
825
- repo: z.ZodOptional<z.ZodString>;
826
- branch: z.ZodOptional<z.ZodString>;
827
- }, "strip", z.ZodTypeAny, {
828
- id: string;
829
- repo?: string | undefined;
830
- branch?: string | undefined;
831
- }, {
832
- id: string;
833
- repo?: string | undefined;
834
- branch?: string | undefined;
835
- }>, "many">;
836
- notify_webhook: z.ZodOptional<z.ZodString>;
837
- }, "strip", z.ZodTypeAny, {
838
- serviceName: string;
839
- touchedFiles: string[];
840
- consumers: {
841
- id: string;
842
- repo?: string | undefined;
843
- branch?: string | undefined;
844
- }[];
845
- notify_webhook?: string | undefined;
846
- }, {
847
- serviceName: string;
848
- touchedFiles: string[];
849
- consumers: {
850
- id: string;
851
- repo?: string | undefined;
852
- branch?: string | undefined;
853
- }[];
854
- notify_webhook?: string | undefined;
855
- }>, "many">;
856
- }, "strip", z.ZodTypeAny, {
857
- services: {
858
- serviceName: string;
859
- touchedFiles: string[];
860
- consumers: {
861
- id: string;
862
- repo?: string | undefined;
863
- branch?: string | undefined;
864
- }[];
865
- notify_webhook?: string | undefined;
866
- }[];
867
- }, {
868
- services: {
869
- serviceName: string;
870
- touchedFiles: string[];
871
- consumers: {
872
- id: string;
873
- repo?: string | undefined;
874
- branch?: string | undefined;
875
- }[];
876
- notify_webhook?: string | undefined;
877
- }[];
878
- }>>;
879
- }, "strip", z.ZodTypeAny, {
880
- id: string;
881
- repoId: string;
882
- commitSha: string;
883
- healthScore: number;
884
- riskScore: number;
885
- gateDecision: "allow" | "warn" | "block";
886
- healthChecks: {
887
- status: "allow" | "warn" | "block";
888
- target: string;
889
- latencyMs: number;
890
- detail?: Record<string, unknown> | undefined;
891
- }[];
892
- riskFactors: {
893
- 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";
894
- score: number;
895
- detail?: Record<string, unknown> | undefined;
896
- }[];
897
- evaluationMs: number;
898
- cross_repo_impact?: {
899
- services: {
900
- serviceName: string;
901
- touchedFiles: string[];
902
- consumers: {
903
- id: string;
904
- repo?: string | undefined;
905
- branch?: string | undefined;
906
- }[];
907
- notify_webhook?: string | undefined;
908
- }[];
909
- } | undefined;
910
- environment?: string | undefined;
911
- files?: string[] | undefined;
912
- releaseReady?: boolean | undefined;
913
- prNumber?: number | undefined;
914
- reportUrl?: string | undefined;
915
- service?: string | undefined;
916
- policyFindings?: string[] | undefined;
917
- pr?: {
918
- provenance?: {
919
- type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
920
- confidence: number;
921
- source?: string | undefined;
922
- } | undefined;
923
- headRef?: string | undefined;
924
- } | undefined;
925
- session_correlation?: {
926
- burst_count: number;
927
- window: string;
928
- } | undefined;
929
- escalation_status?: {
930
- enabled: boolean;
931
- target_count: number;
932
- acknowledge_sla_minutes?: number | undefined;
933
- resolve_sla_minutes?: number | undefined;
934
- } | undefined;
935
- trust_profile?: {
936
- reason: string;
937
- strictness: "baseline" | "elevated" | "strict";
938
- score?: number | undefined;
939
- profile?: "fast-track" | "standard" | "probation" | undefined;
940
- factors?: Record<string, number> | undefined;
941
- } | undefined;
942
- policyOverride?: {
943
- reason: string;
944
- source: "workflow" | "label";
945
- owner: string;
946
- linkedTicket: string;
947
- expiresAt: string;
948
- appliedAt: string;
949
- changes: {
950
- failMode?: "open" | "closed" | undefined;
951
- riskThreshold?: number | undefined;
952
- warnThreshold?: number | undefined;
953
- releaseReady?: true | undefined;
954
- };
955
- preOverrideDecision?: "allow" | "warn" | "block" | undefined;
956
- preOverrideReleaseReady?: boolean | undefined;
957
- preOverrideReasons?: string[] | undefined;
958
- } | undefined;
959
- labelOverrideFeedback?: {
960
- message: string;
961
- status: "applied" | "rejected";
962
- } | undefined;
963
- releaseReadyReasons?: string[] | undefined;
964
- ci?: {
965
- checks: {
966
- status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
967
- name: string;
968
- required: boolean;
969
- conclusion?: string | undefined;
970
- detailsUrl?: string | undefined;
971
- }[];
972
- allRequiredPassed: boolean;
973
- pendingCount: number;
974
- failedCount: number;
975
- missingCount: number;
976
- } | undefined;
977
- context?: {
978
- name: string;
979
- environment?: string | undefined;
980
- } | undefined;
981
- gateMode?: "release-ready" | "advisory" | "risk-only" | undefined;
982
- storePersisted?: boolean | undefined;
983
- credit_meter?: {
984
- metered: boolean;
985
- skipped?: boolean | undefined;
986
- reason?: string | undefined;
987
- shadow?: boolean | undefined;
988
- would_charge?: number | undefined;
989
- charged?: number | undefined;
990
- balance?: number | undefined;
991
- allowed?: boolean | undefined;
992
- ok?: boolean | undefined;
993
- } | undefined;
994
- remediation?: {
995
- schema: "trailhead.remediation.v1";
996
- release_ready: boolean;
997
- fixes: {
998
- code: string;
999
- detail: string;
1000
- severity: "warn" | "advisory" | "blocking";
1001
- title: string;
1002
- files: string[];
1003
- autofix_eligible: boolean;
1004
- suggested_action?: string | undefined;
1005
- suggested_command?: string | undefined;
1006
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
1007
- policy_link?: string | undefined;
1008
- }[];
1009
- blocking_count: number;
1010
- warn_count: number;
1011
- advisory_count: number;
1012
- autofix_eligible_count: number;
1013
- loop_round: number;
1014
- max_loop_rounds: number;
1015
- fixes_resolved: string[];
1016
- fixes_introduced: string[];
1017
- next_action: "ready_to_merge" | "fix_and_retry" | "human_review_required" | "max_rounds_exceeded";
1018
- previous_evaluation_id?: string | undefined;
1019
- } | undefined;
1020
- agentBriefMode?: "off" | "collapsed" | "expanded" | undefined;
1021
- submissionChecks?: {
1022
- code: "artifact_integrity" | "mock_placeholder" | "context_freshness" | "destructive_sql" | "secrets" | "path_format" | "syntax_validity" | "import_resolution" | "rls_new_tables" | "auth_route_auth" | "hardcoded_env" | "external_package_deps" | "sql_syntax_basic" | "large_file" | "soul_integrity" | "output_size_min" | "action_extraction_present" | "delta_section_present" | "preamble_absent" | "graduation_signals_section_present" | "fabricated_id_check" | "session_narrative_detection" | "incompleteness_self_flag" | "referenced_files_exist" | "prerequisite_secrets_check" | "dependency_dag_validation" | "uncommitted_fix_check" | "verification_owner_assigned" | "external_interface_validation";
1023
- detail: string;
1024
- severity: "warn" | "advisory" | "blocking";
1025
- title: string;
1026
- files: string[];
1027
- autofix_eligible: boolean;
1028
- suggested_action?: string | undefined;
1029
- }[] | undefined;
1030
- }, {
1031
- id: string;
1032
- repoId: string;
1033
- commitSha: string;
1034
- healthScore: number;
1035
- riskScore: number;
1036
- gateDecision: "allow" | "warn" | "block";
1037
- healthChecks: {
1038
- status: "allow" | "warn" | "block";
1039
- target: string;
1040
- latencyMs: number;
1041
- detail?: Record<string, unknown> | undefined;
1042
- }[];
1043
- riskFactors: {
1044
- 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";
1045
- score: number;
1046
- detail?: Record<string, unknown> | undefined;
1047
- }[];
1048
- evaluationMs: number;
1049
- cross_repo_impact?: {
1050
- services: {
1051
- serviceName: string;
1052
- touchedFiles: string[];
1053
- consumers: {
1054
- id: string;
1055
- repo?: string | undefined;
1056
- branch?: string | undefined;
1057
- }[];
1058
- notify_webhook?: string | undefined;
1059
- }[];
1060
- } | undefined;
1061
- environment?: string | undefined;
1062
- files?: string[] | undefined;
1063
- releaseReady?: boolean | undefined;
1064
- prNumber?: number | undefined;
1065
- reportUrl?: string | undefined;
1066
- service?: string | undefined;
1067
- policyFindings?: string[] | undefined;
1068
- pr?: {
1069
- provenance?: {
1070
- type: "unknown" | "human" | "dependabot" | "copilot" | "codex" | "claude" | "custom-bot";
1071
- confidence: number;
1072
- source?: string | undefined;
1073
- } | undefined;
1074
- headRef?: string | undefined;
1075
- } | undefined;
1076
- session_correlation?: {
1077
- burst_count: number;
1078
- window: string;
1079
- } | undefined;
1080
- escalation_status?: {
1081
- enabled: boolean;
1082
- target_count: number;
1083
- acknowledge_sla_minutes?: number | undefined;
1084
- resolve_sla_minutes?: number | undefined;
1085
- } | undefined;
1086
- trust_profile?: {
1087
- reason: string;
1088
- strictness: "baseline" | "elevated" | "strict";
1089
- score?: number | undefined;
1090
- profile?: "fast-track" | "standard" | "probation" | undefined;
1091
- factors?: Record<string, number> | undefined;
1092
- } | undefined;
1093
- policyOverride?: {
1094
- reason: string;
1095
- owner: string;
1096
- linkedTicket: string;
1097
- expiresAt: string;
1098
- appliedAt: string;
1099
- source?: "workflow" | "label" | undefined;
1100
- changes?: {
1101
- failMode?: "open" | "closed" | undefined;
1102
- riskThreshold?: number | undefined;
1103
- warnThreshold?: number | undefined;
1104
- releaseReady?: true | undefined;
1105
- } | undefined;
1106
- preOverrideDecision?: "allow" | "warn" | "block" | undefined;
1107
- preOverrideReleaseReady?: boolean | undefined;
1108
- preOverrideReasons?: string[] | undefined;
1109
- } | undefined;
1110
- labelOverrideFeedback?: {
1111
- message: string;
1112
- status: "applied" | "rejected";
1113
- } | undefined;
1114
- releaseReadyReasons?: string[] | undefined;
1115
- ci?: {
1116
- checks: {
1117
- status: "pending" | "pass" | "fail" | "skip" | "stale" | "missing";
1118
- name: string;
1119
- required: boolean;
1120
- conclusion?: string | undefined;
1121
- detailsUrl?: string | undefined;
1122
- }[];
1123
- allRequiredPassed: boolean;
1124
- pendingCount: number;
1125
- failedCount: number;
1126
- missingCount: number;
1127
- } | undefined;
1128
- context?: {
1129
- name: string;
1130
- environment?: string | undefined;
1131
- } | undefined;
1132
- gateMode?: "release-ready" | "advisory" | "risk-only" | undefined;
1133
- storePersisted?: boolean | undefined;
1134
- credit_meter?: {
1135
- metered: boolean;
1136
- skipped?: boolean | undefined;
1137
- reason?: string | undefined;
1138
- shadow?: boolean | undefined;
1139
- would_charge?: number | undefined;
1140
- charged?: number | undefined;
1141
- balance?: number | undefined;
1142
- allowed?: boolean | undefined;
1143
- ok?: boolean | undefined;
1144
- } | undefined;
1145
- remediation?: {
1146
- release_ready: boolean;
1147
- fixes: {
1148
- code: string;
1149
- detail: string;
1150
- severity: "warn" | "advisory" | "blocking";
1151
- title: string;
1152
- files?: string[] | undefined;
1153
- suggested_action?: string | undefined;
1154
- autofix_eligible?: boolean | undefined;
1155
- suggested_command?: string | undefined;
1156
- autofix_class?: "format" | "lint" | "import-fix" | "type-narrow" | "test-scaffold" | "doc-update" | "dependency-bump" | undefined;
1157
- policy_link?: string | undefined;
1158
- }[];
1159
- blocking_count: number;
1160
- warn_count: number;
1161
- advisory_count: number;
1162
- autofix_eligible_count: number;
1163
- next_action: "ready_to_merge" | "fix_and_retry" | "human_review_required" | "max_rounds_exceeded";
1164
- schema?: "trailhead.remediation.v1" | undefined;
1165
- loop_round?: number | undefined;
1166
- max_loop_rounds?: number | undefined;
1167
- previous_evaluation_id?: string | undefined;
1168
- fixes_resolved?: string[] | undefined;
1169
- fixes_introduced?: string[] | undefined;
1170
- } | undefined;
1171
- agentBriefMode?: "off" | "collapsed" | "expanded" | undefined;
1172
- submissionChecks?: {
1173
- code: "artifact_integrity" | "mock_placeholder" | "context_freshness" | "destructive_sql" | "secrets" | "path_format" | "syntax_validity" | "import_resolution" | "rls_new_tables" | "auth_route_auth" | "hardcoded_env" | "external_package_deps" | "sql_syntax_basic" | "large_file" | "soul_integrity" | "output_size_min" | "action_extraction_present" | "delta_section_present" | "preamble_absent" | "graduation_signals_section_present" | "fabricated_id_check" | "session_narrative_detection" | "incompleteness_self_flag" | "referenced_files_exist" | "prerequisite_secrets_check" | "dependency_dag_validation" | "uncommitted_fix_check" | "verification_owner_assigned" | "external_interface_validation";
1174
- detail: string;
1175
- severity: "warn" | "advisory" | "blocking";
1176
- title: string;
1177
- files?: string[] | undefined;
1178
- suggested_action?: string | undefined;
1179
- autofix_eligible?: boolean | undefined;
1180
- }[] | undefined;
1181
- }>;
1182
- export type GateEvaluation = z.infer<typeof GateEvaluation>;
1183
- export declare const GateApiResponse: z.ZodObject<{
1184
- id: z.ZodOptional<z.ZodString>;
1185
- reportUrl: z.ZodOptional<z.ZodString>;
1186
- healthScore: z.ZodOptional<z.ZodNumber>;
1187
- riskScore: z.ZodOptional<z.ZodNumber>;
1188
- gateDecision: z.ZodOptional<z.ZodEnum<["allow", "warn", "block"]>>;
1189
- healthChecks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1190
- target: z.ZodString;
1191
- status: z.ZodEnum<["allow", "warn", "block"]>;
1192
- latencyMs: z.ZodNumber;
1193
- detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1194
- }, "strip", z.ZodTypeAny, {
1195
- status: "allow" | "warn" | "block";
1196
- target: string;
1197
- latencyMs: number;
1198
- detail?: Record<string, unknown> | undefined;
1199
- }, {
1200
- status: "allow" | "warn" | "block";
1201
- target: string;
1202
- latencyMs: number;
1203
- detail?: Record<string, unknown> | undefined;
1204
- }>, "many">>;
1205
- riskFactors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1206
- 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"]>;
1207
- score: z.ZodNumber;
1208
- detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1209
- }, "strip", z.ZodTypeAny, {
1210
- 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";
1211
- score: number;
1212
- detail?: Record<string, unknown> | undefined;
1213
- }, {
1214
- 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";
1215
- score: number;
1216
- detail?: Record<string, unknown> | undefined;
1217
- }>, "many">>;
1218
- }, "strip", z.ZodTypeAny, {
1219
- id?: string | undefined;
1220
- healthScore?: number | undefined;
1221
- riskScore?: number | undefined;
1222
- gateDecision?: "allow" | "warn" | "block" | undefined;
1223
- healthChecks?: {
1224
- status: "allow" | "warn" | "block";
1225
- target: string;
1226
- latencyMs: number;
1227
- detail?: Record<string, unknown> | undefined;
1228
- }[] | undefined;
1229
- riskFactors?: {
1230
- 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";
1231
- score: number;
1232
- detail?: Record<string, unknown> | undefined;
1233
- }[] | undefined;
1234
- reportUrl?: string | undefined;
1235
- }, {
1236
- id?: string | undefined;
1237
- healthScore?: number | undefined;
1238
- riskScore?: number | undefined;
1239
- gateDecision?: "allow" | "warn" | "block" | undefined;
1240
- healthChecks?: {
1241
- status: "allow" | "warn" | "block";
1242
- target: string;
1243
- latencyMs: number;
1244
- detail?: Record<string, unknown> | undefined;
1245
- }[] | undefined;
1246
- riskFactors?: {
1247
- 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";
1248
- score: number;
1249
- detail?: Record<string, unknown> | undefined;
1250
- }[] | undefined;
1251
- reportUrl?: string | undefined;
1252
- }>;
1253
- export type GateApiResponse = z.infer<typeof GateApiResponse>;
1254
- export declare const FreezeWindow: z.ZodObject<{
1255
- days: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1256
- afterHour: z.ZodOptional<z.ZodNumber>;
1257
- beforeHour: z.ZodOptional<z.ZodNumber>;
1258
- timezone: z.ZodDefault<z.ZodString>;
1259
- message: z.ZodOptional<z.ZodString>;
1260
- }, "strip", z.ZodTypeAny, {
1261
- days: string[];
1262
- timezone: string;
1263
- message?: string | undefined;
1264
- afterHour?: number | undefined;
1265
- beforeHour?: number | undefined;
1266
- }, {
1267
- message?: string | undefined;
1268
- days?: string[] | undefined;
1269
- afterHour?: number | undefined;
1270
- beforeHour?: number | undefined;
1271
- timezone?: string | undefined;
1272
- }>;
1273
- export type FreezeWindow = z.infer<typeof FreezeWindow>;
1274
- export declare const EnvironmentConfig: z.ZodObject<{
1275
- risk: z.ZodOptional<z.ZodNumber>;
1276
- warn: z.ZodOptional<z.ZodNumber>;
1277
- require_security_clear: z.ZodOptional<z.ZodBoolean>;
1278
- }, "strip", z.ZodTypeAny, {
1279
- warn?: number | undefined;
1280
- risk?: number | undefined;
1281
- require_security_clear?: boolean | undefined;
1282
- }, {
1283
- warn?: number | undefined;
1284
- risk?: number | undefined;
1285
- require_security_clear?: boolean | undefined;
1286
- }>;
1287
- export type EnvironmentConfig = z.infer<typeof EnvironmentConfig>;
1288
- export declare const ServiceConsumerRef: z.ZodObject<{
1289
- repo: z.ZodString;
1290
- name: z.ZodOptional<z.ZodString>;
1291
- branch: z.ZodOptional<z.ZodString>;
1292
- notify_webhook: z.ZodOptional<z.ZodString>;
1293
- }, "strip", z.ZodTypeAny, {
1294
- repo: string;
1295
- name?: string | undefined;
1296
- branch?: string | undefined;
1297
- notify_webhook?: string | undefined;
1298
- }, {
1299
- repo: string;
1300
- name?: string | undefined;
1301
- branch?: string | undefined;
1302
- notify_webhook?: string | undefined;
1303
- }>;
1304
- export declare const ServiceConsumer: z.ZodUnion<[z.ZodString, z.ZodObject<{
1305
- repo: z.ZodString;
1306
- name: z.ZodOptional<z.ZodString>;
1307
- branch: z.ZodOptional<z.ZodString>;
1308
- notify_webhook: z.ZodOptional<z.ZodString>;
1309
- }, "strip", z.ZodTypeAny, {
1310
- repo: string;
1311
- name?: string | undefined;
1312
- branch?: string | undefined;
1313
- notify_webhook?: string | undefined;
1314
- }, {
1315
- repo: string;
1316
- name?: string | undefined;
1317
- branch?: string | undefined;
1318
- notify_webhook?: string | undefined;
1319
- }>]>;
1320
- export type ServiceConsumer = z.infer<typeof ServiceConsumer>;
1321
- export declare const ConsumerRegistry: z.ZodRecord<z.ZodString, z.ZodObject<{
1322
- repo: z.ZodString;
1323
- name: z.ZodOptional<z.ZodString>;
1324
- branch: z.ZodOptional<z.ZodString>;
1325
- notify_webhook: z.ZodOptional<z.ZodString>;
1326
- }, "strip", z.ZodTypeAny, {
1327
- repo: string;
1328
- name?: string | undefined;
1329
- branch?: string | undefined;
1330
- notify_webhook?: string | undefined;
1331
- }, {
1332
- repo: string;
1333
- name?: string | undefined;
1334
- branch?: string | undefined;
1335
- notify_webhook?: string | undefined;
1336
- }>>;
1337
- export type ConsumerRegistry = z.infer<typeof ConsumerRegistry>;
1338
- export declare const ServiceMapping: z.ZodObject<{
1339
- paths: z.ZodArray<z.ZodString, "many">;
1340
- environment: z.ZodOptional<z.ZodString>;
1341
- consumers: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1342
- repo: z.ZodString;
1343
- name: z.ZodOptional<z.ZodString>;
1344
- branch: z.ZodOptional<z.ZodString>;
1345
- notify_webhook: z.ZodOptional<z.ZodString>;
1346
- }, "strip", z.ZodTypeAny, {
1347
- repo: string;
1348
- name?: string | undefined;
1349
- branch?: string | undefined;
1350
- notify_webhook?: string | undefined;
1351
- }, {
1352
- repo: string;
1353
- name?: string | undefined;
1354
- branch?: string | undefined;
1355
- notify_webhook?: string | undefined;
1356
- }>]>, "many">>;
1357
- contracts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1358
- notify_webhook: z.ZodOptional<z.ZodString>;
1359
- }, "strip", z.ZodTypeAny, {
1360
- consumers: (string | {
1361
- repo: string;
1362
- name?: string | undefined;
1363
- branch?: string | undefined;
1364
- notify_webhook?: string | undefined;
1365
- })[];
1366
- paths: string[];
1367
- contracts: string[];
1368
- environment?: string | undefined;
1369
- notify_webhook?: string | undefined;
1370
- }, {
1371
- paths: string[];
1372
- environment?: string | undefined;
1373
- consumers?: (string | {
1374
- repo: string;
1375
- name?: string | undefined;
1376
- branch?: string | undefined;
1377
- notify_webhook?: string | undefined;
1378
- })[] | undefined;
1379
- notify_webhook?: string | undefined;
1380
- contracts?: string[] | undefined;
1381
- }>;
1382
- export type ServiceMapping = z.infer<typeof ServiceMapping>;
1383
- export declare const SecurityConfig: z.ZodObject<{
1384
- severity_threshold: z.ZodDefault<z.ZodEnum<["error", "warning", "note", "none"]>>;
1385
- block_on_critical: z.ZodDefault<z.ZodBoolean>;
1386
- ignore_rules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1387
- }, "strip", z.ZodTypeAny, {
1388
- severity_threshold: "error" | "warning" | "note" | "none";
1389
- block_on_critical: boolean;
1390
- ignore_rules: string[];
1391
- }, {
1392
- severity_threshold?: "error" | "warning" | "note" | "none" | undefined;
1393
- block_on_critical?: boolean | undefined;
1394
- ignore_rules?: string[] | undefined;
1395
- }>;
1396
- export type SecurityConfig = z.infer<typeof SecurityConfig>;
1397
- export declare const CanaryConfig: z.ZodObject<{
1398
- webhook_type: z.ZodDefault<z.ZodEnum<["vercel", "generic"]>>;
1399
- field_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1400
- rollback_on_failure: z.ZodDefault<z.ZodBoolean>;
1401
- }, "strip", z.ZodTypeAny, {
1402
- webhook_type: "vercel" | "generic";
1403
- rollback_on_failure: boolean;
1404
- field_map?: Record<string, string> | undefined;
1405
- }, {
1406
- webhook_type?: "vercel" | "generic" | undefined;
1407
- field_map?: Record<string, string> | undefined;
1408
- rollback_on_failure?: boolean | undefined;
1409
- }>;
1410
- export type CanaryConfig = z.infer<typeof CanaryConfig>;
1411
- export declare const RiskProfileMatch: z.ZodObject<{
1412
- files_include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1413
- files_exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1414
- min_files: z.ZodOptional<z.ZodNumber>;
1415
- max_files: z.ZodOptional<z.ZodNumber>;
1416
- }, "strip", z.ZodTypeAny, {
1417
- files_include: string[];
1418
- files_exclude: string[];
1419
- min_files?: number | undefined;
1420
- max_files?: number | undefined;
1421
- }, {
1422
- files_include?: string[] | undefined;
1423
- files_exclude?: string[] | undefined;
1424
- min_files?: number | undefined;
1425
- max_files?: number | undefined;
1426
- }>;
1427
- export type RiskProfileMatch = z.infer<typeof RiskProfileMatch>;
1428
- export declare const RiskProfile: z.ZodObject<{
1429
- name: z.ZodOptional<z.ZodString>;
1430
- match: z.ZodObject<{
1431
- files_include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1432
- files_exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1433
- min_files: z.ZodOptional<z.ZodNumber>;
1434
- max_files: z.ZodOptional<z.ZodNumber>;
1435
- }, "strip", z.ZodTypeAny, {
1436
- files_include: string[];
1437
- files_exclude: string[];
1438
- min_files?: number | undefined;
1439
- max_files?: number | undefined;
1440
- }, {
1441
- files_include?: string[] | undefined;
1442
- files_exclude?: string[] | undefined;
1443
- min_files?: number | undefined;
1444
- max_files?: number | undefined;
1445
- }>;
1446
- weights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1447
- }, "strip", z.ZodTypeAny, {
1448
- match: {
1449
- files_include: string[];
1450
- files_exclude: string[];
1451
- min_files?: number | undefined;
1452
- max_files?: number | undefined;
1453
- };
1454
- weights: Record<string, number>;
1455
- name?: string | undefined;
1456
- }, {
1457
- match: {
1458
- files_include?: string[] | undefined;
1459
- files_exclude?: string[] | undefined;
1460
- min_files?: number | undefined;
1461
- max_files?: number | undefined;
1462
- };
1463
- name?: string | undefined;
1464
- weights?: Record<string, number> | undefined;
1465
- }>;
1466
- export type RiskProfile = z.infer<typeof RiskProfile>;
1467
- export declare const ContextMatch: z.ZodObject<{
1468
- base_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1469
- head_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1470
- labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1471
- }, "strip", z.ZodTypeAny, {
1472
- base_branch: string[];
1473
- head_branch: string[];
1474
- labels: string[];
1475
- }, {
1476
- base_branch?: string[] | undefined;
1477
- head_branch?: string[] | undefined;
1478
- labels?: string[] | undefined;
1479
- }>;
1480
- export type ContextMatch = z.infer<typeof ContextMatch>;
1481
- export declare const ContextCiConfig: z.ZodObject<{
1482
- required_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1483
- optional_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1484
- missing_required: z.ZodDefault<z.ZodEnum<["fail", "skip"]>>;
1485
- }, "strip", z.ZodTypeAny, {
1486
- required_checks: string[];
1487
- optional_checks: string[];
1488
- missing_required: "fail" | "skip";
1489
- }, {
1490
- required_checks?: string[] | undefined;
1491
- optional_checks?: string[] | undefined;
1492
- missing_required?: "fail" | "skip" | undefined;
1493
- }>;
1494
- export type ContextCiConfig = z.infer<typeof ContextCiConfig>;
1495
- export declare const TrailheadContext: z.ZodObject<{
1496
- name: z.ZodString;
1497
- match: z.ZodObject<{
1498
- base_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1499
- head_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1500
- labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1501
- }, "strip", z.ZodTypeAny, {
1502
- base_branch: string[];
1503
- head_branch: string[];
1504
- labels: string[];
1505
- }, {
1506
- base_branch?: string[] | undefined;
1507
- head_branch?: string[] | undefined;
1508
- labels?: string[] | undefined;
1509
- }>;
1510
- environment: z.ZodOptional<z.ZodString>;
1511
- thresholds: z.ZodDefault<z.ZodObject<{
1512
- risk: z.ZodOptional<z.ZodNumber>;
1513
- warn: z.ZodOptional<z.ZodNumber>;
1514
- }, "strip", z.ZodTypeAny, {
1515
- warn?: number | undefined;
1516
- risk?: number | undefined;
1517
- }, {
1518
- warn?: number | undefined;
1519
- risk?: number | undefined;
1520
- }>>;
1521
- ci: z.ZodDefault<z.ZodObject<{
1522
- required_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1523
- optional_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1524
- missing_required: z.ZodDefault<z.ZodEnum<["fail", "skip"]>>;
1525
- }, "strip", z.ZodTypeAny, {
1526
- required_checks: string[];
1527
- optional_checks: string[];
1528
- missing_required: "fail" | "skip";
1529
- }, {
1530
- required_checks?: string[] | undefined;
1531
- optional_checks?: string[] | undefined;
1532
- missing_required?: "fail" | "skip" | undefined;
1533
- }>>;
1534
- }, "strip", z.ZodTypeAny, {
1535
- name: string;
1536
- match: {
1537
- base_branch: string[];
1538
- head_branch: string[];
1539
- labels: string[];
1540
- };
1541
- ci: {
1542
- required_checks: string[];
1543
- optional_checks: string[];
1544
- missing_required: "fail" | "skip";
1545
- };
1546
- thresholds: {
1547
- warn?: number | undefined;
1548
- risk?: number | undefined;
1549
- };
1550
- environment?: string | undefined;
1551
- }, {
1552
- name: string;
1553
- match: {
1554
- base_branch?: string[] | undefined;
1555
- head_branch?: string[] | undefined;
1556
- labels?: string[] | undefined;
1557
- };
1558
- environment?: string | undefined;
1559
- ci?: {
1560
- required_checks?: string[] | undefined;
1561
- optional_checks?: string[] | undefined;
1562
- missing_required?: "fail" | "skip" | undefined;
1563
- } | undefined;
1564
- thresholds?: {
1565
- warn?: number | undefined;
1566
- risk?: number | undefined;
1567
- } | undefined;
1568
- }>;
1569
- export type TrailheadContext = z.infer<typeof TrailheadContext>;
1570
- export declare const GateConfig: z.ZodObject<{
1571
- mode: z.ZodDefault<z.ZodEnum<["release-ready", "advisory", "risk-only"]>>;
1572
- check_name: z.ZodDefault<z.ZodString>;
1573
- agent_brief: z.ZodOptional<z.ZodEnum<["off", "collapsed", "expanded"]>>;
1574
- }, "strip", z.ZodTypeAny, {
1575
- mode: "release-ready" | "advisory" | "risk-only";
1576
- check_name: string;
1577
- agent_brief?: "off" | "collapsed" | "expanded" | undefined;
1578
- }, {
1579
- mode?: "release-ready" | "advisory" | "risk-only" | undefined;
1580
- check_name?: string | undefined;
1581
- agent_brief?: "off" | "collapsed" | "expanded" | undefined;
1582
- }>;
1583
- export type GateConfig = z.infer<typeof GateConfig>;
1584
- export declare const RemediationConfig: z.ZodObject<{
1585
- enabled: z.ZodDefault<z.ZodBoolean>;
1586
- max_loop_rounds: z.ZodDefault<z.ZodNumber>;
1587
- }, "strip", z.ZodTypeAny, {
1588
- max_loop_rounds: number;
1589
- enabled: boolean;
1590
- }, {
1591
- max_loop_rounds?: number | undefined;
1592
- enabled?: boolean | undefined;
1593
- }>;
1594
- export type RemediationConfig = z.infer<typeof RemediationConfig>;
1595
- export declare const OverrideConfig: z.ZodObject<{
1596
- enabled: z.ZodDefault<z.ZodBoolean>;
1597
- max_per_week: z.ZodDefault<z.ZodNumber>;
1598
- }, "strip", z.ZodTypeAny, {
1599
- enabled: boolean;
1600
- max_per_week: number;
1601
- }, {
1602
- enabled?: boolean | undefined;
1603
- max_per_week?: number | undefined;
1604
- }>;
1605
- export type OverrideConfig = z.infer<typeof OverrideConfig>;
1606
- export declare const TuningConfig: z.ZodObject<{
1607
- auto_downgrade: z.ZodDefault<z.ZodBoolean>;
1608
- digest_webhook_url: z.ZodOptional<z.ZodString>;
1609
- fp_threshold: z.ZodDefault<z.ZodNumber>;
1610
- }, "strip", z.ZodTypeAny, {
1611
- auto_downgrade: boolean;
1612
- fp_threshold: number;
1613
- digest_webhook_url?: string | undefined;
1614
- }, {
1615
- auto_downgrade?: boolean | undefined;
1616
- digest_webhook_url?: string | undefined;
1617
- fp_threshold?: number | undefined;
1618
- }>;
1619
- export type TuningConfig = z.infer<typeof TuningConfig>;
1620
- export declare const SubmissionConfig: z.ZodObject<{
1621
- enabled: z.ZodDefault<z.ZodBoolean>;
1622
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1623
- stale_terms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1624
- auth_route_allowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1625
- max_file_lines: z.ZodOptional<z.ZodNumber>;
1626
- /** Path substrings to skip for context_freshness (e.g. archived suggestion dirs). */
1627
- path_ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1628
- /** Legacy naming allowlist — skip stale-term hits on imports, slugs in strings, etc. */
1629
- naming_allowlist: z.ZodOptional<z.ZodObject<{
1630
- skip_extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1631
- skip_path_patterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1632
- skip_comment_markers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1633
- skip_in_imports: z.ZodOptional<z.ZodBoolean>;
1634
- }, "strip", z.ZodTypeAny, {
1635
- skip_extensions?: string[] | undefined;
1636
- skip_path_patterns?: string[] | undefined;
1637
- skip_comment_markers?: string[] | undefined;
1638
- skip_in_imports?: boolean | undefined;
1639
- }, {
1640
- skip_extensions?: string[] | undefined;
1641
- skip_path_patterns?: string[] | undefined;
1642
- skip_comment_markers?: string[] | undefined;
1643
- skip_in_imports?: boolean | undefined;
1644
- }>>;
1645
- }, "strip", z.ZodTypeAny, {
1646
- enabled: boolean;
1647
- mode: "warn" | "block";
1648
- stale_terms?: string[] | undefined;
1649
- auth_route_allowlist?: string[] | undefined;
1650
- max_file_lines?: number | undefined;
1651
- path_ignore?: string[] | undefined;
1652
- naming_allowlist?: {
1653
- skip_extensions?: string[] | undefined;
1654
- skip_path_patterns?: string[] | undefined;
1655
- skip_comment_markers?: string[] | undefined;
1656
- skip_in_imports?: boolean | undefined;
1657
- } | undefined;
1658
- }, {
1659
- enabled?: boolean | undefined;
1660
- mode?: "warn" | "block" | undefined;
1661
- stale_terms?: string[] | undefined;
1662
- auth_route_allowlist?: string[] | undefined;
1663
- max_file_lines?: number | undefined;
1664
- path_ignore?: string[] | undefined;
1665
- naming_allowlist?: {
1666
- skip_extensions?: string[] | undefined;
1667
- skip_path_patterns?: string[] | undefined;
1668
- skip_comment_markers?: string[] | undefined;
1669
- skip_in_imports?: boolean | undefined;
1670
- } | undefined;
1671
- }>;
1672
- export type SubmissionConfig = z.infer<typeof SubmissionConfig>;
1673
- export declare const RepoConfig: z.ZodObject<{
1674
- schema_version: z.ZodDefault<z.ZodNumber>;
1675
- gate: z.ZodDefault<z.ZodObject<{
1676
- mode: z.ZodDefault<z.ZodEnum<["release-ready", "advisory", "risk-only"]>>;
1677
- check_name: z.ZodDefault<z.ZodString>;
1678
- agent_brief: z.ZodOptional<z.ZodEnum<["off", "collapsed", "expanded"]>>;
1679
- }, "strip", z.ZodTypeAny, {
1680
- mode: "release-ready" | "advisory" | "risk-only";
1681
- check_name: string;
1682
- agent_brief?: "off" | "collapsed" | "expanded" | undefined;
1683
- }, {
1684
- mode?: "release-ready" | "advisory" | "risk-only" | undefined;
1685
- check_name?: string | undefined;
1686
- agent_brief?: "off" | "collapsed" | "expanded" | undefined;
1687
- }>>;
1688
- remediation: z.ZodOptional<z.ZodObject<{
1689
- enabled: z.ZodDefault<z.ZodBoolean>;
1690
- max_loop_rounds: z.ZodDefault<z.ZodNumber>;
1691
- }, "strip", z.ZodTypeAny, {
1692
- max_loop_rounds: number;
1693
- enabled: boolean;
1694
- }, {
1695
- max_loop_rounds?: number | undefined;
1696
- enabled?: boolean | undefined;
1697
- }>>;
1698
- override: z.ZodOptional<z.ZodObject<{
1699
- enabled: z.ZodDefault<z.ZodBoolean>;
1700
- max_per_week: z.ZodDefault<z.ZodNumber>;
1701
- }, "strip", z.ZodTypeAny, {
1702
- enabled: boolean;
1703
- max_per_week: number;
1704
- }, {
1705
- enabled?: boolean | undefined;
1706
- max_per_week?: number | undefined;
1707
- }>>;
1708
- tuning: z.ZodOptional<z.ZodObject<{
1709
- auto_downgrade: z.ZodDefault<z.ZodBoolean>;
1710
- digest_webhook_url: z.ZodOptional<z.ZodString>;
1711
- fp_threshold: z.ZodDefault<z.ZodNumber>;
1712
- }, "strip", z.ZodTypeAny, {
1713
- auto_downgrade: boolean;
1714
- fp_threshold: number;
1715
- digest_webhook_url?: string | undefined;
1716
- }, {
1717
- auto_downgrade?: boolean | undefined;
1718
- digest_webhook_url?: string | undefined;
1719
- fp_threshold?: number | undefined;
1720
- }>>;
1721
- submission: z.ZodOptional<z.ZodObject<{
1722
- enabled: z.ZodDefault<z.ZodBoolean>;
1723
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
1724
- stale_terms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1725
- auth_route_allowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1726
- max_file_lines: z.ZodOptional<z.ZodNumber>;
1727
- /** Path substrings to skip for context_freshness (e.g. archived suggestion dirs). */
1728
- path_ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1729
- /** Legacy naming allowlist — skip stale-term hits on imports, slugs in strings, etc. */
1730
- naming_allowlist: z.ZodOptional<z.ZodObject<{
1731
- skip_extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1732
- skip_path_patterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1733
- skip_comment_markers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1734
- skip_in_imports: z.ZodOptional<z.ZodBoolean>;
1735
- }, "strip", z.ZodTypeAny, {
1736
- skip_extensions?: string[] | undefined;
1737
- skip_path_patterns?: string[] | undefined;
1738
- skip_comment_markers?: string[] | undefined;
1739
- skip_in_imports?: boolean | undefined;
1740
- }, {
1741
- skip_extensions?: string[] | undefined;
1742
- skip_path_patterns?: string[] | undefined;
1743
- skip_comment_markers?: string[] | undefined;
1744
- skip_in_imports?: boolean | undefined;
1745
- }>>;
1746
- }, "strip", z.ZodTypeAny, {
1747
- enabled: boolean;
1748
- mode: "warn" | "block";
1749
- stale_terms?: string[] | undefined;
1750
- auth_route_allowlist?: string[] | undefined;
1751
- max_file_lines?: number | undefined;
1752
- path_ignore?: string[] | undefined;
1753
- naming_allowlist?: {
1754
- skip_extensions?: string[] | undefined;
1755
- skip_path_patterns?: string[] | undefined;
1756
- skip_comment_markers?: string[] | undefined;
1757
- skip_in_imports?: boolean | undefined;
1758
- } | undefined;
1759
- }, {
1760
- enabled?: boolean | undefined;
1761
- mode?: "warn" | "block" | undefined;
1762
- stale_terms?: string[] | undefined;
1763
- auth_route_allowlist?: string[] | undefined;
1764
- max_file_lines?: number | undefined;
1765
- path_ignore?: string[] | undefined;
1766
- naming_allowlist?: {
1767
- skip_extensions?: string[] | undefined;
1768
- skip_path_patterns?: string[] | undefined;
1769
- skip_comment_markers?: string[] | undefined;
1770
- skip_in_imports?: boolean | undefined;
1771
- } | undefined;
1772
- }>>;
1773
- contexts: z.ZodDefault<z.ZodArray<z.ZodObject<{
1774
- name: z.ZodString;
1775
- match: z.ZodObject<{
1776
- base_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1777
- head_branch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1778
- labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1779
- }, "strip", z.ZodTypeAny, {
1780
- base_branch: string[];
1781
- head_branch: string[];
1782
- labels: string[];
1783
- }, {
1784
- base_branch?: string[] | undefined;
1785
- head_branch?: string[] | undefined;
1786
- labels?: string[] | undefined;
1787
- }>;
1788
- environment: z.ZodOptional<z.ZodString>;
1789
- thresholds: z.ZodDefault<z.ZodObject<{
1790
- risk: z.ZodOptional<z.ZodNumber>;
1791
- warn: z.ZodOptional<z.ZodNumber>;
1792
- }, "strip", z.ZodTypeAny, {
1793
- warn?: number | undefined;
1794
- risk?: number | undefined;
1795
- }, {
1796
- warn?: number | undefined;
1797
- risk?: number | undefined;
1798
- }>>;
1799
- ci: z.ZodDefault<z.ZodObject<{
1800
- required_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1801
- optional_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1802
- missing_required: z.ZodDefault<z.ZodEnum<["fail", "skip"]>>;
1803
- }, "strip", z.ZodTypeAny, {
1804
- required_checks: string[];
1805
- optional_checks: string[];
1806
- missing_required: "fail" | "skip";
1807
- }, {
1808
- required_checks?: string[] | undefined;
1809
- optional_checks?: string[] | undefined;
1810
- missing_required?: "fail" | "skip" | undefined;
1811
- }>>;
1812
- }, "strip", z.ZodTypeAny, {
1813
- name: string;
1814
- match: {
1815
- base_branch: string[];
1816
- head_branch: string[];
1817
- labels: string[];
1818
- };
1819
- ci: {
1820
- required_checks: string[];
1821
- optional_checks: string[];
1822
- missing_required: "fail" | "skip";
1823
- };
1824
- thresholds: {
1825
- warn?: number | undefined;
1826
- risk?: number | undefined;
1827
- };
1828
- environment?: string | undefined;
1829
- }, {
1830
- name: string;
1831
- match: {
1832
- base_branch?: string[] | undefined;
1833
- head_branch?: string[] | undefined;
1834
- labels?: string[] | undefined;
1835
- };
1836
- environment?: string | undefined;
1837
- ci?: {
1838
- required_checks?: string[] | undefined;
1839
- optional_checks?: string[] | undefined;
1840
- missing_required?: "fail" | "skip" | undefined;
1841
- } | undefined;
1842
- thresholds?: {
1843
- warn?: number | undefined;
1844
- risk?: number | undefined;
1845
- } | undefined;
1846
- }>, "many">>;
1847
- sensitivity: z.ZodDefault<z.ZodObject<{
1848
- high: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1849
- medium: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1850
- low: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1851
- }, "strip", z.ZodTypeAny, {
1852
- high: string[];
1853
- medium: string[];
1854
- low: string[];
1855
- }, {
1856
- high?: string[] | undefined;
1857
- medium?: string[] | undefined;
1858
- low?: string[] | undefined;
1859
- }>>;
1860
- weights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1861
- profiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
1862
- name: z.ZodOptional<z.ZodString>;
1863
- match: z.ZodObject<{
1864
- files_include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1865
- files_exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1866
- min_files: z.ZodOptional<z.ZodNumber>;
1867
- max_files: z.ZodOptional<z.ZodNumber>;
1868
- }, "strip", z.ZodTypeAny, {
1869
- files_include: string[];
1870
- files_exclude: string[];
1871
- min_files?: number | undefined;
1872
- max_files?: number | undefined;
1873
- }, {
1874
- files_include?: string[] | undefined;
1875
- files_exclude?: string[] | undefined;
1876
- min_files?: number | undefined;
1877
- max_files?: number | undefined;
1878
- }>;
1879
- weights: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1880
- }, "strip", z.ZodTypeAny, {
1881
- match: {
1882
- files_include: string[];
1883
- files_exclude: string[];
1884
- min_files?: number | undefined;
1885
- max_files?: number | undefined;
1886
- };
1887
- weights: Record<string, number>;
1888
- name?: string | undefined;
1889
- }, {
1890
- match: {
1891
- files_include?: string[] | undefined;
1892
- files_exclude?: string[] | undefined;
1893
- min_files?: number | undefined;
1894
- max_files?: number | undefined;
1895
- };
1896
- name?: string | undefined;
1897
- weights?: Record<string, number> | undefined;
1898
- }>, "many">>;
1899
- thresholds: z.ZodDefault<z.ZodObject<{
1900
- risk: z.ZodOptional<z.ZodNumber>;
1901
- warn: z.ZodOptional<z.ZodNumber>;
1902
- }, "strip", z.ZodTypeAny, {
1903
- warn?: number | undefined;
1904
- risk?: number | undefined;
1905
- }, {
1906
- warn?: number | undefined;
1907
- risk?: number | undefined;
1908
- }>>;
1909
- ignore: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1910
- freeze: z.ZodDefault<z.ZodArray<z.ZodObject<{
1911
- days: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1912
- afterHour: z.ZodOptional<z.ZodNumber>;
1913
- beforeHour: z.ZodOptional<z.ZodNumber>;
1914
- timezone: z.ZodDefault<z.ZodString>;
1915
- message: z.ZodOptional<z.ZodString>;
1916
- }, "strip", z.ZodTypeAny, {
1917
- days: string[];
1918
- timezone: string;
1919
- message?: string | undefined;
1920
- afterHour?: number | undefined;
1921
- beforeHour?: number | undefined;
1922
- }, {
1923
- message?: string | undefined;
1924
- days?: string[] | undefined;
1925
- afterHour?: number | undefined;
1926
- beforeHour?: number | undefined;
1927
- timezone?: string | undefined;
1928
- }>, "many">>;
1929
- environments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1930
- risk: z.ZodOptional<z.ZodNumber>;
1931
- warn: z.ZodOptional<z.ZodNumber>;
1932
- require_security_clear: z.ZodOptional<z.ZodBoolean>;
1933
- }, "strip", z.ZodTypeAny, {
1934
- warn?: number | undefined;
1935
- risk?: number | undefined;
1936
- require_security_clear?: boolean | undefined;
1937
- }, {
1938
- warn?: number | undefined;
1939
- risk?: number | undefined;
1940
- require_security_clear?: boolean | undefined;
1941
- }>>>;
1942
- services: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1943
- paths: z.ZodArray<z.ZodString, "many">;
1944
- environment: z.ZodOptional<z.ZodString>;
1945
- consumers: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1946
- repo: z.ZodString;
1947
- name: z.ZodOptional<z.ZodString>;
1948
- branch: z.ZodOptional<z.ZodString>;
1949
- notify_webhook: z.ZodOptional<z.ZodString>;
1950
- }, "strip", z.ZodTypeAny, {
1951
- repo: string;
1952
- name?: string | undefined;
1953
- branch?: string | undefined;
1954
- notify_webhook?: string | undefined;
1955
- }, {
1956
- repo: string;
1957
- name?: string | undefined;
1958
- branch?: string | undefined;
1959
- notify_webhook?: string | undefined;
1960
- }>]>, "many">>;
1961
- contracts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1962
- notify_webhook: z.ZodOptional<z.ZodString>;
1963
- }, "strip", z.ZodTypeAny, {
1964
- consumers: (string | {
1965
- repo: string;
1966
- name?: string | undefined;
1967
- branch?: string | undefined;
1968
- notify_webhook?: string | undefined;
1969
- })[];
1970
- paths: string[];
1971
- contracts: string[];
1972
- environment?: string | undefined;
1973
- notify_webhook?: string | undefined;
1974
- }, {
1975
- paths: string[];
1976
- environment?: string | undefined;
1977
- consumers?: (string | {
1978
- repo: string;
1979
- name?: string | undefined;
1980
- branch?: string | undefined;
1981
- notify_webhook?: string | undefined;
1982
- })[] | undefined;
1983
- notify_webhook?: string | undefined;
1984
- contracts?: string[] | undefined;
1985
- }>>>;
1986
- consumer_registry: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1987
- repo: z.ZodString;
1988
- name: z.ZodOptional<z.ZodString>;
1989
- branch: z.ZodOptional<z.ZodString>;
1990
- notify_webhook: z.ZodOptional<z.ZodString>;
1991
- }, "strip", z.ZodTypeAny, {
1992
- repo: string;
1993
- name?: string | undefined;
1994
- branch?: string | undefined;
1995
- notify_webhook?: string | undefined;
1996
- }, {
1997
- repo: string;
1998
- name?: string | undefined;
1999
- branch?: string | undefined;
2000
- notify_webhook?: string | undefined;
2001
- }>>>;
2002
- security: z.ZodDefault<z.ZodObject<{
2003
- severity_threshold: z.ZodDefault<z.ZodEnum<["error", "warning", "note", "none"]>>;
2004
- block_on_critical: z.ZodDefault<z.ZodBoolean>;
2005
- ignore_rules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2006
- }, "strip", z.ZodTypeAny, {
2007
- severity_threshold: "error" | "warning" | "note" | "none";
2008
- block_on_critical: boolean;
2009
- ignore_rules: string[];
2010
- }, {
2011
- severity_threshold?: "error" | "warning" | "note" | "none" | undefined;
2012
- block_on_critical?: boolean | undefined;
2013
- ignore_rules?: string[] | undefined;
2014
- }>>;
2015
- canary: z.ZodOptional<z.ZodObject<{
2016
- webhook_type: z.ZodDefault<z.ZodEnum<["vercel", "generic"]>>;
2017
- field_map: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2018
- rollback_on_failure: z.ZodDefault<z.ZodBoolean>;
2019
- }, "strip", z.ZodTypeAny, {
2020
- webhook_type: "vercel" | "generic";
2021
- rollback_on_failure: boolean;
2022
- field_map?: Record<string, string> | undefined;
2023
- }, {
2024
- webhook_type?: "vercel" | "generic" | undefined;
2025
- field_map?: Record<string, string> | undefined;
2026
- rollback_on_failure?: boolean | undefined;
2027
- }>>;
2028
- escalation: z.ZodDefault<z.ZodObject<{
2029
- targets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2030
- acknowledge_sla_minutes: z.ZodDefault<z.ZodNumber>;
2031
- resolve_sla_minutes: z.ZodDefault<z.ZodNumber>;
2032
- }, "strip", z.ZodTypeAny, {
2033
- acknowledge_sla_minutes: number;
2034
- resolve_sla_minutes: number;
2035
- targets: string[];
2036
- }, {
2037
- acknowledge_sla_minutes?: number | undefined;
2038
- resolve_sla_minutes?: number | undefined;
2039
- targets?: string[] | undefined;
2040
- }>>;
2041
- policies: z.ZodDefault<z.ZodObject<{
2042
- agent_prs: z.ZodDefault<z.ZodObject<{
2043
- enabled: z.ZodDefault<z.ZodBoolean>;
2044
- risk_threshold: z.ZodOptional<z.ZodNumber>;
2045
- required_approvals: z.ZodDefault<z.ZodNumber>;
2046
- require_code_owner_approval: z.ZodDefault<z.ZodBoolean>;
2047
- code_owner_reviewers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2048
- sensitive_paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2049
- strict_on_unknown_provenance: z.ZodDefault<z.ZodBoolean>;
2050
- }, "strip", z.ZodTypeAny, {
2051
- enabled: boolean;
2052
- required_approvals: number;
2053
- require_code_owner_approval: boolean;
2054
- code_owner_reviewers: string[];
2055
- sensitive_paths: string[];
2056
- strict_on_unknown_provenance: boolean;
2057
- risk_threshold?: number | undefined;
2058
- }, {
2059
- enabled?: boolean | undefined;
2060
- risk_threshold?: number | undefined;
2061
- required_approvals?: number | undefined;
2062
- require_code_owner_approval?: boolean | undefined;
2063
- code_owner_reviewers?: string[] | undefined;
2064
- sensitive_paths?: string[] | undefined;
2065
- strict_on_unknown_provenance?: boolean | undefined;
2066
- }>>;
2067
- session_correlation: z.ZodDefault<z.ZodObject<{
2068
- enabled: z.ZodDefault<z.ZodBoolean>;
2069
- threshold: z.ZodDefault<z.ZodNumber>;
2070
- window_minutes: z.ZodDefault<z.ZodNumber>;
2071
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2072
- }, "strip", z.ZodTypeAny, {
2073
- enabled: boolean;
2074
- mode: "warn" | "block";
2075
- threshold: number;
2076
- window_minutes: number;
2077
- }, {
2078
- enabled?: boolean | undefined;
2079
- mode?: "warn" | "block" | undefined;
2080
- threshold?: number | undefined;
2081
- window_minutes?: number | undefined;
2082
- }>>;
2083
- ci_integrity: z.ZodDefault<z.ZodObject<{
2084
- enabled: z.ZodDefault<z.ZodBoolean>;
2085
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2086
- }, "strip", z.ZodTypeAny, {
2087
- enabled: boolean;
2088
- mode: "warn" | "block";
2089
- }, {
2090
- enabled?: boolean | undefined;
2091
- mode?: "warn" | "block" | undefined;
2092
- }>>;
2093
- workflow_security: z.ZodDefault<z.ZodObject<{
2094
- enabled: z.ZodDefault<z.ZodBoolean>;
2095
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2096
- allow_unpinned_actions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2097
- }, "strip", z.ZodTypeAny, {
2098
- enabled: boolean;
2099
- mode: "warn" | "block";
2100
- allow_unpinned_actions: string[];
2101
- }, {
2102
- enabled?: boolean | undefined;
2103
- mode?: "warn" | "block" | undefined;
2104
- allow_unpinned_actions?: string[] | undefined;
2105
- }>>;
2106
- prompt_injection: z.ZodDefault<z.ZodObject<{
2107
- enabled: z.ZodDefault<z.ZodBoolean>;
2108
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2109
- }, "strip", z.ZodTypeAny, {
2110
- enabled: boolean;
2111
- mode: "warn" | "block";
2112
- }, {
2113
- enabled?: boolean | undefined;
2114
- mode?: "warn" | "block" | undefined;
2115
- }>>;
2116
- supply_chain: z.ZodDefault<z.ZodObject<{
2117
- enabled: z.ZodDefault<z.ZodBoolean>;
2118
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2119
- force_score_on_critical: z.ZodDefault<z.ZodNumber>;
2120
- }, "strip", z.ZodTypeAny, {
2121
- enabled: boolean;
2122
- mode: "warn" | "block";
2123
- force_score_on_critical: number;
2124
- }, {
2125
- enabled?: boolean | undefined;
2126
- mode?: "warn" | "block" | undefined;
2127
- force_score_on_critical?: number | undefined;
2128
- }>>;
2129
- pr_scope: z.ZodDefault<z.ZodObject<{
2130
- enabled: z.ZodDefault<z.ZodBoolean>;
2131
- max_files: z.ZodDefault<z.ZodNumber>;
2132
- max_changes: z.ZodDefault<z.ZodNumber>;
2133
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2134
- require_plan_for_agent_prs: z.ZodDefault<z.ZodBoolean>;
2135
- }, "strip", z.ZodTypeAny, {
2136
- enabled: boolean;
2137
- max_files: number;
2138
- mode: "warn" | "block";
2139
- max_changes: number;
2140
- require_plan_for_agent_prs: boolean;
2141
- }, {
2142
- enabled?: boolean | undefined;
2143
- max_files?: number | undefined;
2144
- mode?: "warn" | "block" | undefined;
2145
- max_changes?: number | undefined;
2146
- require_plan_for_agent_prs?: boolean | undefined;
2147
- }>>;
2148
- duplicate_logic: z.ZodDefault<z.ZodObject<{
2149
- enabled: z.ZodDefault<z.ZodBoolean>;
2150
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2151
- }, "strip", z.ZodTypeAny, {
2152
- enabled: boolean;
2153
- mode: "warn" | "block";
2154
- }, {
2155
- enabled?: boolean | undefined;
2156
- mode?: "warn" | "block" | undefined;
2157
- }>>;
2158
- cross_repo_impact: z.ZodDefault<z.ZodObject<{
2159
- enabled: z.ZodDefault<z.ZodBoolean>;
2160
- mode: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
2161
- consumer_registry_path: z.ZodOptional<z.ZodString>;
2162
- }, "strip", z.ZodTypeAny, {
2163
- enabled: boolean;
2164
- mode: "warn" | "block";
2165
- consumer_registry_path?: string | undefined;
2166
- }, {
2167
- enabled?: boolean | undefined;
2168
- mode?: "warn" | "block" | undefined;
2169
- consumer_registry_path?: string | undefined;
2170
- }>>;
2171
- }, "strip", z.ZodTypeAny, {
2172
- ci_integrity: {
2173
- enabled: boolean;
2174
- mode: "warn" | "block";
2175
- };
2176
- workflow_security: {
2177
- enabled: boolean;
2178
- mode: "warn" | "block";
2179
- allow_unpinned_actions: string[];
2180
- };
2181
- supply_chain: {
2182
- enabled: boolean;
2183
- mode: "warn" | "block";
2184
- force_score_on_critical: number;
2185
- };
2186
- pr_scope: {
2187
- enabled: boolean;
2188
- max_files: number;
2189
- mode: "warn" | "block";
2190
- max_changes: number;
2191
- require_plan_for_agent_prs: boolean;
2192
- };
2193
- duplicate_logic: {
2194
- enabled: boolean;
2195
- mode: "warn" | "block";
2196
- };
2197
- cross_repo_impact: {
2198
- enabled: boolean;
2199
- mode: "warn" | "block";
2200
- consumer_registry_path?: string | undefined;
2201
- };
2202
- session_correlation: {
2203
- enabled: boolean;
2204
- mode: "warn" | "block";
2205
- threshold: number;
2206
- window_minutes: number;
2207
- };
2208
- agent_prs: {
2209
- enabled: boolean;
2210
- required_approvals: number;
2211
- require_code_owner_approval: boolean;
2212
- code_owner_reviewers: string[];
2213
- sensitive_paths: string[];
2214
- strict_on_unknown_provenance: boolean;
2215
- risk_threshold?: number | undefined;
2216
- };
2217
- prompt_injection: {
2218
- enabled: boolean;
2219
- mode: "warn" | "block";
2220
- };
2221
- }, {
2222
- ci_integrity?: {
2223
- enabled?: boolean | undefined;
2224
- mode?: "warn" | "block" | undefined;
2225
- } | undefined;
2226
- workflow_security?: {
2227
- enabled?: boolean | undefined;
2228
- mode?: "warn" | "block" | undefined;
2229
- allow_unpinned_actions?: string[] | undefined;
2230
- } | undefined;
2231
- supply_chain?: {
2232
- enabled?: boolean | undefined;
2233
- mode?: "warn" | "block" | undefined;
2234
- force_score_on_critical?: number | undefined;
2235
- } | undefined;
2236
- pr_scope?: {
2237
- enabled?: boolean | undefined;
2238
- max_files?: number | undefined;
2239
- mode?: "warn" | "block" | undefined;
2240
- max_changes?: number | undefined;
2241
- require_plan_for_agent_prs?: boolean | undefined;
2242
- } | undefined;
2243
- duplicate_logic?: {
2244
- enabled?: boolean | undefined;
2245
- mode?: "warn" | "block" | undefined;
2246
- } | undefined;
2247
- cross_repo_impact?: {
2248
- enabled?: boolean | undefined;
2249
- mode?: "warn" | "block" | undefined;
2250
- consumer_registry_path?: string | undefined;
2251
- } | undefined;
2252
- session_correlation?: {
2253
- enabled?: boolean | undefined;
2254
- mode?: "warn" | "block" | undefined;
2255
- threshold?: number | undefined;
2256
- window_minutes?: number | undefined;
2257
- } | undefined;
2258
- agent_prs?: {
2259
- enabled?: boolean | undefined;
2260
- risk_threshold?: number | undefined;
2261
- required_approvals?: number | undefined;
2262
- require_code_owner_approval?: boolean | undefined;
2263
- code_owner_reviewers?: string[] | undefined;
2264
- sensitive_paths?: string[] | undefined;
2265
- strict_on_unknown_provenance?: boolean | undefined;
2266
- } | undefined;
2267
- prompt_injection?: {
2268
- enabled?: boolean | undefined;
2269
- mode?: "warn" | "block" | undefined;
2270
- } | undefined;
2271
- }>>;
2272
- }, "strip", z.ZodTypeAny, {
2273
- schema_version: number;
2274
- services: Record<string, {
2275
- consumers: (string | {
2276
- repo: string;
2277
- name?: string | undefined;
2278
- branch?: string | undefined;
2279
- notify_webhook?: string | undefined;
2280
- })[];
2281
- paths: string[];
2282
- contracts: string[];
2283
- environment?: string | undefined;
2284
- notify_webhook?: string | undefined;
2285
- }>;
2286
- weights: Record<string, number>;
2287
- thresholds: {
2288
- warn?: number | undefined;
2289
- risk?: number | undefined;
2290
- };
2291
- gate: {
2292
- mode: "release-ready" | "advisory" | "risk-only";
2293
- check_name: string;
2294
- agent_brief?: "off" | "collapsed" | "expanded" | undefined;
2295
- };
2296
- contexts: {
2297
- name: string;
2298
- match: {
2299
- base_branch: string[];
2300
- head_branch: string[];
2301
- labels: string[];
2302
- };
2303
- ci: {
2304
- required_checks: string[];
2305
- optional_checks: string[];
2306
- missing_required: "fail" | "skip";
2307
- };
2308
- thresholds: {
2309
- warn?: number | undefined;
2310
- risk?: number | undefined;
2311
- };
2312
- environment?: string | undefined;
2313
- }[];
2314
- sensitivity: {
2315
- high: string[];
2316
- medium: string[];
2317
- low: string[];
2318
- };
2319
- profiles: {
2320
- match: {
2321
- files_include: string[];
2322
- files_exclude: string[];
2323
- min_files?: number | undefined;
2324
- max_files?: number | undefined;
2325
- };
2326
- weights: Record<string, number>;
2327
- name?: string | undefined;
2328
- }[];
2329
- ignore: string[];
2330
- freeze: {
2331
- days: string[];
2332
- timezone: string;
2333
- message?: string | undefined;
2334
- afterHour?: number | undefined;
2335
- beforeHour?: number | undefined;
2336
- }[];
2337
- environments: Record<string, {
2338
- warn?: number | undefined;
2339
- risk?: number | undefined;
2340
- require_security_clear?: boolean | undefined;
2341
- }>;
2342
- consumer_registry: Record<string, {
2343
- repo: string;
2344
- name?: string | undefined;
2345
- branch?: string | undefined;
2346
- notify_webhook?: string | undefined;
2347
- }>;
2348
- security: {
2349
- severity_threshold: "error" | "warning" | "note" | "none";
2350
- block_on_critical: boolean;
2351
- ignore_rules: string[];
2352
- };
2353
- escalation: {
2354
- acknowledge_sla_minutes: number;
2355
- resolve_sla_minutes: number;
2356
- targets: string[];
2357
- };
2358
- policies: {
2359
- ci_integrity: {
2360
- enabled: boolean;
2361
- mode: "warn" | "block";
2362
- };
2363
- workflow_security: {
2364
- enabled: boolean;
2365
- mode: "warn" | "block";
2366
- allow_unpinned_actions: string[];
2367
- };
2368
- supply_chain: {
2369
- enabled: boolean;
2370
- mode: "warn" | "block";
2371
- force_score_on_critical: number;
2372
- };
2373
- pr_scope: {
2374
- enabled: boolean;
2375
- max_files: number;
2376
- mode: "warn" | "block";
2377
- max_changes: number;
2378
- require_plan_for_agent_prs: boolean;
2379
- };
2380
- duplicate_logic: {
2381
- enabled: boolean;
2382
- mode: "warn" | "block";
2383
- };
2384
- cross_repo_impact: {
2385
- enabled: boolean;
2386
- mode: "warn" | "block";
2387
- consumer_registry_path?: string | undefined;
2388
- };
2389
- session_correlation: {
2390
- enabled: boolean;
2391
- mode: "warn" | "block";
2392
- threshold: number;
2393
- window_minutes: number;
2394
- };
2395
- agent_prs: {
2396
- enabled: boolean;
2397
- required_approvals: number;
2398
- require_code_owner_approval: boolean;
2399
- code_owner_reviewers: string[];
2400
- sensitive_paths: string[];
2401
- strict_on_unknown_provenance: boolean;
2402
- risk_threshold?: number | undefined;
2403
- };
2404
- prompt_injection: {
2405
- enabled: boolean;
2406
- mode: "warn" | "block";
2407
- };
2408
- };
2409
- remediation?: {
2410
- max_loop_rounds: number;
2411
- enabled: boolean;
2412
- } | undefined;
2413
- override?: {
2414
- enabled: boolean;
2415
- max_per_week: number;
2416
- } | undefined;
2417
- tuning?: {
2418
- auto_downgrade: boolean;
2419
- fp_threshold: number;
2420
- digest_webhook_url?: string | undefined;
2421
- } | undefined;
2422
- submission?: {
2423
- enabled: boolean;
2424
- mode: "warn" | "block";
2425
- stale_terms?: string[] | undefined;
2426
- auth_route_allowlist?: string[] | undefined;
2427
- max_file_lines?: number | undefined;
2428
- path_ignore?: string[] | undefined;
2429
- naming_allowlist?: {
2430
- skip_extensions?: string[] | undefined;
2431
- skip_path_patterns?: string[] | undefined;
2432
- skip_comment_markers?: string[] | undefined;
2433
- skip_in_imports?: boolean | undefined;
2434
- } | undefined;
2435
- } | undefined;
2436
- canary?: {
2437
- webhook_type: "vercel" | "generic";
2438
- rollback_on_failure: boolean;
2439
- field_map?: Record<string, string> | undefined;
2440
- } | undefined;
2441
- }, {
2442
- schema_version?: number | undefined;
2443
- remediation?: {
2444
- max_loop_rounds?: number | undefined;
2445
- enabled?: boolean | undefined;
2446
- } | undefined;
2447
- services?: Record<string, {
2448
- paths: string[];
2449
- environment?: string | undefined;
2450
- consumers?: (string | {
2451
- repo: string;
2452
- name?: string | undefined;
2453
- branch?: string | undefined;
2454
- notify_webhook?: string | undefined;
2455
- })[] | undefined;
2456
- notify_webhook?: string | undefined;
2457
- contracts?: string[] | undefined;
2458
- }> | undefined;
2459
- weights?: Record<string, number> | undefined;
2460
- thresholds?: {
2461
- warn?: number | undefined;
2462
- risk?: number | undefined;
2463
- } | undefined;
2464
- gate?: {
2465
- mode?: "release-ready" | "advisory" | "risk-only" | undefined;
2466
- check_name?: string | undefined;
2467
- agent_brief?: "off" | "collapsed" | "expanded" | undefined;
2468
- } | undefined;
2469
- override?: {
2470
- enabled?: boolean | undefined;
2471
- max_per_week?: number | undefined;
2472
- } | undefined;
2473
- tuning?: {
2474
- auto_downgrade?: boolean | undefined;
2475
- digest_webhook_url?: string | undefined;
2476
- fp_threshold?: number | undefined;
2477
- } | undefined;
2478
- submission?: {
2479
- enabled?: boolean | undefined;
2480
- mode?: "warn" | "block" | undefined;
2481
- stale_terms?: string[] | undefined;
2482
- auth_route_allowlist?: string[] | undefined;
2483
- max_file_lines?: number | undefined;
2484
- path_ignore?: string[] | undefined;
2485
- naming_allowlist?: {
2486
- skip_extensions?: string[] | undefined;
2487
- skip_path_patterns?: string[] | undefined;
2488
- skip_comment_markers?: string[] | undefined;
2489
- skip_in_imports?: boolean | undefined;
2490
- } | undefined;
2491
- } | undefined;
2492
- contexts?: {
2493
- name: string;
2494
- match: {
2495
- base_branch?: string[] | undefined;
2496
- head_branch?: string[] | undefined;
2497
- labels?: string[] | undefined;
2498
- };
2499
- environment?: string | undefined;
2500
- ci?: {
2501
- required_checks?: string[] | undefined;
2502
- optional_checks?: string[] | undefined;
2503
- missing_required?: "fail" | "skip" | undefined;
2504
- } | undefined;
2505
- thresholds?: {
2506
- warn?: number | undefined;
2507
- risk?: number | undefined;
2508
- } | undefined;
2509
- }[] | undefined;
2510
- sensitivity?: {
2511
- high?: string[] | undefined;
2512
- medium?: string[] | undefined;
2513
- low?: string[] | undefined;
2514
- } | undefined;
2515
- profiles?: {
2516
- match: {
2517
- files_include?: string[] | undefined;
2518
- files_exclude?: string[] | undefined;
2519
- min_files?: number | undefined;
2520
- max_files?: number | undefined;
2521
- };
2522
- name?: string | undefined;
2523
- weights?: Record<string, number> | undefined;
2524
- }[] | undefined;
2525
- ignore?: string[] | undefined;
2526
- freeze?: {
2527
- message?: string | undefined;
2528
- days?: string[] | undefined;
2529
- afterHour?: number | undefined;
2530
- beforeHour?: number | undefined;
2531
- timezone?: string | undefined;
2532
- }[] | undefined;
2533
- environments?: Record<string, {
2534
- warn?: number | undefined;
2535
- risk?: number | undefined;
2536
- require_security_clear?: boolean | undefined;
2537
- }> | undefined;
2538
- consumer_registry?: Record<string, {
2539
- repo: string;
2540
- name?: string | undefined;
2541
- branch?: string | undefined;
2542
- notify_webhook?: string | undefined;
2543
- }> | undefined;
2544
- security?: {
2545
- severity_threshold?: "error" | "warning" | "note" | "none" | undefined;
2546
- block_on_critical?: boolean | undefined;
2547
- ignore_rules?: string[] | undefined;
2548
- } | undefined;
2549
- canary?: {
2550
- webhook_type?: "vercel" | "generic" | undefined;
2551
- field_map?: Record<string, string> | undefined;
2552
- rollback_on_failure?: boolean | undefined;
2553
- } | undefined;
2554
- escalation?: {
2555
- acknowledge_sla_minutes?: number | undefined;
2556
- resolve_sla_minutes?: number | undefined;
2557
- targets?: string[] | undefined;
2558
- } | undefined;
2559
- policies?: {
2560
- ci_integrity?: {
2561
- enabled?: boolean | undefined;
2562
- mode?: "warn" | "block" | undefined;
2563
- } | undefined;
2564
- workflow_security?: {
2565
- enabled?: boolean | undefined;
2566
- mode?: "warn" | "block" | undefined;
2567
- allow_unpinned_actions?: string[] | undefined;
2568
- } | undefined;
2569
- supply_chain?: {
2570
- enabled?: boolean | undefined;
2571
- mode?: "warn" | "block" | undefined;
2572
- force_score_on_critical?: number | undefined;
2573
- } | undefined;
2574
- pr_scope?: {
2575
- enabled?: boolean | undefined;
2576
- max_files?: number | undefined;
2577
- mode?: "warn" | "block" | undefined;
2578
- max_changes?: number | undefined;
2579
- require_plan_for_agent_prs?: boolean | undefined;
2580
- } | undefined;
2581
- duplicate_logic?: {
2582
- enabled?: boolean | undefined;
2583
- mode?: "warn" | "block" | undefined;
2584
- } | undefined;
2585
- cross_repo_impact?: {
2586
- enabled?: boolean | undefined;
2587
- mode?: "warn" | "block" | undefined;
2588
- consumer_registry_path?: string | undefined;
2589
- } | undefined;
2590
- session_correlation?: {
2591
- enabled?: boolean | undefined;
2592
- mode?: "warn" | "block" | undefined;
2593
- threshold?: number | undefined;
2594
- window_minutes?: number | undefined;
2595
- } | undefined;
2596
- agent_prs?: {
2597
- enabled?: boolean | undefined;
2598
- risk_threshold?: number | undefined;
2599
- required_approvals?: number | undefined;
2600
- require_code_owner_approval?: boolean | undefined;
2601
- code_owner_reviewers?: string[] | undefined;
2602
- sensitive_paths?: string[] | undefined;
2603
- strict_on_unknown_provenance?: boolean | undefined;
2604
- } | undefined;
2605
- prompt_injection?: {
2606
- enabled?: boolean | undefined;
2607
- mode?: "warn" | "block" | undefined;
2608
- } | undefined;
2609
- } | undefined;
2610
- }>;
2611
- export type RepoConfig = z.infer<typeof RepoConfig>;
2612
- export interface TrailheadConfig {
2613
- apiKey: string;
2614
- apiUrl: string;
2615
- githubToken?: string;
2616
- healthCheckUrls: string[];
2617
- riskThreshold: number;
2618
- warnThreshold?: number;
2619
- failMode: "open" | "closed";
2620
- selfHeal: boolean;
2621
- addRiskLabels: boolean;
2622
- reviewersOnRisk: string[];
2623
- webhookUrl?: string;
2624
- webhookEvents: string[];
2625
- evaluationStoreUrl?: string;
2626
- trailheadApiKey?: string;
2627
- environment?: string;
2628
- securityGate?: boolean;
2629
- gateMode?: GateMode;
2630
- waitForChecks?: boolean;
2631
- waitTimeoutMinutes?: number;
2632
- checkName?: string;
2633
- ciManifest?: CiManifest | null;
2634
- ciManifestPath?: string;
2635
- agentBrief?: AgentBriefMode;
2636
- submissionGate?: boolean;
2637
- }
2638
- export interface TestRepairResult {
2639
- testFile: string;
2640
- failureType: string;
2641
- strategy: string;
2642
- success: boolean;
2643
- diff?: string;
2644
- }