@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.
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/artifacts/agreement-artifacts.d.ts +311 -0
- package/dist/artifacts/agreement-artifacts.js +48 -0
- package/dist/artifacts/artifact-dependency-graph.d.ts +775 -0
- package/dist/artifacts/artifact-dependency-graph.js +57 -0
- package/dist/artifacts/artifact-system.d.ts +657 -0
- package/dist/artifacts/artifact-system.js +124 -0
- package/dist/artifacts/index.d.ts +3 -0
- package/dist/artifacts/index.js +3 -0
- package/dist/config/configuration.d.ts +324 -0
- package/dist/config/configuration.js +93 -0
- package/dist/config/event-bus-config.d.ts +153 -0
- package/dist/config/event-bus-config.js +27 -0
- package/dist/config/event-payloads.d.ts +919 -0
- package/dist/config/event-payloads.js +304 -0
- package/dist/config/event-system.d.ts +3231 -0
- package/dist/config/event-system.js +428 -0
- package/dist/config/event-types.d.ts +62 -0
- package/dist/config/event-types.js +66 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.js +5 -0
- package/dist/dashboard/dashboard-api.d.ts +149 -0
- package/dist/dashboard/dashboard-api.js +80 -0
- package/dist/dashboard/dashboard-domain.d.ts +1076 -0
- package/dist/dashboard/dashboard-domain.js +305 -0
- package/dist/dashboard/index.d.ts +3 -0
- package/dist/dashboard/index.js +3 -0
- package/dist/dashboard/run-creation-params.d.ts +111 -0
- package/dist/dashboard/run-creation-params.js +14 -0
- package/dist/governance/governance.d.ts +1119 -0
- package/dist/governance/governance.js +111 -0
- package/dist/governance/index.d.ts +3 -0
- package/dist/governance/index.js +3 -0
- package/dist/governance/policy-engine.d.ts +634 -0
- package/dist/governance/policy-engine.js +214 -0
- package/dist/governance/review-resolution.d.ts +1053 -0
- package/dist/governance/review-resolution.js +67 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/observability/diagnostics.d.ts +185 -0
- package/dist/observability/diagnostics.js +63 -0
- package/dist/observability/index.d.ts +2 -0
- package/dist/observability/index.js +2 -0
- package/dist/observability/metrics.d.ts +187 -0
- package/dist/observability/metrics.js +67 -0
- package/dist/persistence/execution-analytics.d.ts +173 -0
- package/dist/persistence/execution-analytics.js +71 -0
- package/dist/persistence/index.d.ts +5 -0
- package/dist/persistence/index.js +5 -0
- package/dist/persistence/project-context.d.ts +164 -0
- package/dist/persistence/project-context.js +88 -0
- package/dist/persistence/repository-model.d.ts +27 -0
- package/dist/persistence/repository-model.js +16 -0
- package/dist/persistence/run-manifest.d.ts +422 -0
- package/dist/persistence/run-manifest.js +118 -0
- package/dist/persistence/state-persistence.d.ts +276 -0
- package/dist/persistence/state-persistence.js +83 -0
- package/dist/runner/built-in-runner-ids.d.ts +8 -0
- package/dist/runner/built-in-runner-ids.js +11 -0
- package/dist/runner/collaboration-model.d.ts +100 -0
- package/dist/runner/collaboration-model.js +19 -0
- package/dist/runner/confidence.d.ts +17 -0
- package/dist/runner/confidence.js +11 -0
- package/dist/runner/index.d.ts +8 -0
- package/dist/runner/index.js +8 -0
- package/dist/runner/permission-approval.d.ts +38 -0
- package/dist/runner/permission-approval.js +14 -0
- package/dist/runner/prompt-engine.d.ts +1467 -0
- package/dist/runner/prompt-engine.js +193 -0
- package/dist/runner/role-system.d.ts +458 -0
- package/dist/runner/role-system.js +94 -0
- package/dist/runner/runner-system.d.ts +1721 -0
- package/dist/runner/runner-system.js +268 -0
- package/dist/runner/task-brief.d.ts +18 -0
- package/dist/runner/task-brief.js +12 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/shared.d.ts +30 -0
- package/dist/shared/shared.js +27 -0
- package/dist/shared/string-enums.d.ts +59 -0
- package/dist/shared/string-enums.js +24 -0
- package/dist/shared/utils.d.ts +25 -0
- package/dist/shared/utils.js +22 -0
- package/dist/specification/canonical-specification.d.ts +475 -0
- package/dist/specification/canonical-specification.js +151 -0
- package/dist/specification/index.d.ts +3 -0
- package/dist/specification/index.js +3 -0
- package/dist/specification/intake.d.ts +419 -0
- package/dist/specification/intake.js +70 -0
- package/dist/specification/iteration-contracts.d.ts +421 -0
- package/dist/specification/iteration-contracts.js +61 -0
- package/dist/workflow/index.d.ts +4 -0
- package/dist/workflow/index.js +4 -0
- package/dist/workflow/workflow-dsl.d.ts +81 -0
- package/dist/workflow/workflow-dsl.js +38 -0
- package/dist/workflow/workflow-engine.d.ts +5788 -0
- package/dist/workflow/workflow-engine.js +414 -0
- package/dist/workflow/workflow-file.d.ts +331 -0
- package/dist/workflow/workflow-file.js +41 -0
- package/dist/workflow/workflow-journal.d.ts +520 -0
- package/dist/workflow/workflow-journal.js +151 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AI Dev Orchestrator Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @ai-dev-orchestrator/schemas
|
|
2
|
+
|
|
3
|
+
Shared Zod schemas and inferred TypeScript types that define every data structure in the platform. All other packages depend on these schemas for type-safe validation at runtime boundaries.
|
|
4
|
+
|
|
5
|
+
## Architecture Layer
|
|
6
|
+
|
|
7
|
+
**Foundation** -- provides the canonical type definitions that all higher layers import.
|
|
8
|
+
|
|
9
|
+
## Workspace Dependencies
|
|
10
|
+
|
|
11
|
+
None (only external dependency: `zod`).
|
|
12
|
+
|
|
13
|
+
## Structure
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
src/
|
|
17
|
+
shared/
|
|
18
|
+
artifacts/
|
|
19
|
+
config/
|
|
20
|
+
dashboard/
|
|
21
|
+
governance/
|
|
22
|
+
observability/
|
|
23
|
+
persistence/
|
|
24
|
+
runner/
|
|
25
|
+
specification/
|
|
26
|
+
workflow/
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Key Exports
|
|
30
|
+
|
|
31
|
+
Each sub-module exports Zod schemas (camelCase, `*Schema` suffix) and inferred TypeScript types (PascalCase). Representative exports per group:
|
|
32
|
+
|
|
33
|
+
**shared** -- `runIdSchema`/`RunId`, `workerIdSchema`/`WorkerId`, branded ID types, `Result`/`ok`/`err` monad, string enums (`ThreeTierSeverity`, `SessionTransport`, `LiveRequestKind`), `safeParseResponse`.
|
|
34
|
+
|
|
35
|
+
**artifacts** -- `ARTIFACT_TYPES`, `artifactTypeSchema`/`ArtifactType`, `artifactSchema`/`Artifact`, `agreementArtifactSchema`, `dependencyEdgeSchema`, `provenanceRecordSchema`, and 20+ related schemas.
|
|
36
|
+
|
|
37
|
+
**workflow** -- `workflowDefinitionSchema`, `stateDefinitionSchema`, `transitionDefinitionSchema`, guard and action schemas (16 guard variants, 7 action variants), `engineStateSchema`, `journalEventTypeSchema`, and 15+ event data schemas.
|
|
38
|
+
|
|
39
|
+
**specification** -- `canonicalSpecificationSchema`, `intakeResultSchema`, `iterationContractSchema`, `clarificationQuestionSchema`, and validation/merge result types.
|
|
40
|
+
|
|
41
|
+
**governance** -- `governanceDecisionSchema`, `policyDefinitionSchema`, `policyResultSchema`, `findingSchema`, `escalationContextSchema`, and 30+ policy/finding types.
|
|
42
|
+
|
|
43
|
+
**runner** -- `roleIdSchema`/`RoleId`, `ROLE_IDS`, `roleContractSchema`, `dispatchRequestSchema`, `agentSessionSnapshotSchema`, `promptTemplateSchema`, `permissionApprovalEntrySchema`, and 40+ runner/session/prompt types.
|
|
44
|
+
|
|
45
|
+
**config** -- `mergedConfigurationSchema`, `eventBusConfigSchema`, `EVENT_TYPES`, `eventSchema`, and 40+ event payload schemas (`runStartedDataSchema`, `workerDispatchedDataSchema`, etc.).
|
|
46
|
+
|
|
47
|
+
**dashboard** -- `runSummaryViewSchema`, `runStateViewSchema`, `workflowStateViewSchema`, `healthResponseSchema`, `runCreationParamsSchema`.
|
|
48
|
+
|
|
49
|
+
**observability** -- `metricEntrySchema`, `healthCheckResultSchema`, `diagnosticReportSchema`, `performanceSnapshotSchema`.
|
|
50
|
+
|
|
51
|
+
**persistence** -- `persistedStateSchema`, `runManifestSchema`, `discoveryResultSchema`, `lockHandleSchema`.
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const agreementTypeSchema: z.ZodEnum<{
|
|
3
|
+
planning_agreement: "planning_agreement";
|
|
4
|
+
implementation_agreement: "implementation_agreement";
|
|
5
|
+
verification_agreement: "verification_agreement";
|
|
6
|
+
release_agreement: "release_agreement";
|
|
7
|
+
}>;
|
|
8
|
+
export type AgreementType = z.infer<typeof agreementTypeSchema>;
|
|
9
|
+
export declare const approvalStatusSchema: z.ZodEnum<{
|
|
10
|
+
approved: "approved";
|
|
11
|
+
conditionally_approved: "conditionally_approved";
|
|
12
|
+
rejected: "rejected";
|
|
13
|
+
}>;
|
|
14
|
+
export type ApprovalStatus = z.infer<typeof approvalStatusSchema>;
|
|
15
|
+
export declare const approvalTypeSchema: z.ZodEnum<{
|
|
16
|
+
human: "human";
|
|
17
|
+
automated: "automated";
|
|
18
|
+
judge: "judge";
|
|
19
|
+
}>;
|
|
20
|
+
export type ApprovalType = z.infer<typeof approvalTypeSchema>;
|
|
21
|
+
export declare const participantActionSchema: z.ZodEnum<{
|
|
22
|
+
approved: "approved";
|
|
23
|
+
produced: "produced";
|
|
24
|
+
reviewed: "reviewed";
|
|
25
|
+
judged: "judged";
|
|
26
|
+
}>;
|
|
27
|
+
export type ParticipantAction = z.infer<typeof participantActionSchema>;
|
|
28
|
+
export declare const agreementParticipantSchema: z.ZodObject<{
|
|
29
|
+
role: z.ZodString;
|
|
30
|
+
action: z.ZodEnum<{
|
|
31
|
+
approved: "approved";
|
|
32
|
+
produced: "produced";
|
|
33
|
+
reviewed: "reviewed";
|
|
34
|
+
judged: "judged";
|
|
35
|
+
}>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type AgreementParticipant = z.infer<typeof agreementParticipantSchema>;
|
|
38
|
+
export declare const agreementFindingSchema: z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
severity: z.ZodString;
|
|
41
|
+
status: z.ZodString;
|
|
42
|
+
title: z.ZodString;
|
|
43
|
+
resolutionRef: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
type: z.ZodEnum<{
|
|
45
|
+
intake_requirements: "intake_requirements";
|
|
46
|
+
canonical_specification: "canonical_specification";
|
|
47
|
+
clarification_questions: "clarification_questions";
|
|
48
|
+
clarification_answers: "clarification_answers";
|
|
49
|
+
plan: "plan";
|
|
50
|
+
plan_review: "plan_review";
|
|
51
|
+
test_plan: "test_plan";
|
|
52
|
+
implementation: "implementation";
|
|
53
|
+
static_review: "static_review";
|
|
54
|
+
security_review: "security_review";
|
|
55
|
+
performance_review: "performance_review";
|
|
56
|
+
adversarial_review: "adversarial_review";
|
|
57
|
+
design_review: "design_review";
|
|
58
|
+
docs_review: "docs_review";
|
|
59
|
+
ux_review: "ux_review";
|
|
60
|
+
review_report: "review_report";
|
|
61
|
+
remediation_plan: "remediation_plan";
|
|
62
|
+
verification: "verification";
|
|
63
|
+
judge_decision: "judge_decision";
|
|
64
|
+
planning_agreement: "planning_agreement";
|
|
65
|
+
implementation_agreement: "implementation_agreement";
|
|
66
|
+
verification_agreement: "verification_agreement";
|
|
67
|
+
release_summary: "release_summary";
|
|
68
|
+
release_agreement: "release_agreement";
|
|
69
|
+
escalation_context: "escalation_context";
|
|
70
|
+
run_manifest: "run_manifest";
|
|
71
|
+
codebase_context: "codebase_context";
|
|
72
|
+
test_suite: "test_suite";
|
|
73
|
+
acceptance_validation: "acceptance_validation";
|
|
74
|
+
review_findings: "review_findings";
|
|
75
|
+
task_breakdown: "task_breakdown";
|
|
76
|
+
decomposition_review: "decomposition_review";
|
|
77
|
+
task_specifications: "task_specifications";
|
|
78
|
+
pr_diff_context: "pr_diff_context";
|
|
79
|
+
}>;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
version: z.ZodNumber;
|
|
82
|
+
checksum: z.ZodString;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type AgreementFinding = z.infer<typeof agreementFindingSchema>;
|
|
86
|
+
export declare const agreementArtifactSchema: z.ZodObject<{
|
|
87
|
+
type: z.ZodEnum<{
|
|
88
|
+
planning_agreement: "planning_agreement";
|
|
89
|
+
implementation_agreement: "implementation_agreement";
|
|
90
|
+
verification_agreement: "verification_agreement";
|
|
91
|
+
release_agreement: "release_agreement";
|
|
92
|
+
}>;
|
|
93
|
+
runId: z.ZodString;
|
|
94
|
+
stageId: z.ZodString;
|
|
95
|
+
timestamp: z.ZodString;
|
|
96
|
+
participants: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
97
|
+
role: z.ZodString;
|
|
98
|
+
action: z.ZodEnum<{
|
|
99
|
+
approved: "approved";
|
|
100
|
+
produced: "produced";
|
|
101
|
+
reviewed: "reviewed";
|
|
102
|
+
judged: "judged";
|
|
103
|
+
}>;
|
|
104
|
+
}, z.core.$strip>>>;
|
|
105
|
+
reviewedArtifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
106
|
+
type: z.ZodEnum<{
|
|
107
|
+
intake_requirements: "intake_requirements";
|
|
108
|
+
canonical_specification: "canonical_specification";
|
|
109
|
+
clarification_questions: "clarification_questions";
|
|
110
|
+
clarification_answers: "clarification_answers";
|
|
111
|
+
plan: "plan";
|
|
112
|
+
plan_review: "plan_review";
|
|
113
|
+
test_plan: "test_plan";
|
|
114
|
+
implementation: "implementation";
|
|
115
|
+
static_review: "static_review";
|
|
116
|
+
security_review: "security_review";
|
|
117
|
+
performance_review: "performance_review";
|
|
118
|
+
adversarial_review: "adversarial_review";
|
|
119
|
+
design_review: "design_review";
|
|
120
|
+
docs_review: "docs_review";
|
|
121
|
+
ux_review: "ux_review";
|
|
122
|
+
review_report: "review_report";
|
|
123
|
+
remediation_plan: "remediation_plan";
|
|
124
|
+
verification: "verification";
|
|
125
|
+
judge_decision: "judge_decision";
|
|
126
|
+
planning_agreement: "planning_agreement";
|
|
127
|
+
implementation_agreement: "implementation_agreement";
|
|
128
|
+
verification_agreement: "verification_agreement";
|
|
129
|
+
release_summary: "release_summary";
|
|
130
|
+
release_agreement: "release_agreement";
|
|
131
|
+
escalation_context: "escalation_context";
|
|
132
|
+
run_manifest: "run_manifest";
|
|
133
|
+
codebase_context: "codebase_context";
|
|
134
|
+
test_suite: "test_suite";
|
|
135
|
+
acceptance_validation: "acceptance_validation";
|
|
136
|
+
review_findings: "review_findings";
|
|
137
|
+
task_breakdown: "task_breakdown";
|
|
138
|
+
decomposition_review: "decomposition_review";
|
|
139
|
+
task_specifications: "task_specifications";
|
|
140
|
+
pr_diff_context: "pr_diff_context";
|
|
141
|
+
}>;
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
version: z.ZodNumber;
|
|
144
|
+
checksum: z.ZodString;
|
|
145
|
+
}, z.core.$strip>>>;
|
|
146
|
+
findings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
severity: z.ZodString;
|
|
149
|
+
status: z.ZodString;
|
|
150
|
+
title: z.ZodString;
|
|
151
|
+
resolutionRef: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
type: z.ZodEnum<{
|
|
153
|
+
intake_requirements: "intake_requirements";
|
|
154
|
+
canonical_specification: "canonical_specification";
|
|
155
|
+
clarification_questions: "clarification_questions";
|
|
156
|
+
clarification_answers: "clarification_answers";
|
|
157
|
+
plan: "plan";
|
|
158
|
+
plan_review: "plan_review";
|
|
159
|
+
test_plan: "test_plan";
|
|
160
|
+
implementation: "implementation";
|
|
161
|
+
static_review: "static_review";
|
|
162
|
+
security_review: "security_review";
|
|
163
|
+
performance_review: "performance_review";
|
|
164
|
+
adversarial_review: "adversarial_review";
|
|
165
|
+
design_review: "design_review";
|
|
166
|
+
docs_review: "docs_review";
|
|
167
|
+
ux_review: "ux_review";
|
|
168
|
+
review_report: "review_report";
|
|
169
|
+
remediation_plan: "remediation_plan";
|
|
170
|
+
verification: "verification";
|
|
171
|
+
judge_decision: "judge_decision";
|
|
172
|
+
planning_agreement: "planning_agreement";
|
|
173
|
+
implementation_agreement: "implementation_agreement";
|
|
174
|
+
verification_agreement: "verification_agreement";
|
|
175
|
+
release_summary: "release_summary";
|
|
176
|
+
release_agreement: "release_agreement";
|
|
177
|
+
escalation_context: "escalation_context";
|
|
178
|
+
run_manifest: "run_manifest";
|
|
179
|
+
codebase_context: "codebase_context";
|
|
180
|
+
test_suite: "test_suite";
|
|
181
|
+
acceptance_validation: "acceptance_validation";
|
|
182
|
+
review_findings: "review_findings";
|
|
183
|
+
task_breakdown: "task_breakdown";
|
|
184
|
+
decomposition_review: "decomposition_review";
|
|
185
|
+
task_specifications: "task_specifications";
|
|
186
|
+
pr_diff_context: "pr_diff_context";
|
|
187
|
+
}>;
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
version: z.ZodNumber;
|
|
190
|
+
checksum: z.ZodString;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
}, z.core.$strip>>>;
|
|
193
|
+
unresolvedFindings: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
severity: z.ZodString;
|
|
196
|
+
status: z.ZodString;
|
|
197
|
+
title: z.ZodString;
|
|
198
|
+
resolutionRef: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
type: z.ZodEnum<{
|
|
200
|
+
intake_requirements: "intake_requirements";
|
|
201
|
+
canonical_specification: "canonical_specification";
|
|
202
|
+
clarification_questions: "clarification_questions";
|
|
203
|
+
clarification_answers: "clarification_answers";
|
|
204
|
+
plan: "plan";
|
|
205
|
+
plan_review: "plan_review";
|
|
206
|
+
test_plan: "test_plan";
|
|
207
|
+
implementation: "implementation";
|
|
208
|
+
static_review: "static_review";
|
|
209
|
+
security_review: "security_review";
|
|
210
|
+
performance_review: "performance_review";
|
|
211
|
+
adversarial_review: "adversarial_review";
|
|
212
|
+
design_review: "design_review";
|
|
213
|
+
docs_review: "docs_review";
|
|
214
|
+
ux_review: "ux_review";
|
|
215
|
+
review_report: "review_report";
|
|
216
|
+
remediation_plan: "remediation_plan";
|
|
217
|
+
verification: "verification";
|
|
218
|
+
judge_decision: "judge_decision";
|
|
219
|
+
planning_agreement: "planning_agreement";
|
|
220
|
+
implementation_agreement: "implementation_agreement";
|
|
221
|
+
verification_agreement: "verification_agreement";
|
|
222
|
+
release_summary: "release_summary";
|
|
223
|
+
release_agreement: "release_agreement";
|
|
224
|
+
escalation_context: "escalation_context";
|
|
225
|
+
run_manifest: "run_manifest";
|
|
226
|
+
codebase_context: "codebase_context";
|
|
227
|
+
test_suite: "test_suite";
|
|
228
|
+
acceptance_validation: "acceptance_validation";
|
|
229
|
+
review_findings: "review_findings";
|
|
230
|
+
task_breakdown: "task_breakdown";
|
|
231
|
+
decomposition_review: "decomposition_review";
|
|
232
|
+
task_specifications: "task_specifications";
|
|
233
|
+
pr_diff_context: "pr_diff_context";
|
|
234
|
+
}>;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
version: z.ZodNumber;
|
|
237
|
+
checksum: z.ZodString;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
}, z.core.$strip>>>;
|
|
240
|
+
approvalStatus: z.ZodEnum<{
|
|
241
|
+
approved: "approved";
|
|
242
|
+
conditionally_approved: "conditionally_approved";
|
|
243
|
+
rejected: "rejected";
|
|
244
|
+
}>;
|
|
245
|
+
approvalType: z.ZodEnum<{
|
|
246
|
+
human: "human";
|
|
247
|
+
automated: "automated";
|
|
248
|
+
judge: "judge";
|
|
249
|
+
}>;
|
|
250
|
+
conditions: z.ZodOptional<z.ZodString>;
|
|
251
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
export type AgreementArtifact = z.infer<typeof agreementArtifactSchema>;
|
|
254
|
+
export declare const agreementValidationResultSchema: z.ZodObject<{
|
|
255
|
+
valid: z.ZodBoolean;
|
|
256
|
+
errors: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
257
|
+
warnings: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
export type AgreementValidationResult = z.infer<typeof agreementValidationResultSchema>;
|
|
260
|
+
export declare const agreementGateResultSchema: z.ZodObject<{
|
|
261
|
+
exists: z.ZodBoolean;
|
|
262
|
+
valid: z.ZodBoolean;
|
|
263
|
+
approvalStatus: z.ZodOptional<z.ZodEnum<{
|
|
264
|
+
approved: "approved";
|
|
265
|
+
conditionally_approved: "conditionally_approved";
|
|
266
|
+
rejected: "rejected";
|
|
267
|
+
}>>;
|
|
268
|
+
artifactRef: z.ZodOptional<z.ZodObject<{
|
|
269
|
+
type: z.ZodEnum<{
|
|
270
|
+
intake_requirements: "intake_requirements";
|
|
271
|
+
canonical_specification: "canonical_specification";
|
|
272
|
+
clarification_questions: "clarification_questions";
|
|
273
|
+
clarification_answers: "clarification_answers";
|
|
274
|
+
plan: "plan";
|
|
275
|
+
plan_review: "plan_review";
|
|
276
|
+
test_plan: "test_plan";
|
|
277
|
+
implementation: "implementation";
|
|
278
|
+
static_review: "static_review";
|
|
279
|
+
security_review: "security_review";
|
|
280
|
+
performance_review: "performance_review";
|
|
281
|
+
adversarial_review: "adversarial_review";
|
|
282
|
+
design_review: "design_review";
|
|
283
|
+
docs_review: "docs_review";
|
|
284
|
+
ux_review: "ux_review";
|
|
285
|
+
review_report: "review_report";
|
|
286
|
+
remediation_plan: "remediation_plan";
|
|
287
|
+
verification: "verification";
|
|
288
|
+
judge_decision: "judge_decision";
|
|
289
|
+
planning_agreement: "planning_agreement";
|
|
290
|
+
implementation_agreement: "implementation_agreement";
|
|
291
|
+
verification_agreement: "verification_agreement";
|
|
292
|
+
release_summary: "release_summary";
|
|
293
|
+
release_agreement: "release_agreement";
|
|
294
|
+
escalation_context: "escalation_context";
|
|
295
|
+
run_manifest: "run_manifest";
|
|
296
|
+
codebase_context: "codebase_context";
|
|
297
|
+
test_suite: "test_suite";
|
|
298
|
+
acceptance_validation: "acceptance_validation";
|
|
299
|
+
review_findings: "review_findings";
|
|
300
|
+
task_breakdown: "task_breakdown";
|
|
301
|
+
decomposition_review: "decomposition_review";
|
|
302
|
+
task_specifications: "task_specifications";
|
|
303
|
+
pr_diff_context: "pr_diff_context";
|
|
304
|
+
}>;
|
|
305
|
+
name: z.ZodString;
|
|
306
|
+
version: z.ZodNumber;
|
|
307
|
+
checksum: z.ZodString;
|
|
308
|
+
}, z.core.$strip>>;
|
|
309
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
export type AgreementGateResult = z.infer<typeof agreementGateResultSchema>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { artifactRefSchema } from './artifact-system';
|
|
3
|
+
export const agreementTypeSchema = z.enum([
|
|
4
|
+
'planning_agreement',
|
|
5
|
+
'implementation_agreement',
|
|
6
|
+
'verification_agreement',
|
|
7
|
+
'release_agreement',
|
|
8
|
+
]);
|
|
9
|
+
export const approvalStatusSchema = z.enum(['approved', 'conditionally_approved', 'rejected']);
|
|
10
|
+
export const approvalTypeSchema = z.enum(['human', 'automated', 'judge']);
|
|
11
|
+
export const participantActionSchema = z.enum(['produced', 'reviewed', 'judged', 'approved']);
|
|
12
|
+
export const agreementParticipantSchema = z.object({
|
|
13
|
+
role: z.string(),
|
|
14
|
+
action: participantActionSchema,
|
|
15
|
+
});
|
|
16
|
+
export const agreementFindingSchema = z.object({
|
|
17
|
+
id: z.string(),
|
|
18
|
+
severity: z.string(),
|
|
19
|
+
status: z.string(),
|
|
20
|
+
title: z.string(),
|
|
21
|
+
resolutionRef: artifactRefSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
export const agreementArtifactSchema = z.object({
|
|
24
|
+
type: agreementTypeSchema,
|
|
25
|
+
runId: z.string(),
|
|
26
|
+
stageId: z.string(),
|
|
27
|
+
timestamp: z.string(),
|
|
28
|
+
participants: z.array(agreementParticipantSchema).readonly(),
|
|
29
|
+
reviewedArtifacts: z.array(artifactRefSchema).readonly(),
|
|
30
|
+
findings: z.array(agreementFindingSchema).readonly(),
|
|
31
|
+
unresolvedFindings: z.array(agreementFindingSchema).readonly(),
|
|
32
|
+
approvalStatus: approvalStatusSchema,
|
|
33
|
+
approvalType: approvalTypeSchema,
|
|
34
|
+
conditions: z.string().optional(),
|
|
35
|
+
notes: z.string().optional(),
|
|
36
|
+
});
|
|
37
|
+
export const agreementValidationResultSchema = z.object({
|
|
38
|
+
valid: z.boolean(),
|
|
39
|
+
errors: z.array(z.string()).readonly(),
|
|
40
|
+
warnings: z.array(z.string()).readonly(),
|
|
41
|
+
});
|
|
42
|
+
export const agreementGateResultSchema = z.object({
|
|
43
|
+
exists: z.boolean(),
|
|
44
|
+
valid: z.boolean(),
|
|
45
|
+
approvalStatus: approvalStatusSchema.optional(),
|
|
46
|
+
artifactRef: artifactRefSchema.optional(),
|
|
47
|
+
reason: z.string().optional(),
|
|
48
|
+
});
|