@ai-dev-orchestrator/schemas 0.1.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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/dist/artifacts/agreement-artifacts.d.ts +311 -0
  4. package/dist/artifacts/agreement-artifacts.js +48 -0
  5. package/dist/artifacts/artifact-dependency-graph.d.ts +775 -0
  6. package/dist/artifacts/artifact-dependency-graph.js +57 -0
  7. package/dist/artifacts/artifact-system.d.ts +657 -0
  8. package/dist/artifacts/artifact-system.js +124 -0
  9. package/dist/artifacts/index.d.ts +3 -0
  10. package/dist/artifacts/index.js +3 -0
  11. package/dist/config/configuration.d.ts +324 -0
  12. package/dist/config/configuration.js +93 -0
  13. package/dist/config/event-bus-config.d.ts +153 -0
  14. package/dist/config/event-bus-config.js +27 -0
  15. package/dist/config/event-payloads.d.ts +919 -0
  16. package/dist/config/event-payloads.js +304 -0
  17. package/dist/config/event-system.d.ts +3231 -0
  18. package/dist/config/event-system.js +428 -0
  19. package/dist/config/event-types.d.ts +62 -0
  20. package/dist/config/event-types.js +66 -0
  21. package/dist/config/index.d.ts +5 -0
  22. package/dist/config/index.js +5 -0
  23. package/dist/dashboard/dashboard-api.d.ts +149 -0
  24. package/dist/dashboard/dashboard-api.js +80 -0
  25. package/dist/dashboard/dashboard-domain.d.ts +1076 -0
  26. package/dist/dashboard/dashboard-domain.js +305 -0
  27. package/dist/dashboard/index.d.ts +3 -0
  28. package/dist/dashboard/index.js +3 -0
  29. package/dist/dashboard/run-creation-params.d.ts +111 -0
  30. package/dist/dashboard/run-creation-params.js +14 -0
  31. package/dist/governance/governance.d.ts +1119 -0
  32. package/dist/governance/governance.js +111 -0
  33. package/dist/governance/index.d.ts +3 -0
  34. package/dist/governance/index.js +3 -0
  35. package/dist/governance/policy-engine.d.ts +634 -0
  36. package/dist/governance/policy-engine.js +214 -0
  37. package/dist/governance/review-resolution.d.ts +1053 -0
  38. package/dist/governance/review-resolution.js +67 -0
  39. package/dist/index.d.ts +10 -0
  40. package/dist/index.js +10 -0
  41. package/dist/observability/diagnostics.d.ts +185 -0
  42. package/dist/observability/diagnostics.js +63 -0
  43. package/dist/observability/index.d.ts +2 -0
  44. package/dist/observability/index.js +2 -0
  45. package/dist/observability/metrics.d.ts +187 -0
  46. package/dist/observability/metrics.js +67 -0
  47. package/dist/persistence/execution-analytics.d.ts +173 -0
  48. package/dist/persistence/execution-analytics.js +71 -0
  49. package/dist/persistence/index.d.ts +5 -0
  50. package/dist/persistence/index.js +5 -0
  51. package/dist/persistence/project-context.d.ts +164 -0
  52. package/dist/persistence/project-context.js +88 -0
  53. package/dist/persistence/repository-model.d.ts +27 -0
  54. package/dist/persistence/repository-model.js +16 -0
  55. package/dist/persistence/run-manifest.d.ts +422 -0
  56. package/dist/persistence/run-manifest.js +118 -0
  57. package/dist/persistence/state-persistence.d.ts +276 -0
  58. package/dist/persistence/state-persistence.js +83 -0
  59. package/dist/runner/built-in-runner-ids.d.ts +8 -0
  60. package/dist/runner/built-in-runner-ids.js +11 -0
  61. package/dist/runner/collaboration-model.d.ts +100 -0
  62. package/dist/runner/collaboration-model.js +19 -0
  63. package/dist/runner/confidence.d.ts +17 -0
  64. package/dist/runner/confidence.js +11 -0
  65. package/dist/runner/index.d.ts +8 -0
  66. package/dist/runner/index.js +8 -0
  67. package/dist/runner/permission-approval.d.ts +38 -0
  68. package/dist/runner/permission-approval.js +14 -0
  69. package/dist/runner/prompt-engine.d.ts +1467 -0
  70. package/dist/runner/prompt-engine.js +193 -0
  71. package/dist/runner/role-system.d.ts +458 -0
  72. package/dist/runner/role-system.js +94 -0
  73. package/dist/runner/runner-system.d.ts +1721 -0
  74. package/dist/runner/runner-system.js +268 -0
  75. package/dist/runner/task-brief.d.ts +18 -0
  76. package/dist/runner/task-brief.js +12 -0
  77. package/dist/shared/index.d.ts +3 -0
  78. package/dist/shared/index.js +3 -0
  79. package/dist/shared/shared.d.ts +30 -0
  80. package/dist/shared/shared.js +27 -0
  81. package/dist/shared/string-enums.d.ts +59 -0
  82. package/dist/shared/string-enums.js +24 -0
  83. package/dist/shared/utils.d.ts +25 -0
  84. package/dist/shared/utils.js +22 -0
  85. package/dist/specification/canonical-specification.d.ts +475 -0
  86. package/dist/specification/canonical-specification.js +151 -0
  87. package/dist/specification/index.d.ts +3 -0
  88. package/dist/specification/index.js +3 -0
  89. package/dist/specification/intake.d.ts +419 -0
  90. package/dist/specification/intake.js +70 -0
  91. package/dist/specification/iteration-contracts.d.ts +421 -0
  92. package/dist/specification/iteration-contracts.js +61 -0
  93. package/dist/workflow/index.d.ts +4 -0
  94. package/dist/workflow/index.js +4 -0
  95. package/dist/workflow/workflow-dsl.d.ts +81 -0
  96. package/dist/workflow/workflow-dsl.js +38 -0
  97. package/dist/workflow/workflow-engine.d.ts +5788 -0
  98. package/dist/workflow/workflow-engine.js +414 -0
  99. package/dist/workflow/workflow-file.d.ts +331 -0
  100. package/dist/workflow/workflow-file.js +41 -0
  101. package/dist/workflow/workflow-journal.d.ts +520 -0
  102. package/dist/workflow/workflow-journal.js +151 -0
  103. package/package.json +39 -0
