@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,276 @@
1
+ import { z } from 'zod/v4';
2
+ export declare const budgetExhaustionContextSchema: z.ZodObject<{
3
+ limitType: z.ZodLiteral<"token">;
4
+ current: z.ZodNumber;
5
+ limit: z.ZodNumber;
6
+ role: z.ZodOptional<z.ZodString>;
7
+ cumulativeTokens: z.ZodNumber;
8
+ }, z.core.$strip>;
9
+ export type BudgetExhaustionContext = z.infer<typeof budgetExhaustionContextSchema>;
10
+ export declare const persistedWaitingContextSchema: z.ZodObject<{
11
+ reason: z.ZodString;
12
+ requiredInput: z.ZodString;
13
+ requestingState: z.ZodString;
14
+ autoResumeSafe: z.ZodBoolean;
15
+ presentedArtifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
16
+ type: z.ZodEnum<{
17
+ intake_requirements: "intake_requirements";
18
+ canonical_specification: "canonical_specification";
19
+ clarification_questions: "clarification_questions";
20
+ clarification_answers: "clarification_answers";
21
+ plan: "plan";
22
+ plan_review: "plan_review";
23
+ test_plan: "test_plan";
24
+ implementation: "implementation";
25
+ static_review: "static_review";
26
+ security_review: "security_review";
27
+ performance_review: "performance_review";
28
+ adversarial_review: "adversarial_review";
29
+ design_review: "design_review";
30
+ docs_review: "docs_review";
31
+ ux_review: "ux_review";
32
+ review_report: "review_report";
33
+ remediation_plan: "remediation_plan";
34
+ verification: "verification";
35
+ judge_decision: "judge_decision";
36
+ planning_agreement: "planning_agreement";
37
+ implementation_agreement: "implementation_agreement";
38
+ verification_agreement: "verification_agreement";
39
+ release_summary: "release_summary";
40
+ release_agreement: "release_agreement";
41
+ escalation_context: "escalation_context";
42
+ run_manifest: "run_manifest";
43
+ codebase_context: "codebase_context";
44
+ test_suite: "test_suite";
45
+ acceptance_validation: "acceptance_validation";
46
+ review_findings: "review_findings";
47
+ task_breakdown: "task_breakdown";
48
+ decomposition_review: "decomposition_review";
49
+ task_specifications: "task_specifications";
50
+ pr_diff_context: "pr_diff_context";
51
+ }>;
52
+ name: z.ZodString;
53
+ version: z.ZodNumber;
54
+ checksum: z.ZodString;
55
+ }, z.core.$strip>>>;
56
+ waitingSince: z.ZodString;
57
+ budgetExhaustion: z.ZodOptional<z.ZodObject<{
58
+ limitType: z.ZodLiteral<"token">;
59
+ current: z.ZodNumber;
60
+ limit: z.ZodNumber;
61
+ role: z.ZodOptional<z.ZodString>;
62
+ cumulativeTokens: z.ZodNumber;
63
+ }, z.core.$strip>>;
64
+ liveSessionId: z.ZodOptional<z.ZodString>;
65
+ pendingRequestId: z.ZodOptional<z.ZodString>;
66
+ liveRequestType: z.ZodOptional<z.ZodEnum<{
67
+ permission: "permission";
68
+ clarification: "clarification";
69
+ }>>;
70
+ sessionTransport: z.ZodOptional<z.ZodEnum<{
71
+ stdio: "stdio";
72
+ remote: "remote";
73
+ }>>;
74
+ }, z.core.$strip>;
75
+ export type PersistedWaitingContext = z.infer<typeof persistedWaitingContextSchema>;
76
+ export declare const persistedStateSchema: z.ZodObject<{
77
+ runId: z.core.$ZodBranded<z.ZodString, "RunId", "out">;
78
+ schemaVersion: z.ZodNumber;
79
+ repoRoot: z.ZodOptional<z.ZodString>;
80
+ currentState: z.ZodString;
81
+ previousState: z.ZodNullable<z.ZodString>;
82
+ stateEnteredAt: z.ZodString;
83
+ transitionCount: z.ZodNumber;
84
+ stateHistory: z.ZodReadonly<z.ZodArray<z.ZodString>>;
85
+ iterationCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
86
+ judgeArbitrationCounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
87
+ activeArtifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
88
+ type: z.ZodEnum<{
89
+ intake_requirements: "intake_requirements";
90
+ canonical_specification: "canonical_specification";
91
+ clarification_questions: "clarification_questions";
92
+ clarification_answers: "clarification_answers";
93
+ plan: "plan";
94
+ plan_review: "plan_review";
95
+ test_plan: "test_plan";
96
+ implementation: "implementation";
97
+ static_review: "static_review";
98
+ security_review: "security_review";
99
+ performance_review: "performance_review";
100
+ adversarial_review: "adversarial_review";
101
+ design_review: "design_review";
102
+ docs_review: "docs_review";
103
+ ux_review: "ux_review";
104
+ review_report: "review_report";
105
+ remediation_plan: "remediation_plan";
106
+ verification: "verification";
107
+ judge_decision: "judge_decision";
108
+ planning_agreement: "planning_agreement";
109
+ implementation_agreement: "implementation_agreement";
110
+ verification_agreement: "verification_agreement";
111
+ release_summary: "release_summary";
112
+ release_agreement: "release_agreement";
113
+ escalation_context: "escalation_context";
114
+ run_manifest: "run_manifest";
115
+ codebase_context: "codebase_context";
116
+ test_suite: "test_suite";
117
+ acceptance_validation: "acceptance_validation";
118
+ review_findings: "review_findings";
119
+ task_breakdown: "task_breakdown";
120
+ decomposition_review: "decomposition_review";
121
+ task_specifications: "task_specifications";
122
+ pr_diff_context: "pr_diff_context";
123
+ }>;
124
+ name: z.ZodString;
125
+ version: z.ZodNumber;
126
+ checksum: z.ZodString;
127
+ }, z.core.$strip>>>;
128
+ lastProducedArtifact: z.ZodNullable<z.ZodObject<{
129
+ type: z.ZodEnum<{
130
+ intake_requirements: "intake_requirements";
131
+ canonical_specification: "canonical_specification";
132
+ clarification_questions: "clarification_questions";
133
+ clarification_answers: "clarification_answers";
134
+ plan: "plan";
135
+ plan_review: "plan_review";
136
+ test_plan: "test_plan";
137
+ implementation: "implementation";
138
+ static_review: "static_review";
139
+ security_review: "security_review";
140
+ performance_review: "performance_review";
141
+ adversarial_review: "adversarial_review";
142
+ design_review: "design_review";
143
+ docs_review: "docs_review";
144
+ ux_review: "ux_review";
145
+ review_report: "review_report";
146
+ remediation_plan: "remediation_plan";
147
+ verification: "verification";
148
+ judge_decision: "judge_decision";
149
+ planning_agreement: "planning_agreement";
150
+ implementation_agreement: "implementation_agreement";
151
+ verification_agreement: "verification_agreement";
152
+ release_summary: "release_summary";
153
+ release_agreement: "release_agreement";
154
+ escalation_context: "escalation_context";
155
+ run_manifest: "run_manifest";
156
+ codebase_context: "codebase_context";
157
+ test_suite: "test_suite";
158
+ acceptance_validation: "acceptance_validation";
159
+ review_findings: "review_findings";
160
+ task_breakdown: "task_breakdown";
161
+ decomposition_review: "decomposition_review";
162
+ task_specifications: "task_specifications";
163
+ pr_diff_context: "pr_diff_context";
164
+ }>;
165
+ name: z.ZodString;
166
+ version: z.ZodNumber;
167
+ checksum: z.ZodString;
168
+ }, z.core.$strip>>;
169
+ waitingContext: z.ZodOptional<z.ZodObject<{
170
+ reason: z.ZodString;
171
+ requiredInput: z.ZodString;
172
+ requestingState: z.ZodString;
173
+ autoResumeSafe: z.ZodBoolean;
174
+ presentedArtifacts: z.ZodReadonly<z.ZodArray<z.ZodObject<{
175
+ type: z.ZodEnum<{
176
+ intake_requirements: "intake_requirements";
177
+ canonical_specification: "canonical_specification";
178
+ clarification_questions: "clarification_questions";
179
+ clarification_answers: "clarification_answers";
180
+ plan: "plan";
181
+ plan_review: "plan_review";
182
+ test_plan: "test_plan";
183
+ implementation: "implementation";
184
+ static_review: "static_review";
185
+ security_review: "security_review";
186
+ performance_review: "performance_review";
187
+ adversarial_review: "adversarial_review";
188
+ design_review: "design_review";
189
+ docs_review: "docs_review";
190
+ ux_review: "ux_review";
191
+ review_report: "review_report";
192
+ remediation_plan: "remediation_plan";
193
+ verification: "verification";
194
+ judge_decision: "judge_decision";
195
+ planning_agreement: "planning_agreement";
196
+ implementation_agreement: "implementation_agreement";
197
+ verification_agreement: "verification_agreement";
198
+ release_summary: "release_summary";
199
+ release_agreement: "release_agreement";
200
+ escalation_context: "escalation_context";
201
+ run_manifest: "run_manifest";
202
+ codebase_context: "codebase_context";
203
+ test_suite: "test_suite";
204
+ acceptance_validation: "acceptance_validation";
205
+ review_findings: "review_findings";
206
+ task_breakdown: "task_breakdown";
207
+ decomposition_review: "decomposition_review";
208
+ task_specifications: "task_specifications";
209
+ pr_diff_context: "pr_diff_context";
210
+ }>;
211
+ name: z.ZodString;
212
+ version: z.ZodNumber;
213
+ checksum: z.ZodString;
214
+ }, z.core.$strip>>>;
215
+ waitingSince: z.ZodString;
216
+ budgetExhaustion: z.ZodOptional<z.ZodObject<{
217
+ limitType: z.ZodLiteral<"token">;
218
+ current: z.ZodNumber;
219
+ limit: z.ZodNumber;
220
+ role: z.ZodOptional<z.ZodString>;
221
+ cumulativeTokens: z.ZodNumber;
222
+ }, z.core.$strip>>;
223
+ liveSessionId: z.ZodOptional<z.ZodString>;
224
+ pendingRequestId: z.ZodOptional<z.ZodString>;
225
+ liveRequestType: z.ZodOptional<z.ZodEnum<{
226
+ permission: "permission";
227
+ clarification: "clarification";
228
+ }>>;
229
+ sessionTransport: z.ZodOptional<z.ZodEnum<{
230
+ stdio: "stdio";
231
+ remote: "remote";
232
+ }>>;
233
+ }, z.core.$strip>>;
234
+ workflowName: z.ZodString;
235
+ workflowVersion: z.ZodString;
236
+ persistedAt: z.ZodString;
237
+ persistenceVersion: z.ZodNumber;
238
+ checksum: z.ZodString;
239
+ cumulativeInputTokens: z.ZodOptional<z.ZodNumber>;
240
+ cumulativeOutputTokens: z.ZodOptional<z.ZodNumber>;
241
+ hasReceivedUsage: z.ZodOptional<z.ZodBoolean>;
242
+ governanceDecisionCount: z.ZodOptional<z.ZodNumber>;
243
+ escalationCount: z.ZodOptional<z.ZodNumber>;
244
+ workerMetricsByRole: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
245
+ inputTokens: z.ZodNumber;
246
+ outputTokens: z.ZodNumber;
247
+ dispatches: z.ZodNumber;
248
+ durationMs: z.ZodNumber;
249
+ artifactsProduced: z.ZodNumber;
250
+ }, z.core.$strip>>>;
251
+ dispatchCounter: z.ZodOptional<z.ZodNumber>;
252
+ firedThresholdIndex: z.ZodOptional<z.ZodNumber>;
253
+ lastHumanFeedback: z.ZodOptional<z.ZodString>;
254
+ lastReviewContent: z.ZodOptional<z.ZodString>;
255
+ lastTrigger: z.ZodOptional<z.ZodString>;
256
+ stateTimestamps: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
257
+ stateId: z.ZodString;
258
+ enteredAt: z.ZodString;
259
+ exitedAt: z.ZodString;
260
+ }, z.core.$strip>>>>;
261
+ }, z.core.$strip>;
262
+ export type PersistedState = z.infer<typeof persistedStateSchema>;
263
+ export declare const stateValidationResultSchema: z.ZodObject<{
264
+ valid: z.ZodBoolean;
265
+ errors: z.ZodReadonly<z.ZodArray<z.ZodString>>;
266
+ warnings: z.ZodReadonly<z.ZodArray<z.ZodString>>;
267
+ }, z.core.$strip>;
268
+ export type StateValidationResult = z.infer<typeof stateValidationResultSchema>;
269
+ export declare const lockHandleSchema: z.ZodObject<{
270
+ runId: z.core.$ZodBranded<z.ZodString, "RunId", "out">;
271
+ pid: z.ZodNumber;
272
+ acquiredAt: z.ZodString;
273
+ lockPath: z.ZodString;
274
+ hostname: z.ZodString;
275
+ }, z.core.$strip>;
276
+ export type LockHandle = z.infer<typeof lockHandleSchema>;
@@ -0,0 +1,83 @@
1
+ import { z } from 'zod/v4';
2
+ import { artifactRefSchema } from '../artifacts/artifact-system';
3
+ import { runIdSchema } from '../shared/shared';
4
+ import { liveRequestKindSchema, sessionTransportSchema } from '../shared/string-enums';
5
+ export const budgetExhaustionContextSchema = z.object({
6
+ limitType: z.literal('token'),
7
+ current: z.number(),
8
+ limit: z.number(),
9
+ role: z.string().optional(),
10
+ cumulativeTokens: z.number(),
11
+ });
12
+ export const persistedWaitingContextSchema = z.object({
13
+ reason: z.string(),
14
+ requiredInput: z.string(),
15
+ requestingState: z.string(),
16
+ autoResumeSafe: z.boolean(),
17
+ presentedArtifacts: z.array(artifactRefSchema).readonly(),
18
+ waitingSince: z.string(),
19
+ budgetExhaustion: budgetExhaustionContextSchema.optional(),
20
+ liveSessionId: z.string().optional(),
21
+ pendingRequestId: z.string().optional(),
22
+ liveRequestType: liveRequestKindSchema.optional(),
23
+ sessionTransport: sessionTransportSchema.optional(),
24
+ });
25
+ export const persistedStateSchema = z.object({
26
+ runId: runIdSchema,
27
+ schemaVersion: z.number(),
28
+ repoRoot: z.string().optional(),
29
+ currentState: z.string(),
30
+ previousState: z.string().nullable(),
31
+ stateEnteredAt: z.string(),
32
+ transitionCount: z.number(),
33
+ stateHistory: z.array(z.string()).readonly(),
34
+ iterationCounts: z.record(z.string(), z.number()),
35
+ judgeArbitrationCounts: z.record(z.string(), z.number()).optional(),
36
+ activeArtifacts: z.array(artifactRefSchema).readonly(),
37
+ lastProducedArtifact: artifactRefSchema.nullable(),
38
+ waitingContext: persistedWaitingContextSchema.optional(),
39
+ workflowName: z.string(),
40
+ workflowVersion: z.string(),
41
+ persistedAt: z.string(),
42
+ persistenceVersion: z.number(),
43
+ checksum: z.string(),
44
+ cumulativeInputTokens: z.number().optional(),
45
+ cumulativeOutputTokens: z.number().optional(),
46
+ hasReceivedUsage: z.boolean().optional(),
47
+ governanceDecisionCount: z.number().optional(),
48
+ escalationCount: z.number().optional(),
49
+ workerMetricsByRole: z
50
+ .record(z.string(), z.object({
51
+ inputTokens: z.number(),
52
+ outputTokens: z.number(),
53
+ dispatches: z.number(),
54
+ durationMs: z.number(),
55
+ artifactsProduced: z.number(),
56
+ }))
57
+ .optional(),
58
+ dispatchCounter: z.number().optional(),
59
+ firedThresholdIndex: z.number().optional(),
60
+ lastHumanFeedback: z.string().optional(),
61
+ lastReviewContent: z.string().optional(),
62
+ lastTrigger: z.string().optional(),
63
+ stateTimestamps: z
64
+ .array(z.object({
65
+ stateId: z.string(),
66
+ enteredAt: z.string(),
67
+ exitedAt: z.string(),
68
+ }))
69
+ .readonly()
70
+ .optional(),
71
+ });
72
+ export const stateValidationResultSchema = z.object({
73
+ valid: z.boolean(),
74
+ errors: z.array(z.string()).readonly(),
75
+ warnings: z.array(z.string()).readonly(),
76
+ });
77
+ export const lockHandleSchema = z.object({
78
+ runId: runIdSchema,
79
+ pid: z.number(),
80
+ acquiredAt: z.string(),
81
+ lockPath: z.string(),
82
+ hostname: z.string(),
83
+ });
@@ -0,0 +1,8 @@
1
+ /** Stable identifiers for the built-in local coding-agent runners. */
2
+ export declare const BUILT_IN_CODING_RUNNER_ID: {
3
+ readonly CLAUDE_CODE: "claude-code";
4
+ readonly CODEX: "codex";
5
+ readonly CURSOR: "cursor";
6
+ };
7
+ export type BuiltInCodingRunnerId = (typeof BUILT_IN_CODING_RUNNER_ID)[keyof typeof BUILT_IN_CODING_RUNNER_ID];
8
+ export declare const BUILT_IN_CODING_RUNNER_IDS: readonly BuiltInCodingRunnerId[];
@@ -0,0 +1,11 @@
1
+ /** Stable identifiers for the built-in local coding-agent runners. */
2
+ export const BUILT_IN_CODING_RUNNER_ID = {
3
+ CLAUDE_CODE: 'claude-code',
4
+ CODEX: 'codex',
5
+ CURSOR: 'cursor',
6
+ };
7
+ export const BUILT_IN_CODING_RUNNER_IDS = [
8
+ BUILT_IN_CODING_RUNNER_ID.CLAUDE_CODE,
9
+ BUILT_IN_CODING_RUNNER_ID.CODEX,
10
+ BUILT_IN_CODING_RUNNER_ID.CURSOR,
11
+ ];
@@ -0,0 +1,100 @@
1
+ import { z } from 'zod/v4';
2
+ export declare const roleInteractionRelationshipSchema: z.ZodEnum<{
3
+ reviews: "reviews";
4
+ produces_for: "produces_for";
5
+ approves: "approves";
6
+ }>;
7
+ export type RoleInteractionRelationship = z.infer<typeof roleInteractionRelationshipSchema>;
8
+ export declare const roleInteractionSchema: z.ZodObject<{
9
+ producerRole: z.ZodString;
10
+ consumerRole: z.ZodString;
11
+ artifactType: z.ZodEnum<{
12
+ intake_requirements: "intake_requirements";
13
+ canonical_specification: "canonical_specification";
14
+ clarification_questions: "clarification_questions";
15
+ clarification_answers: "clarification_answers";
16
+ plan: "plan";
17
+ plan_review: "plan_review";
18
+ test_plan: "test_plan";
19
+ implementation: "implementation";
20
+ static_review: "static_review";
21
+ security_review: "security_review";
22
+ performance_review: "performance_review";
23
+ adversarial_review: "adversarial_review";
24
+ design_review: "design_review";
25
+ docs_review: "docs_review";
26
+ ux_review: "ux_review";
27
+ review_report: "review_report";
28
+ remediation_plan: "remediation_plan";
29
+ verification: "verification";
30
+ judge_decision: "judge_decision";
31
+ planning_agreement: "planning_agreement";
32
+ implementation_agreement: "implementation_agreement";
33
+ verification_agreement: "verification_agreement";
34
+ release_summary: "release_summary";
35
+ release_agreement: "release_agreement";
36
+ escalation_context: "escalation_context";
37
+ run_manifest: "run_manifest";
38
+ codebase_context: "codebase_context";
39
+ test_suite: "test_suite";
40
+ acceptance_validation: "acceptance_validation";
41
+ review_findings: "review_findings";
42
+ task_breakdown: "task_breakdown";
43
+ decomposition_review: "decomposition_review";
44
+ task_specifications: "task_specifications";
45
+ pr_diff_context: "pr_diff_context";
46
+ }>;
47
+ relationship: z.ZodEnum<{
48
+ reviews: "reviews";
49
+ produces_for: "produces_for";
50
+ approves: "approves";
51
+ }>;
52
+ }, z.core.$strip>;
53
+ export type RoleInteraction = z.infer<typeof roleInteractionSchema>;
54
+ export declare const artifactFlowDefinitionSchema: z.ZodObject<{
55
+ artifactType: z.ZodEnum<{
56
+ intake_requirements: "intake_requirements";
57
+ canonical_specification: "canonical_specification";
58
+ clarification_questions: "clarification_questions";
59
+ clarification_answers: "clarification_answers";
60
+ plan: "plan";
61
+ plan_review: "plan_review";
62
+ test_plan: "test_plan";
63
+ implementation: "implementation";
64
+ static_review: "static_review";
65
+ security_review: "security_review";
66
+ performance_review: "performance_review";
67
+ adversarial_review: "adversarial_review";
68
+ design_review: "design_review";
69
+ docs_review: "docs_review";
70
+ ux_review: "ux_review";
71
+ review_report: "review_report";
72
+ remediation_plan: "remediation_plan";
73
+ verification: "verification";
74
+ judge_decision: "judge_decision";
75
+ planning_agreement: "planning_agreement";
76
+ implementation_agreement: "implementation_agreement";
77
+ verification_agreement: "verification_agreement";
78
+ release_summary: "release_summary";
79
+ release_agreement: "release_agreement";
80
+ escalation_context: "escalation_context";
81
+ run_manifest: "run_manifest";
82
+ codebase_context: "codebase_context";
83
+ test_suite: "test_suite";
84
+ acceptance_validation: "acceptance_validation";
85
+ review_findings: "review_findings";
86
+ task_breakdown: "task_breakdown";
87
+ decomposition_review: "decomposition_review";
88
+ task_specifications: "task_specifications";
89
+ pr_diff_context: "pr_diff_context";
90
+ }>;
91
+ producedBy: z.ZodString;
92
+ consumedBy: z.ZodReadonly<z.ZodArray<z.ZodString>>;
93
+ reviewedBy: z.ZodReadonly<z.ZodArray<z.ZodString>>;
94
+ }, z.core.$strip>;
95
+ export type ArtifactFlowDefinition = z.infer<typeof artifactFlowDefinitionSchema>;
96
+ export declare const visibilityCheckSchema: z.ZodObject<{
97
+ allowed: z.ZodBoolean;
98
+ reason: z.ZodString;
99
+ }, z.core.$strip>;
100
+ export type VisibilityCheck = z.infer<typeof visibilityCheckSchema>;
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod/v4';
2
+ import { artifactTypeSchema } from '../artifacts/artifact-system';
3
+ export const roleInteractionRelationshipSchema = z.enum(['produces_for', 'reviews', 'approves']);
4
+ export const roleInteractionSchema = z.object({
5
+ producerRole: z.string(),
6
+ consumerRole: z.string(),
7
+ artifactType: artifactTypeSchema,
8
+ relationship: roleInteractionRelationshipSchema,
9
+ });
10
+ export const artifactFlowDefinitionSchema = z.object({
11
+ artifactType: artifactTypeSchema,
12
+ producedBy: z.string(),
13
+ consumedBy: z.array(z.string()).readonly(),
14
+ reviewedBy: z.array(z.string()).readonly(),
15
+ });
16
+ export const visibilityCheckSchema = z.object({
17
+ allowed: z.boolean(),
18
+ reason: z.string(),
19
+ });
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod/v4';
2
+ export declare const criterionResultSchema: z.ZodObject<{
3
+ criterionId: z.ZodString;
4
+ met: z.ZodBoolean;
5
+ evidence: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export type CriterionResult = z.infer<typeof criterionResultSchema>;
8
+ export declare const confidenceReportSchema: z.ZodObject<{
9
+ score: z.ZodNumber;
10
+ criteriaResults: z.ZodArray<z.ZodObject<{
11
+ criterionId: z.ZodString;
12
+ met: z.ZodBoolean;
13
+ evidence: z.ZodString;
14
+ }, z.core.$strip>>;
15
+ rationale: z.ZodString;
16
+ }, z.core.$strip>;
17
+ export type ConfidenceReport = z.infer<typeof confidenceReportSchema>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod/v4';
2
+ export const criterionResultSchema = z.object({
3
+ criterionId: z.string(),
4
+ met: z.boolean(),
5
+ evidence: z.string(),
6
+ });
7
+ export const confidenceReportSchema = z.object({
8
+ score: z.number().min(0).max(1),
9
+ criteriaResults: z.array(criterionResultSchema),
10
+ rationale: z.string(),
11
+ });
@@ -0,0 +1,8 @@
1
+ export * from './collaboration-model';
2
+ export * from './built-in-runner-ids';
3
+ export * from './confidence';
4
+ export * from './permission-approval';
5
+ export * from './prompt-engine';
6
+ export * from './role-system';
7
+ export * from './runner-system';
8
+ export * from './task-brief';
@@ -0,0 +1,8 @@
1
+ export * from './collaboration-model';
2
+ export * from './built-in-runner-ids';
3
+ export * from './confidence';
4
+ export * from './permission-approval';
5
+ export * from './prompt-engine';
6
+ export * from './role-system';
7
+ export * from './runner-system';
8
+ export * from './task-brief';
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod/v4';
2
+ export declare const permissionApprovalEntrySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ action: z.ZodEnum<{
5
+ file_read: "file_read";
6
+ file_write: "file_write";
7
+ file_delete: "file_delete";
8
+ shell_execute: "shell_execute";
9
+ network_request: "network_request";
10
+ git_operation: "git_operation";
11
+ custom: "custom";
12
+ }>;
13
+ resource: z.ZodString;
14
+ detail: z.ZodOptional<z.ZodString>;
15
+ createdAt: z.ZodString;
16
+ createdByRole: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>;
18
+ export type PermissionApprovalEntry = z.infer<typeof permissionApprovalEntrySchema>;
19
+ export declare const permissionApprovalFileSchema: z.ZodObject<{
20
+ version: z.ZodLiteral<1>;
21
+ approvals: z.ZodReadonly<z.ZodArray<z.ZodObject<{
22
+ id: z.ZodString;
23
+ action: z.ZodEnum<{
24
+ file_read: "file_read";
25
+ file_write: "file_write";
26
+ file_delete: "file_delete";
27
+ shell_execute: "shell_execute";
28
+ network_request: "network_request";
29
+ git_operation: "git_operation";
30
+ custom: "custom";
31
+ }>;
32
+ resource: z.ZodString;
33
+ detail: z.ZodOptional<z.ZodString>;
34
+ createdAt: z.ZodString;
35
+ createdByRole: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strip>>>;
37
+ }, z.core.$strip>;
38
+ export type PermissionApprovalFile = z.infer<typeof permissionApprovalFileSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod/v4';
2
+ import { permissionActionSchema } from '../shared/string-enums';
3
+ export const permissionApprovalEntrySchema = z.object({
4
+ id: z.string(),
5
+ action: permissionActionSchema,
6
+ resource: z.string(),
7
+ detail: z.string().optional(),
8
+ createdAt: z.string(),
9
+ createdByRole: z.string().optional(),
10
+ });
11
+ export const permissionApprovalFileSchema = z.object({
12
+ version: z.literal(1),
13
+ approvals: z.array(permissionApprovalEntrySchema).readonly(),
14
+ });