@@ -0,0 +1,634 @@
1
+ import { z } from 'zod/v4';
2
+ export type { EscalationTrigger, HumanApproval, PolicyTokenUsage } from './governance';
3
+ export declare const policyLayerSchema: z.ZodEnum<{
4
+ role: "role";
5
+ builtin: "builtin";
6
+ organization: "organization";
7
+ project: "project";
8
+ workflow_variant: "workflow_variant";
9
+ stage: "stage";
10
+ }>;
11
+ export type PolicyLayer = z.infer<typeof policyLayerSchema>;
12
+ export declare const policySourceSchema: z.ZodObject<{
13
+ layer: z.ZodEnum<{
14
+ role: "role";
15
+ builtin: "builtin";
16
+ organization: "organization";
17
+ project: "project";
18
+ workflow_variant: "workflow_variant";
19
+ stage: "stage";
20
+ }>;
21
+ filePath: z.ZodOptional<z.ZodString>;
22
+ fieldPath: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
24
+ export type PolicySource = z.infer<typeof policySourceSchema>;
25
+ export declare const policyTypeSchema: z.ZodEnum<{
26
+ custom: "custom";
27
+ iteration_limit: "iteration_limit";
28
+ quality_gate: "quality_gate";
29
+ specification_readiness: "specification_readiness";
30
+ stage_skip: "stage_skip";
31
+ retry_limit: "retry_limit";
32
+ token_budget: "token_budget";
33
+ model_constraint: "model_constraint";
34
+ ownership: "ownership";
35
+ confidence_gate: "confidence_gate";
36
+ }>;
37
+ export type PolicyType = z.infer<typeof policyTypeSchema>;
38
+ export declare const policyCompositionSchema: z.ZodEnum<{
39
+ conjunctive: "conjunctive";
40
+ disjunctive: "disjunctive";
41
+ }>;
42
+ export type PolicyComposition = z.infer<typeof policyCompositionSchema>;
43
+ export declare const policyScopeSchema: z.ZodObject<{
44
+ organization: z.ZodOptional<z.ZodString>;
45
+ project: z.ZodOptional<z.ZodString>;
46
+ workflowVariant: z.ZodOptional<z.ZodString>;
47
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
48
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
49
+ }, z.core.$strip>;
50
+ export type PolicyScope = z.infer<typeof policyScopeSchema>;
51
+ export declare const policyIterationLimitConfigSchema: z.ZodObject<{
52
+ maxReviewIterations: z.ZodNumber;
53
+ maxJudgeArbitrations: z.ZodNumber;
54
+ maxClarificationRounds: z.ZodNumber;
55
+ maxAcceptanceIterations: z.ZodNumber;
56
+ }, z.core.$strip>;
57
+ export type PolicyIterationLimitConfig = z.infer<typeof policyIterationLimitConfigSchema>;
58
+ export declare const policyQualityGateConfigSchema: z.ZodObject<{
59
+ maxHighSeverityFindings: z.ZodNumber;
60
+ maxMediumSeverityFindings: z.ZodNumber;
61
+ requireDesignReview: z.ZodOptional<z.ZodBoolean>;
62
+ requireAdversarialReview: z.ZodOptional<z.ZodBoolean>;
63
+ }, z.core.$strip>;
64
+ export type PolicyQualityGateConfig = z.infer<typeof policyQualityGateConfigSchema>;
65
+ export declare const policySpecReadinessConfigSchema: z.ZodObject<{
66
+ minCompletenessScore: z.ZodNumber;
67
+ }, z.core.$strip>;
68
+ export type PolicySpecReadinessConfig = z.infer<typeof policySpecReadinessConfigSchema>;
69
+ export declare const policyStageSkipConditionSchema: z.ZodObject<{
70
+ field: z.ZodString;
71
+ key: z.ZodOptional<z.ZodString>;
72
+ equals: z.ZodOptional<z.ZodUnknown>;
73
+ reason: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strip>;
75
+ export declare const policyStageSkipConfigSchema: z.ZodObject<{
76
+ skipWhen: z.ZodReadonly<z.ZodArray<z.ZodObject<{
77
+ field: z.ZodString;
78
+ key: z.ZodOptional<z.ZodString>;
79
+ equals: z.ZodOptional<z.ZodUnknown>;
80
+ reason: z.ZodOptional<z.ZodString>;
81
+ }, z.core.$strip>>>;
82
+ }, z.core.$strip>;
83
+ export type PolicyStageSkipConfig = z.infer<typeof policyStageSkipConfigSchema>;
84
+ export declare const policyRetryLimitConfigSchema: z.ZodObject<{
85
+ maxRetries: z.ZodNumber;
86
+ }, z.core.$strip>;
87
+ export type PolicyRetryLimitConfig = z.infer<typeof policyRetryLimitConfigSchema>;
88
+ export declare const policyTokenBudgetConfigSchema: z.ZodObject<{
89
+ maxTokens: z.ZodNumber;
90
+ }, z.core.$strip>;
91
+ export type PolicyTokenBudgetConfig = z.infer<typeof policyTokenBudgetConfigSchema>;
92
+ export declare const policyModelConstraintConfigSchema: z.ZodObject<{
93
+ allowedModels: z.ZodReadonly<z.ZodArray<z.ZodString>>;
94
+ }, z.core.$strip>;
95
+ export type PolicyModelConstraintConfig = z.infer<typeof policyModelConstraintConfigSchema>;
96
+ export declare const policyOwnershipConfigSchema: z.ZodObject<{
97
+ ownershipMap: z.ZodRecord<z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString>>>;
98
+ strict: z.ZodBoolean;
99
+ }, z.core.$strip>;
100
+ export type PolicyOwnershipConfig = z.infer<typeof policyOwnershipConfigSchema>;
101
+ export declare const policyConfidenceGateConfigSchema: z.ZodObject<{
102
+ modelEscalationThreshold: z.ZodNumber;
103
+ humanEscalationThreshold: z.ZodNumber;
104
+ heuristicWeight: z.ZodNumber;
105
+ heuristicSignals: z.ZodObject<{
106
+ penalizeHedgingLanguage: z.ZodBoolean;
107
+ penalizeHighRetryCount: z.ZodBoolean;
108
+ penalizeUnresolvedFindings: z.ZodBoolean;
109
+ }, z.core.$strip>;
110
+ }, z.core.$strip>;
111
+ export type PolicyConfidenceGateConfig = z.infer<typeof policyConfidenceGateConfigSchema>;
112
+ export declare const policyCustomConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
113
+ export type PolicyCustomConfig = z.infer<typeof policyCustomConfigSchema>;
114
+ export declare const policyDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
115
+ type: z.ZodLiteral<"iteration_limit">;
116
+ config: z.ZodObject<{
117
+ maxReviewIterations: z.ZodNumber;
118
+ maxJudgeArbitrations: z.ZodNumber;
119
+ maxClarificationRounds: z.ZodNumber;
120
+ maxAcceptanceIterations: z.ZodNumber;
121
+ }, z.core.$strip>;
122
+ id: z.ZodString;
123
+ scope: z.ZodObject<{
124
+ organization: z.ZodOptional<z.ZodString>;
125
+ project: z.ZodOptional<z.ZodString>;
126
+ workflowVariant: z.ZodOptional<z.ZodString>;
127
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
128
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
129
+ }, z.core.$strip>;
130
+ composition: z.ZodOptional<z.ZodEnum<{
131
+ conjunctive: "conjunctive";
132
+ disjunctive: "disjunctive";
133
+ }>>;
134
+ enabled: z.ZodBoolean;
135
+ locked: z.ZodOptional<z.ZodBoolean>;
136
+ }, z.core.$strip>, z.ZodObject<{
137
+ type: z.ZodLiteral<"quality_gate">;
138
+ config: z.ZodObject<{
139
+ maxHighSeverityFindings: z.ZodNumber;
140
+ maxMediumSeverityFindings: z.ZodNumber;
141
+ requireDesignReview: z.ZodOptional<z.ZodBoolean>;
142
+ requireAdversarialReview: z.ZodOptional<z.ZodBoolean>;
143
+ }, z.core.$strip>;
144
+ id: z.ZodString;
145
+ scope: z.ZodObject<{
146
+ organization: z.ZodOptional<z.ZodString>;
147
+ project: z.ZodOptional<z.ZodString>;
148
+ workflowVariant: z.ZodOptional<z.ZodString>;
149
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
150
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
151
+ }, z.core.$strip>;
152
+ composition: z.ZodOptional<z.ZodEnum<{
153
+ conjunctive: "conjunctive";
154
+ disjunctive: "disjunctive";
155
+ }>>;
156
+ enabled: z.ZodBoolean;
157
+ locked: z.ZodOptional<z.ZodBoolean>;
158
+ }, z.core.$strip>, z.ZodObject<{
159
+ type: z.ZodLiteral<"specification_readiness">;
160
+ config: z.ZodObject<{
161
+ minCompletenessScore: z.ZodNumber;
162
+ }, z.core.$strip>;
163
+ id: z.ZodString;
164
+ scope: z.ZodObject<{
165
+ organization: z.ZodOptional<z.ZodString>;
166
+ project: z.ZodOptional<z.ZodString>;
167
+ workflowVariant: z.ZodOptional<z.ZodString>;
168
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
169
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
170
+ }, z.core.$strip>;
171
+ composition: z.ZodOptional<z.ZodEnum<{
172
+ conjunctive: "conjunctive";
173
+ disjunctive: "disjunctive";
174
+ }>>;
175
+ enabled: z.ZodBoolean;
176
+ locked: z.ZodOptional<z.ZodBoolean>;
177
+ }, z.core.$strip>, z.ZodObject<{
178
+ type: z.ZodLiteral<"stage_skip">;
179
+ config: z.ZodObject<{
180
+ skipWhen: z.ZodReadonly<z.ZodArray<z.ZodObject<{
181
+ field: z.ZodString;
182
+ key: z.ZodOptional<z.ZodString>;
183
+ equals: z.ZodOptional<z.ZodUnknown>;
184
+ reason: z.ZodOptional<z.ZodString>;
185
+ }, z.core.$strip>>>;
186
+ }, z.core.$strip>;
187
+ id: z.ZodString;
188
+ scope: z.ZodObject<{
189
+ organization: z.ZodOptional<z.ZodString>;
190
+ project: z.ZodOptional<z.ZodString>;
191
+ workflowVariant: z.ZodOptional<z.ZodString>;
192
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
193
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
194
+ }, z.core.$strip>;
195
+ composition: z.ZodOptional<z.ZodEnum<{
196
+ conjunctive: "conjunctive";
197
+ disjunctive: "disjunctive";
198
+ }>>;
199
+ enabled: z.ZodBoolean;
200
+ locked: z.ZodOptional<z.ZodBoolean>;
201
+ }, z.core.$strip>, z.ZodObject<{
202
+ type: z.ZodLiteral<"retry_limit">;
203
+ config: z.ZodObject<{
204
+ maxRetries: z.ZodNumber;
205
+ }, z.core.$strip>;
206
+ id: z.ZodString;
207
+ scope: z.ZodObject<{
208
+ organization: z.ZodOptional<z.ZodString>;
209
+ project: z.ZodOptional<z.ZodString>;
210
+ workflowVariant: z.ZodOptional<z.ZodString>;
211
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
212
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
213
+ }, z.core.$strip>;
214
+ composition: z.ZodOptional<z.ZodEnum<{
215
+ conjunctive: "conjunctive";
216
+ disjunctive: "disjunctive";
217
+ }>>;
218
+ enabled: z.ZodBoolean;
219
+ locked: z.ZodOptional<z.ZodBoolean>;
220
+ }, z.core.$strip>, z.ZodObject<{
221
+ type: z.ZodLiteral<"token_budget">;
222
+ config: z.ZodObject<{
223
+ maxTokens: z.ZodNumber;
224
+ }, z.core.$strip>;
225
+ id: z.ZodString;
226
+ scope: z.ZodObject<{
227
+ organization: z.ZodOptional<z.ZodString>;
228
+ project: z.ZodOptional<z.ZodString>;
229
+ workflowVariant: z.ZodOptional<z.ZodString>;
230
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
231
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
232
+ }, z.core.$strip>;
233
+ composition: z.ZodOptional<z.ZodEnum<{
234
+ conjunctive: "conjunctive";
235
+ disjunctive: "disjunctive";
236
+ }>>;
237
+ enabled: z.ZodBoolean;
238
+ locked: z.ZodOptional<z.ZodBoolean>;
239
+ }, z.core.$strip>, z.ZodObject<{
240
+ type: z.ZodLiteral<"model_constraint">;
241
+ config: z.ZodObject<{
242
+ allowedModels: z.ZodReadonly<z.ZodArray<z.ZodString>>;
243
+ }, z.core.$strip>;
244
+ id: z.ZodString;
245
+ scope: z.ZodObject<{
246
+ organization: z.ZodOptional<z.ZodString>;
247
+ project: z.ZodOptional<z.ZodString>;
248
+ workflowVariant: z.ZodOptional<z.ZodString>;
249
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
250
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
251
+ }, z.core.$strip>;
252
+ composition: z.ZodOptional<z.ZodEnum<{
253
+ conjunctive: "conjunctive";
254
+ disjunctive: "disjunctive";
255
+ }>>;
256
+ enabled: z.ZodBoolean;
257
+ locked: z.ZodOptional<z.ZodBoolean>;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ type: z.ZodLiteral<"ownership">;
260
+ config: z.ZodObject<{
261
+ ownershipMap: z.ZodRecord<z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString>>>;
262
+ strict: z.ZodBoolean;
263
+ }, z.core.$strip>;
264
+ id: z.ZodString;
265
+ scope: z.ZodObject<{
266
+ organization: z.ZodOptional<z.ZodString>;
267
+ project: z.ZodOptional<z.ZodString>;
268
+ workflowVariant: z.ZodOptional<z.ZodString>;
269
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
270
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
271
+ }, z.core.$strip>;
272
+ composition: z.ZodOptional<z.ZodEnum<{
273
+ conjunctive: "conjunctive";
274
+ disjunctive: "disjunctive";
275
+ }>>;
276
+ enabled: z.ZodBoolean;
277
+ locked: z.ZodOptional<z.ZodBoolean>;
278
+ }, z.core.$strip>, z.ZodObject<{
279
+ type: z.ZodLiteral<"confidence_gate">;
280
+ config: z.ZodObject<{
281
+ modelEscalationThreshold: z.ZodNumber;
282
+ humanEscalationThreshold: z.ZodNumber;
283
+ heuristicWeight: z.ZodNumber;
284
+ heuristicSignals: z.ZodObject<{
285
+ penalizeHedgingLanguage: z.ZodBoolean;
286
+ penalizeHighRetryCount: z.ZodBoolean;
287
+ penalizeUnresolvedFindings: z.ZodBoolean;
288
+ }, z.core.$strip>;
289
+ }, z.core.$strip>;
290
+ id: z.ZodString;
291
+ scope: z.ZodObject<{
292
+ organization: z.ZodOptional<z.ZodString>;
293
+ project: z.ZodOptional<z.ZodString>;
294
+ workflowVariant: z.ZodOptional<z.ZodString>;
295
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
296
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
297
+ }, z.core.$strip>;
298
+ composition: z.ZodOptional<z.ZodEnum<{
299
+ conjunctive: "conjunctive";
300
+ disjunctive: "disjunctive";
301
+ }>>;
302
+ enabled: z.ZodBoolean;
303
+ locked: z.ZodOptional<z.ZodBoolean>;
304
+ }, z.core.$strip>, z.ZodObject<{
305
+ type: z.ZodLiteral<"custom">;
306
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
307
+ id: z.ZodString;
308
+ scope: z.ZodObject<{
309
+ organization: z.ZodOptional<z.ZodString>;
310
+ project: z.ZodOptional<z.ZodString>;
311
+ workflowVariant: z.ZodOptional<z.ZodString>;
312
+ stages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
313
+ roles: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
314
+ }, z.core.$strip>;
315
+ composition: z.ZodOptional<z.ZodEnum<{
316
+ conjunctive: "conjunctive";
317
+ disjunctive: "disjunctive";
318
+ }>>;
319
+ enabled: z.ZodBoolean;
320
+ locked: z.ZodOptional<z.ZodBoolean>;
321
+ }, z.core.$strip>], "type">;
322
+ export type PolicyDefinition = z.infer<typeof policyDefinitionSchema>;
323
+ export declare const policyOutcomeSchema: z.ZodEnum<{
324
+ deny: "deny";
325
+ escalate: "escalate";
326
+ allow: "allow";
327
+ }>;
328
+ export type PolicyOutcome = z.infer<typeof policyOutcomeSchema>;
329
+ export declare const policyResultOutcomeSchema: z.ZodEnum<{
330
+ pass: "pass";
331
+ fail: "fail";
332
+ skip: "skip";
333
+ warn: "warn";
334
+ }>;
335
+ export type PolicyResultOutcome = z.infer<typeof policyResultOutcomeSchema>;
336
+ export declare const policyResultSchema: z.ZodObject<{
337
+ policyId: z.ZodString;
338
+ policyType: z.ZodEnum<{
339
+ custom: "custom";
340
+ iteration_limit: "iteration_limit";
341
+ quality_gate: "quality_gate";
342
+ specification_readiness: "specification_readiness";
343
+ stage_skip: "stage_skip";
344
+ retry_limit: "retry_limit";
345
+ token_budget: "token_budget";
346
+ model_constraint: "model_constraint";
347
+ ownership: "ownership";
348
+ confidence_gate: "confidence_gate";
349
+ }>;
350
+ outcome: z.ZodEnum<{
351
+ pass: "pass";
352
+ fail: "fail";
353
+ skip: "skip";
354
+ warn: "warn";
355
+ }>;
356
+ reason: z.ZodString;
357
+ source: z.ZodObject<{
358
+ layer: z.ZodEnum<{
359
+ role: "role";
360
+ builtin: "builtin";
361
+ organization: "organization";
362
+ project: "project";
363
+ workflow_variant: "workflow_variant";
364
+ stage: "stage";
365
+ }>;
366
+ filePath: z.ZodOptional<z.ZodString>;
367
+ fieldPath: z.ZodOptional<z.ZodString>;
368
+ }, z.core.$strip>;
369
+ detail: z.ZodOptional<z.ZodString>;
370
+ escalationTrigger: z.ZodOptional<z.ZodEnum<{
371
+ iteration_limit_exceeded: "iteration_limit_exceeded";
372
+ quality_gate_failed: "quality_gate_failed";
373
+ unresolvable_conflict: "unresolvable_conflict";
374
+ human_requested: "human_requested";
375
+ token_budget_exceeded: "token_budget_exceeded";
376
+ retry_limit_exceeded: "retry_limit_exceeded";
377
+ confidence_too_low: "confidence_too_low";
378
+ provider_failure: "provider_failure";
379
+ timeout: "timeout";
380
+ unrecoverable_error: "unrecoverable_error";
381
+ }>>;
382
+ }, z.core.$strip>;
383
+ export type PolicyResult = z.infer<typeof policyResultSchema>;
384
+ export declare const policyFindingRefSchema: z.ZodObject<{
385
+ id: z.ZodString;
386
+ severity: z.ZodString;
387
+ blocking: z.ZodString;
388
+ status: z.ZodString;
389
+ }, z.core.$strip>;
390
+ export type PolicyFindingRef = z.infer<typeof policyFindingRefSchema>;
391
+ export declare const policyContextSchema: z.ZodObject<{
392
+ runId: z.ZodString;
393
+ currentState: z.ZodString;
394
+ requestedTransition: z.ZodOptional<z.ZodObject<{
395
+ from: z.ZodString;
396
+ to: z.ZodString;
397
+ }, z.core.$strip>>;
398
+ artifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
399
+ type: z.ZodEnum<{
400
+ intake_requirements: "intake_requirements";
401
+ canonical_specification: "canonical_specification";
402
+ clarification_questions: "clarification_questions";
403
+ clarification_answers: "clarification_answers";
404
+ plan: "plan";
405
+ plan_review: "plan_review";
406
+ test_plan: "test_plan";
407
+ implementation: "implementation";
408
+ static_review: "static_review";
409
+ security_review: "security_review";
410
+ performance_review: "performance_review";
411
+ adversarial_review: "adversarial_review";
412
+ design_review: "design_review";
413
+ docs_review: "docs_review";
414
+ ux_review: "ux_review";
415
+ review_report: "review_report";
416
+ remediation_plan: "remediation_plan";
417
+ verification: "verification";
418
+ judge_decision: "judge_decision";
419
+ planning_agreement: "planning_agreement";
420
+ implementation_agreement: "implementation_agreement";
421
+ verification_agreement: "verification_agreement";
422
+ release_summary: "release_summary";
423
+ release_agreement: "release_agreement";
424
+ escalation_context: "escalation_context";
425
+ run_manifest: "run_manifest";
426
+ codebase_context: "codebase_context";
427
+ test_suite: "test_suite";
428
+ acceptance_validation: "acceptance_validation";
429
+ review_findings: "review_findings";
430
+ task_breakdown: "task_breakdown";
431
+ decomposition_review: "decomposition_review";
432
+ task_specifications: "task_specifications";
433
+ pr_diff_context: "pr_diff_context";
434
+ }>;
435
+ name: z.ZodString;
436
+ version: z.ZodNumber;
437
+ checksum: z.ZodString;
438
+ }, z.core.$strip>>>;
439
+ findings: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
440
+ id: z.ZodString;
441
+ severity: z.ZodString;
442
+ blocking: z.ZodString;
443
+ status: z.ZodString;
444
+ }, z.core.$strip>>>>;
445
+ iterationCount: z.ZodOptional<z.ZodNumber>;
446
+ role: z.ZodOptional<z.ZodString>;
447
+ workflowVariant: z.ZodOptional<z.ZodString>;
448
+ humanApproval: z.ZodOptional<z.ZodObject<{
449
+ approvedBy: z.ZodString;
450
+ timestamp: z.ZodString;
451
+ conditions: z.ZodOptional<z.ZodString>;
452
+ artifactRef: z.ZodOptional<z.ZodObject<{
453
+ type: z.ZodEnum<{
454
+ intake_requirements: "intake_requirements";
455
+ canonical_specification: "canonical_specification";
456
+ clarification_questions: "clarification_questions";
457
+ clarification_answers: "clarification_answers";
458
+ plan: "plan";
459
+ plan_review: "plan_review";
460
+ test_plan: "test_plan";
461
+ implementation: "implementation";
462
+ static_review: "static_review";
463
+ security_review: "security_review";
464
+ performance_review: "performance_review";
465
+ adversarial_review: "adversarial_review";
466
+ design_review: "design_review";
467
+ docs_review: "docs_review";
468
+ ux_review: "ux_review";
469
+ review_report: "review_report";
470
+ remediation_plan: "remediation_plan";
471
+ verification: "verification";
472
+ judge_decision: "judge_decision";
473
+ planning_agreement: "planning_agreement";
474
+ implementation_agreement: "implementation_agreement";
475
+ verification_agreement: "verification_agreement";
476
+ release_summary: "release_summary";
477
+ release_agreement: "release_agreement";
478
+ escalation_context: "escalation_context";
479
+ run_manifest: "run_manifest";
480
+ codebase_context: "codebase_context";
481
+ test_suite: "test_suite";
482
+ acceptance_validation: "acceptance_validation";
483
+ review_findings: "review_findings";
484
+ task_breakdown: "task_breakdown";
485
+ decomposition_review: "decomposition_review";
486
+ task_specifications: "task_specifications";
487
+ pr_diff_context: "pr_diff_context";
488
+ }>;
489
+ name: z.ZodString;
490
+ version: z.ZodNumber;
491
+ checksum: z.ZodString;
492
+ }, z.core.$strip>>;
493
+ }, z.core.$strip>>;
494
+ tokenUsage: z.ZodOptional<z.ZodObject<{
495
+ inputTokens: z.ZodNumber;
496
+ outputTokens: z.ZodNumber;
497
+ totalTokens: z.ZodNumber;
498
+ }, z.core.$strip>>;
499
+ metadata: z.ZodOptional<z.ZodObject<{
500
+ completenessScore: z.ZodOptional<z.ZodNumber>;
501
+ ambiguityCount: z.ZodOptional<z.ZodNumber>;
502
+ model: z.ZodOptional<z.ZodString>;
503
+ retryCount: z.ZodOptional<z.ZodNumber>;
504
+ skipStage: z.ZodOptional<z.ZodBoolean>;
505
+ }, z.core.$catchall<z.ZodUnknown>>>;
506
+ }, z.core.$strip>;
507
+ export type PolicyContext = z.infer<typeof policyContextSchema>;
508
+ export declare const policyDecisionSchema: z.ZodObject<{
509
+ outcome: z.ZodEnum<{
510
+ deny: "deny";
511
+ escalate: "escalate";
512
+ allow: "allow";
513
+ }>;
514
+ results: z.ZodReadonly<z.ZodArray<z.ZodObject<{
515
+ policyId: z.ZodString;
516
+ policyType: z.ZodEnum<{
517
+ custom: "custom";
518
+ iteration_limit: "iteration_limit";
519
+ quality_gate: "quality_gate";
520
+ specification_readiness: "specification_readiness";
521
+ stage_skip: "stage_skip";
522
+ retry_limit: "retry_limit";
523
+ token_budget: "token_budget";
524
+ model_constraint: "model_constraint";
525
+ ownership: "ownership";
526
+ confidence_gate: "confidence_gate";
527
+ }>;
528
+ outcome: z.ZodEnum<{
529
+ pass: "pass";
530
+ fail: "fail";
531
+ skip: "skip";
532
+ warn: "warn";
533
+ }>;
534
+ reason: z.ZodString;
535
+ source: z.ZodObject<{
536
+ layer: z.ZodEnum<{
537
+ role: "role";
538
+ builtin: "builtin";
539
+ organization: "organization";
540
+ project: "project";
541
+ workflow_variant: "workflow_variant";
542
+ stage: "stage";
543
+ }>;
544
+ filePath: z.ZodOptional<z.ZodString>;
545
+ fieldPath: z.ZodOptional<z.ZodString>;
546
+ }, z.core.$strip>;
547
+ detail: z.ZodOptional<z.ZodString>;
548
+ escalationTrigger: z.ZodOptional<z.ZodEnum<{
549
+ iteration_limit_exceeded: "iteration_limit_exceeded";
550
+ quality_gate_failed: "quality_gate_failed";
551
+ unresolvable_conflict: "unresolvable_conflict";
552
+ human_requested: "human_requested";
553
+ token_budget_exceeded: "token_budget_exceeded";
554
+ retry_limit_exceeded: "retry_limit_exceeded";
555
+ confidence_too_low: "confidence_too_low";
556
+ provider_failure: "provider_failure";
557
+ timeout: "timeout";
558
+ unrecoverable_error: "unrecoverable_error";
559
+ }>>;
560
+ }, z.core.$strip>>>;
561
+ reason: z.ZodString;
562
+ remediations: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
563
+ escalationTrigger: z.ZodOptional<z.ZodEnum<{
564
+ iteration_limit_exceeded: "iteration_limit_exceeded";
565
+ quality_gate_failed: "quality_gate_failed";
566
+ unresolvable_conflict: "unresolvable_conflict";
567
+ human_requested: "human_requested";
568
+ token_budget_exceeded: "token_budget_exceeded";
569
+ retry_limit_exceeded: "retry_limit_exceeded";
570
+ confidence_too_low: "confidence_too_low";
571
+ provider_failure: "provider_failure";
572
+ timeout: "timeout";
573
+ unrecoverable_error: "unrecoverable_error";
574
+ }>>;
575
+ }, z.core.$strip>;
576
+ export type PolicyDecision = z.infer<typeof policyDecisionSchema>;
577
+ export declare const mergeLogEntrySchema: z.ZodObject<{
578
+ policyId: z.ZodString;
579
+ field: z.ZodString;
580
+ fromLayer: z.ZodEnum<{
581
+ role: "role";
582
+ builtin: "builtin";
583
+ organization: "organization";
584
+ project: "project";
585
+ workflow_variant: "workflow_variant";
586
+ stage: "stage";
587
+ }>;
588
+ toLayer: z.ZodEnum<{
589
+ role: "role";
590
+ builtin: "builtin";
591
+ organization: "organization";
592
+ project: "project";
593
+ workflow_variant: "workflow_variant";
594
+ stage: "stage";
595
+ }>;
596
+ action: z.ZodEnum<{
597
+ override: "override";
598
+ merge: "merge";
599
+ append: "append";
600
+ blocked_by_lock: "blocked_by_lock";
601
+ }>;
602
+ fromValue: z.ZodUnknown;
603
+ toValue: z.ZodUnknown;
604
+ }, z.core.$strip>;
605
+ export type MergeLogEntry = z.infer<typeof mergeLogEntrySchema>;
606
+ export declare const policyTypeInfoSchema: z.ZodObject<{
607
+ type: z.ZodEnum<{
608
+ custom: "custom";
609
+ iteration_limit: "iteration_limit";
610
+ quality_gate: "quality_gate";
611
+ specification_readiness: "specification_readiness";
612
+ stage_skip: "stage_skip";
613
+ retry_limit: "retry_limit";
614
+ token_budget: "token_budget";
615
+ model_constraint: "model_constraint";
616
+ ownership: "ownership";
617
+ confidence_gate: "confidence_gate";
618
+ }>;
619
+ description: z.ZodString;
620
+ configSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
621
+ builtIn: z.ZodBoolean;
622
+ }, z.core.$strip>;
623
+ export type PolicyTypeInfo = z.infer<typeof policyTypeInfoSchema>;
624
+ export declare const policyValidationResultSchema: z.ZodObject<{
625
+ valid: z.ZodBoolean;
626
+ errors: z.ZodReadonly<z.ZodArray<z.ZodString>>;
627
+ warnings: z.ZodReadonly<z.ZodArray<z.ZodString>>;
628
+ }, z.core.$strip>;
629
+ export type PolicyValidationResult = z.infer<typeof policyValidationResultSchema>;
630
+ export interface ResolvedPolicySet {
631
+ readonly policies: readonly PolicyDefinition[];
632
+ readonly sources: ReadonlyMap<string, PolicySource>;
633
+ readonly mergeLog: readonly MergeLogEntry[];
634
+ }