@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
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { agreementProducedDataSchema, artifactInvalidatedDataSchema, artifactStoredDataSchema, artifactVerifiedDataSchema, checkpointRestoredDataSchema, checkpointSavedDataSchema, escalationTriggeredDataSchema, findingAcceptedDataSchema, findingAddressedDataSchema, findingEscalatedDataSchema, findingRaisedDataSchema, findingRejectedDataSchema, governanceDecisionDataSchema, humanApprovalDeniedDataSchema, humanApprovalGrantedDataSchema, humanClarificationAnsweredDataSchema, humanClarificationRequestedDataSchema, humanInputReceivedDataSchema, humanInputRequestedDataSchema, humanPermissionRequestedDataSchema, humanPermissionResolvedDataSchema, humanTimeoutDataSchema, policyDeniedDataSchema, policyEscalatedDataSchema, policyEvaluatedDataSchema, runAbortedDataSchema, runCompletedDataSchema, runPausedDataSchema, runResumedDataSchema, runStartedDataSchema, stateEnteredDataSchema, stateExitedDataSchema, systemErrorDataSchema, systemWarningDataSchema, transitionCompletedDataSchema, transitionDeniedDataSchema, transitionRequestedDataSchema, workerCancelledDataSchema, workerCompletedDataSchema, workerDispatchedDataSchema, workerFailedDataSchema, workerRetriedDataSchema, workerTimeoutDataSchema, } from './event-payloads';
|
|
3
|
+
import { eventSourceSchema } from './event-types';
|
|
4
|
+
export * from './event-bus-config';
|
|
5
|
+
export * from './event-payloads';
|
|
6
|
+
export * from './event-types';
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// Event input schema (discriminated union on `type`)
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
const eventInputBase = {
|
|
11
|
+
source: eventSourceSchema,
|
|
12
|
+
correlationId: z.string().optional(),
|
|
13
|
+
};
|
|
14
|
+
export const eventInputSchema = z.discriminatedUnion('type', [
|
|
15
|
+
z.object({ ...eventInputBase, type: z.literal('run.started'), data: runStartedDataSchema }),
|
|
16
|
+
z.object({ ...eventInputBase, type: z.literal('run.completed'), data: runCompletedDataSchema }),
|
|
17
|
+
z.object({ ...eventInputBase, type: z.literal('run.aborted'), data: runAbortedDataSchema }),
|
|
18
|
+
z.object({ ...eventInputBase, type: z.literal('run.resumed'), data: runResumedDataSchema }),
|
|
19
|
+
z.object({ ...eventInputBase, type: z.literal('run.paused'), data: runPausedDataSchema }),
|
|
20
|
+
z.object({
|
|
21
|
+
...eventInputBase,
|
|
22
|
+
type: z.literal('state.entered'),
|
|
23
|
+
data: stateEnteredDataSchema,
|
|
24
|
+
}),
|
|
25
|
+
z.object({ ...eventInputBase, type: z.literal('state.exited'), data: stateExitedDataSchema }),
|
|
26
|
+
z.object({
|
|
27
|
+
...eventInputBase,
|
|
28
|
+
type: z.literal('transition.requested'),
|
|
29
|
+
data: transitionRequestedDataSchema,
|
|
30
|
+
}),
|
|
31
|
+
z.object({
|
|
32
|
+
...eventInputBase,
|
|
33
|
+
type: z.literal('transition.completed'),
|
|
34
|
+
data: transitionCompletedDataSchema,
|
|
35
|
+
}),
|
|
36
|
+
z.object({
|
|
37
|
+
...eventInputBase,
|
|
38
|
+
type: z.literal('transition.denied'),
|
|
39
|
+
data: transitionDeniedDataSchema,
|
|
40
|
+
}),
|
|
41
|
+
z.object({
|
|
42
|
+
...eventInputBase,
|
|
43
|
+
type: z.literal('worker.dispatched'),
|
|
44
|
+
data: workerDispatchedDataSchema,
|
|
45
|
+
}),
|
|
46
|
+
z.object({
|
|
47
|
+
...eventInputBase,
|
|
48
|
+
type: z.literal('worker.completed'),
|
|
49
|
+
data: workerCompletedDataSchema,
|
|
50
|
+
}),
|
|
51
|
+
z.object({
|
|
52
|
+
...eventInputBase,
|
|
53
|
+
type: z.literal('worker.failed'),
|
|
54
|
+
data: workerFailedDataSchema,
|
|
55
|
+
}),
|
|
56
|
+
z.object({
|
|
57
|
+
...eventInputBase,
|
|
58
|
+
type: z.literal('worker.retried'),
|
|
59
|
+
data: workerRetriedDataSchema,
|
|
60
|
+
}),
|
|
61
|
+
z.object({
|
|
62
|
+
...eventInputBase,
|
|
63
|
+
type: z.literal('worker.cancelled'),
|
|
64
|
+
data: workerCancelledDataSchema,
|
|
65
|
+
}),
|
|
66
|
+
z.object({
|
|
67
|
+
...eventInputBase,
|
|
68
|
+
type: z.literal('worker.timeout'),
|
|
69
|
+
data: workerTimeoutDataSchema,
|
|
70
|
+
}),
|
|
71
|
+
z.object({
|
|
72
|
+
...eventInputBase,
|
|
73
|
+
type: z.literal('artifact.stored'),
|
|
74
|
+
data: artifactStoredDataSchema,
|
|
75
|
+
}),
|
|
76
|
+
z.object({
|
|
77
|
+
...eventInputBase,
|
|
78
|
+
type: z.literal('artifact.verified'),
|
|
79
|
+
data: artifactVerifiedDataSchema,
|
|
80
|
+
}),
|
|
81
|
+
z.object({
|
|
82
|
+
...eventInputBase,
|
|
83
|
+
type: z.literal('artifact.invalidated'),
|
|
84
|
+
data: artifactInvalidatedDataSchema,
|
|
85
|
+
}),
|
|
86
|
+
z.object({
|
|
87
|
+
...eventInputBase,
|
|
88
|
+
type: z.literal('governance.decision'),
|
|
89
|
+
data: governanceDecisionDataSchema,
|
|
90
|
+
}),
|
|
91
|
+
z.object({
|
|
92
|
+
...eventInputBase,
|
|
93
|
+
type: z.literal('governance.agreement_produced'),
|
|
94
|
+
data: agreementProducedDataSchema,
|
|
95
|
+
}),
|
|
96
|
+
z.object({
|
|
97
|
+
...eventInputBase,
|
|
98
|
+
type: z.literal('governance.escalation_triggered'),
|
|
99
|
+
data: escalationTriggeredDataSchema,
|
|
100
|
+
}),
|
|
101
|
+
z.object({
|
|
102
|
+
...eventInputBase,
|
|
103
|
+
type: z.literal('policy.evaluated'),
|
|
104
|
+
data: policyEvaluatedDataSchema,
|
|
105
|
+
}),
|
|
106
|
+
z.object({
|
|
107
|
+
...eventInputBase,
|
|
108
|
+
type: z.literal('policy.denied'),
|
|
109
|
+
data: policyDeniedDataSchema,
|
|
110
|
+
}),
|
|
111
|
+
z.object({
|
|
112
|
+
...eventInputBase,
|
|
113
|
+
type: z.literal('policy.escalated'),
|
|
114
|
+
data: policyEscalatedDataSchema,
|
|
115
|
+
}),
|
|
116
|
+
z.object({
|
|
117
|
+
...eventInputBase,
|
|
118
|
+
type: z.literal('finding.raised'),
|
|
119
|
+
data: findingRaisedDataSchema,
|
|
120
|
+
}),
|
|
121
|
+
z.object({
|
|
122
|
+
...eventInputBase,
|
|
123
|
+
type: z.literal('finding.addressed'),
|
|
124
|
+
data: findingAddressedDataSchema,
|
|
125
|
+
}),
|
|
126
|
+
z.object({
|
|
127
|
+
...eventInputBase,
|
|
128
|
+
type: z.literal('finding.accepted'),
|
|
129
|
+
data: findingAcceptedDataSchema,
|
|
130
|
+
}),
|
|
131
|
+
z.object({
|
|
132
|
+
...eventInputBase,
|
|
133
|
+
type: z.literal('finding.rejected'),
|
|
134
|
+
data: findingRejectedDataSchema,
|
|
135
|
+
}),
|
|
136
|
+
z.object({
|
|
137
|
+
...eventInputBase,
|
|
138
|
+
type: z.literal('finding.escalated'),
|
|
139
|
+
data: findingEscalatedDataSchema,
|
|
140
|
+
}),
|
|
141
|
+
z.object({
|
|
142
|
+
...eventInputBase,
|
|
143
|
+
type: z.literal('human.input_requested'),
|
|
144
|
+
data: humanInputRequestedDataSchema,
|
|
145
|
+
}),
|
|
146
|
+
z.object({
|
|
147
|
+
...eventInputBase,
|
|
148
|
+
type: z.literal('human.input_received'),
|
|
149
|
+
data: humanInputReceivedDataSchema,
|
|
150
|
+
}),
|
|
151
|
+
z.object({
|
|
152
|
+
...eventInputBase,
|
|
153
|
+
type: z.literal('human.approval_granted'),
|
|
154
|
+
data: humanApprovalGrantedDataSchema,
|
|
155
|
+
}),
|
|
156
|
+
z.object({
|
|
157
|
+
...eventInputBase,
|
|
158
|
+
type: z.literal('human.approval_denied'),
|
|
159
|
+
data: humanApprovalDeniedDataSchema,
|
|
160
|
+
}),
|
|
161
|
+
z.object({
|
|
162
|
+
...eventInputBase,
|
|
163
|
+
type: z.literal('human.timeout'),
|
|
164
|
+
data: humanTimeoutDataSchema,
|
|
165
|
+
}),
|
|
166
|
+
z.object({
|
|
167
|
+
...eventInputBase,
|
|
168
|
+
type: z.literal('human.permission_requested'),
|
|
169
|
+
data: humanPermissionRequestedDataSchema,
|
|
170
|
+
}),
|
|
171
|
+
z.object({
|
|
172
|
+
...eventInputBase,
|
|
173
|
+
type: z.literal('human.permission_granted'),
|
|
174
|
+
data: humanPermissionResolvedDataSchema,
|
|
175
|
+
}),
|
|
176
|
+
z.object({
|
|
177
|
+
...eventInputBase,
|
|
178
|
+
type: z.literal('human.permission_denied'),
|
|
179
|
+
data: humanPermissionResolvedDataSchema,
|
|
180
|
+
}),
|
|
181
|
+
z.object({
|
|
182
|
+
...eventInputBase,
|
|
183
|
+
type: z.literal('human.clarification_requested'),
|
|
184
|
+
data: humanClarificationRequestedDataSchema,
|
|
185
|
+
}),
|
|
186
|
+
z.object({
|
|
187
|
+
...eventInputBase,
|
|
188
|
+
type: z.literal('human.clarification_answered'),
|
|
189
|
+
data: humanClarificationAnsweredDataSchema,
|
|
190
|
+
}),
|
|
191
|
+
z.object({
|
|
192
|
+
...eventInputBase,
|
|
193
|
+
type: z.literal('checkpoint.saved'),
|
|
194
|
+
data: checkpointSavedDataSchema,
|
|
195
|
+
}),
|
|
196
|
+
z.object({
|
|
197
|
+
...eventInputBase,
|
|
198
|
+
type: z.literal('checkpoint.restored'),
|
|
199
|
+
data: checkpointRestoredDataSchema,
|
|
200
|
+
}),
|
|
201
|
+
z.object({
|
|
202
|
+
...eventInputBase,
|
|
203
|
+
type: z.literal('system.error'),
|
|
204
|
+
data: systemErrorDataSchema,
|
|
205
|
+
}),
|
|
206
|
+
z.object({
|
|
207
|
+
...eventInputBase,
|
|
208
|
+
type: z.literal('system.warning'),
|
|
209
|
+
data: systemWarningDataSchema,
|
|
210
|
+
}),
|
|
211
|
+
]);
|
|
212
|
+
// ---------------------------------------------------------------------------
|
|
213
|
+
// Full event schema (discriminated union on `type`)
|
|
214
|
+
// ---------------------------------------------------------------------------
|
|
215
|
+
const eventEnvelopeBase = {
|
|
216
|
+
source: eventSourceSchema,
|
|
217
|
+
correlationId: z.string().optional(),
|
|
218
|
+
id: z.string(),
|
|
219
|
+
runId: z.string(),
|
|
220
|
+
sequence: z.number(),
|
|
221
|
+
timestamp: z.string(),
|
|
222
|
+
};
|
|
223
|
+
export const eventSchema = z.discriminatedUnion('type', [
|
|
224
|
+
z.object({ ...eventEnvelopeBase, type: z.literal('run.started'), data: runStartedDataSchema }),
|
|
225
|
+
z.object({
|
|
226
|
+
...eventEnvelopeBase,
|
|
227
|
+
type: z.literal('run.completed'),
|
|
228
|
+
data: runCompletedDataSchema,
|
|
229
|
+
}),
|
|
230
|
+
z.object({ ...eventEnvelopeBase, type: z.literal('run.aborted'), data: runAbortedDataSchema }),
|
|
231
|
+
z.object({ ...eventEnvelopeBase, type: z.literal('run.resumed'), data: runResumedDataSchema }),
|
|
232
|
+
z.object({ ...eventEnvelopeBase, type: z.literal('run.paused'), data: runPausedDataSchema }),
|
|
233
|
+
z.object({
|
|
234
|
+
...eventEnvelopeBase,
|
|
235
|
+
type: z.literal('state.entered'),
|
|
236
|
+
data: stateEnteredDataSchema,
|
|
237
|
+
}),
|
|
238
|
+
z.object({
|
|
239
|
+
...eventEnvelopeBase,
|
|
240
|
+
type: z.literal('state.exited'),
|
|
241
|
+
data: stateExitedDataSchema,
|
|
242
|
+
}),
|
|
243
|
+
z.object({
|
|
244
|
+
...eventEnvelopeBase,
|
|
245
|
+
type: z.literal('transition.requested'),
|
|
246
|
+
data: transitionRequestedDataSchema,
|
|
247
|
+
}),
|
|
248
|
+
z.object({
|
|
249
|
+
...eventEnvelopeBase,
|
|
250
|
+
type: z.literal('transition.completed'),
|
|
251
|
+
data: transitionCompletedDataSchema,
|
|
252
|
+
}),
|
|
253
|
+
z.object({
|
|
254
|
+
...eventEnvelopeBase,
|
|
255
|
+
type: z.literal('transition.denied'),
|
|
256
|
+
data: transitionDeniedDataSchema,
|
|
257
|
+
}),
|
|
258
|
+
z.object({
|
|
259
|
+
...eventEnvelopeBase,
|
|
260
|
+
type: z.literal('worker.dispatched'),
|
|
261
|
+
data: workerDispatchedDataSchema,
|
|
262
|
+
}),
|
|
263
|
+
z.object({
|
|
264
|
+
...eventEnvelopeBase,
|
|
265
|
+
type: z.literal('worker.completed'),
|
|
266
|
+
data: workerCompletedDataSchema,
|
|
267
|
+
}),
|
|
268
|
+
z.object({
|
|
269
|
+
...eventEnvelopeBase,
|
|
270
|
+
type: z.literal('worker.failed'),
|
|
271
|
+
data: workerFailedDataSchema,
|
|
272
|
+
}),
|
|
273
|
+
z.object({
|
|
274
|
+
...eventEnvelopeBase,
|
|
275
|
+
type: z.literal('worker.retried'),
|
|
276
|
+
data: workerRetriedDataSchema,
|
|
277
|
+
}),
|
|
278
|
+
z.object({
|
|
279
|
+
...eventEnvelopeBase,
|
|
280
|
+
type: z.literal('worker.cancelled'),
|
|
281
|
+
data: workerCancelledDataSchema,
|
|
282
|
+
}),
|
|
283
|
+
z.object({
|
|
284
|
+
...eventEnvelopeBase,
|
|
285
|
+
type: z.literal('worker.timeout'),
|
|
286
|
+
data: workerTimeoutDataSchema,
|
|
287
|
+
}),
|
|
288
|
+
z.object({
|
|
289
|
+
...eventEnvelopeBase,
|
|
290
|
+
type: z.literal('artifact.stored'),
|
|
291
|
+
data: artifactStoredDataSchema,
|
|
292
|
+
}),
|
|
293
|
+
z.object({
|
|
294
|
+
...eventEnvelopeBase,
|
|
295
|
+
type: z.literal('artifact.verified'),
|
|
296
|
+
data: artifactVerifiedDataSchema,
|
|
297
|
+
}),
|
|
298
|
+
z.object({
|
|
299
|
+
...eventEnvelopeBase,
|
|
300
|
+
type: z.literal('artifact.invalidated'),
|
|
301
|
+
data: artifactInvalidatedDataSchema,
|
|
302
|
+
}),
|
|
303
|
+
z.object({
|
|
304
|
+
...eventEnvelopeBase,
|
|
305
|
+
type: z.literal('governance.decision'),
|
|
306
|
+
data: governanceDecisionDataSchema,
|
|
307
|
+
}),
|
|
308
|
+
z.object({
|
|
309
|
+
...eventEnvelopeBase,
|
|
310
|
+
type: z.literal('governance.agreement_produced'),
|
|
311
|
+
data: agreementProducedDataSchema,
|
|
312
|
+
}),
|
|
313
|
+
z.object({
|
|
314
|
+
...eventEnvelopeBase,
|
|
315
|
+
type: z.literal('governance.escalation_triggered'),
|
|
316
|
+
data: escalationTriggeredDataSchema,
|
|
317
|
+
}),
|
|
318
|
+
z.object({
|
|
319
|
+
...eventEnvelopeBase,
|
|
320
|
+
type: z.literal('policy.evaluated'),
|
|
321
|
+
data: policyEvaluatedDataSchema,
|
|
322
|
+
}),
|
|
323
|
+
z.object({
|
|
324
|
+
...eventEnvelopeBase,
|
|
325
|
+
type: z.literal('policy.denied'),
|
|
326
|
+
data: policyDeniedDataSchema,
|
|
327
|
+
}),
|
|
328
|
+
z.object({
|
|
329
|
+
...eventEnvelopeBase,
|
|
330
|
+
type: z.literal('policy.escalated'),
|
|
331
|
+
data: policyEscalatedDataSchema,
|
|
332
|
+
}),
|
|
333
|
+
z.object({
|
|
334
|
+
...eventEnvelopeBase,
|
|
335
|
+
type: z.literal('finding.raised'),
|
|
336
|
+
data: findingRaisedDataSchema,
|
|
337
|
+
}),
|
|
338
|
+
z.object({
|
|
339
|
+
...eventEnvelopeBase,
|
|
340
|
+
type: z.literal('finding.addressed'),
|
|
341
|
+
data: findingAddressedDataSchema,
|
|
342
|
+
}),
|
|
343
|
+
z.object({
|
|
344
|
+
...eventEnvelopeBase,
|
|
345
|
+
type: z.literal('finding.accepted'),
|
|
346
|
+
data: findingAcceptedDataSchema,
|
|
347
|
+
}),
|
|
348
|
+
z.object({
|
|
349
|
+
...eventEnvelopeBase,
|
|
350
|
+
type: z.literal('finding.rejected'),
|
|
351
|
+
data: findingRejectedDataSchema,
|
|
352
|
+
}),
|
|
353
|
+
z.object({
|
|
354
|
+
...eventEnvelopeBase,
|
|
355
|
+
type: z.literal('finding.escalated'),
|
|
356
|
+
data: findingEscalatedDataSchema,
|
|
357
|
+
}),
|
|
358
|
+
z.object({
|
|
359
|
+
...eventEnvelopeBase,
|
|
360
|
+
type: z.literal('human.input_requested'),
|
|
361
|
+
data: humanInputRequestedDataSchema,
|
|
362
|
+
}),
|
|
363
|
+
z.object({
|
|
364
|
+
...eventEnvelopeBase,
|
|
365
|
+
type: z.literal('human.input_received'),
|
|
366
|
+
data: humanInputReceivedDataSchema,
|
|
367
|
+
}),
|
|
368
|
+
z.object({
|
|
369
|
+
...eventEnvelopeBase,
|
|
370
|
+
type: z.literal('human.approval_granted'),
|
|
371
|
+
data: humanApprovalGrantedDataSchema,
|
|
372
|
+
}),
|
|
373
|
+
z.object({
|
|
374
|
+
...eventEnvelopeBase,
|
|
375
|
+
type: z.literal('human.approval_denied'),
|
|
376
|
+
data: humanApprovalDeniedDataSchema,
|
|
377
|
+
}),
|
|
378
|
+
z.object({
|
|
379
|
+
...eventEnvelopeBase,
|
|
380
|
+
type: z.literal('human.timeout'),
|
|
381
|
+
data: humanTimeoutDataSchema,
|
|
382
|
+
}),
|
|
383
|
+
z.object({
|
|
384
|
+
...eventEnvelopeBase,
|
|
385
|
+
type: z.literal('human.permission_requested'),
|
|
386
|
+
data: humanPermissionRequestedDataSchema,
|
|
387
|
+
}),
|
|
388
|
+
z.object({
|
|
389
|
+
...eventEnvelopeBase,
|
|
390
|
+
type: z.literal('human.permission_granted'),
|
|
391
|
+
data: humanPermissionResolvedDataSchema,
|
|
392
|
+
}),
|
|
393
|
+
z.object({
|
|
394
|
+
...eventEnvelopeBase,
|
|
395
|
+
type: z.literal('human.permission_denied'),
|
|
396
|
+
data: humanPermissionResolvedDataSchema,
|
|
397
|
+
}),
|
|
398
|
+
z.object({
|
|
399
|
+
...eventEnvelopeBase,
|
|
400
|
+
type: z.literal('human.clarification_requested'),
|
|
401
|
+
data: humanClarificationRequestedDataSchema,
|
|
402
|
+
}),
|
|
403
|
+
z.object({
|
|
404
|
+
...eventEnvelopeBase,
|
|
405
|
+
type: z.literal('human.clarification_answered'),
|
|
406
|
+
data: humanClarificationAnsweredDataSchema,
|
|
407
|
+
}),
|
|
408
|
+
z.object({
|
|
409
|
+
...eventEnvelopeBase,
|
|
410
|
+
type: z.literal('checkpoint.saved'),
|
|
411
|
+
data: checkpointSavedDataSchema,
|
|
412
|
+
}),
|
|
413
|
+
z.object({
|
|
414
|
+
...eventEnvelopeBase,
|
|
415
|
+
type: z.literal('checkpoint.restored'),
|
|
416
|
+
data: checkpointRestoredDataSchema,
|
|
417
|
+
}),
|
|
418
|
+
z.object({
|
|
419
|
+
...eventEnvelopeBase,
|
|
420
|
+
type: z.literal('system.error'),
|
|
421
|
+
data: systemErrorDataSchema,
|
|
422
|
+
}),
|
|
423
|
+
z.object({
|
|
424
|
+
...eventEnvelopeBase,
|
|
425
|
+
type: z.literal('system.warning'),
|
|
426
|
+
data: systemWarningDataSchema,
|
|
427
|
+
}),
|
|
428
|
+
]);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
export declare const EVENT_TYPES: readonly ["run.started", "run.completed", "run.aborted", "run.resumed", "run.paused", "state.entered", "state.exited", "transition.requested", "transition.completed", "transition.denied", "worker.dispatched", "worker.completed", "worker.failed", "worker.retried", "worker.cancelled", "worker.timeout", "artifact.stored", "artifact.verified", "artifact.invalidated", "governance.decision", "governance.agreement_produced", "governance.escalation_triggered", "policy.evaluated", "policy.denied", "policy.escalated", "finding.raised", "finding.addressed", "finding.accepted", "finding.rejected", "finding.escalated", "human.input_requested", "human.input_received", "human.approval_granted", "human.approval_denied", "human.timeout", "human.permission_requested", "human.permission_granted", "human.permission_denied", "human.clarification_requested", "human.clarification_answered", "checkpoint.saved", "checkpoint.restored", "system.error", "system.warning"];
|
|
3
|
+
export declare const eventTypeSchema: z.ZodEnum<{
|
|
4
|
+
"run.started": "run.started";
|
|
5
|
+
"run.completed": "run.completed";
|
|
6
|
+
"run.aborted": "run.aborted";
|
|
7
|
+
"run.resumed": "run.resumed";
|
|
8
|
+
"run.paused": "run.paused";
|
|
9
|
+
"state.entered": "state.entered";
|
|
10
|
+
"state.exited": "state.exited";
|
|
11
|
+
"transition.requested": "transition.requested";
|
|
12
|
+
"transition.completed": "transition.completed";
|
|
13
|
+
"transition.denied": "transition.denied";
|
|
14
|
+
"worker.dispatched": "worker.dispatched";
|
|
15
|
+
"worker.completed": "worker.completed";
|
|
16
|
+
"worker.failed": "worker.failed";
|
|
17
|
+
"worker.retried": "worker.retried";
|
|
18
|
+
"worker.cancelled": "worker.cancelled";
|
|
19
|
+
"worker.timeout": "worker.timeout";
|
|
20
|
+
"artifact.stored": "artifact.stored";
|
|
21
|
+
"artifact.verified": "artifact.verified";
|
|
22
|
+
"artifact.invalidated": "artifact.invalidated";
|
|
23
|
+
"governance.decision": "governance.decision";
|
|
24
|
+
"governance.agreement_produced": "governance.agreement_produced";
|
|
25
|
+
"governance.escalation_triggered": "governance.escalation_triggered";
|
|
26
|
+
"policy.evaluated": "policy.evaluated";
|
|
27
|
+
"policy.denied": "policy.denied";
|
|
28
|
+
"policy.escalated": "policy.escalated";
|
|
29
|
+
"finding.raised": "finding.raised";
|
|
30
|
+
"finding.addressed": "finding.addressed";
|
|
31
|
+
"finding.accepted": "finding.accepted";
|
|
32
|
+
"finding.rejected": "finding.rejected";
|
|
33
|
+
"finding.escalated": "finding.escalated";
|
|
34
|
+
"human.input_requested": "human.input_requested";
|
|
35
|
+
"human.input_received": "human.input_received";
|
|
36
|
+
"human.approval_granted": "human.approval_granted";
|
|
37
|
+
"human.approval_denied": "human.approval_denied";
|
|
38
|
+
"human.timeout": "human.timeout";
|
|
39
|
+
"human.permission_requested": "human.permission_requested";
|
|
40
|
+
"human.permission_granted": "human.permission_granted";
|
|
41
|
+
"human.permission_denied": "human.permission_denied";
|
|
42
|
+
"human.clarification_requested": "human.clarification_requested";
|
|
43
|
+
"human.clarification_answered": "human.clarification_answered";
|
|
44
|
+
"checkpoint.saved": "checkpoint.saved";
|
|
45
|
+
"checkpoint.restored": "checkpoint.restored";
|
|
46
|
+
"system.error": "system.error";
|
|
47
|
+
"system.warning": "system.warning";
|
|
48
|
+
}>;
|
|
49
|
+
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
50
|
+
export declare const EVENT_SOURCES: readonly ["workflow_engine", "runner_system", "governance", "policy_engine", "artifact_system", "state_persistence", "human_interaction", "provider", "system"];
|
|
51
|
+
export declare const eventSourceSchema: z.ZodEnum<{
|
|
52
|
+
governance: "governance";
|
|
53
|
+
system: "system";
|
|
54
|
+
workflow_engine: "workflow_engine";
|
|
55
|
+
runner_system: "runner_system";
|
|
56
|
+
policy_engine: "policy_engine";
|
|
57
|
+
artifact_system: "artifact_system";
|
|
58
|
+
state_persistence: "state_persistence";
|
|
59
|
+
human_interaction: "human_interaction";
|
|
60
|
+
provider: "provider";
|
|
61
|
+
}>;
|
|
62
|
+
export type EventSource = z.infer<typeof eventSourceSchema>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Event types
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
export const EVENT_TYPES = [
|
|
6
|
+
'run.started',
|
|
7
|
+
'run.completed',
|
|
8
|
+
'run.aborted',
|
|
9
|
+
'run.resumed',
|
|
10
|
+
'run.paused',
|
|
11
|
+
'state.entered',
|
|
12
|
+
'state.exited',
|
|
13
|
+
'transition.requested',
|
|
14
|
+
'transition.completed',
|
|
15
|
+
'transition.denied',
|
|
16
|
+
'worker.dispatched',
|
|
17
|
+
'worker.completed',
|
|
18
|
+
'worker.failed',
|
|
19
|
+
'worker.retried',
|
|
20
|
+
'worker.cancelled',
|
|
21
|
+
'worker.timeout',
|
|
22
|
+
'artifact.stored',
|
|
23
|
+
'artifact.verified',
|
|
24
|
+
'artifact.invalidated',
|
|
25
|
+
'governance.decision',
|
|
26
|
+
'governance.agreement_produced',
|
|
27
|
+
'governance.escalation_triggered',
|
|
28
|
+
'policy.evaluated',
|
|
29
|
+
'policy.denied',
|
|
30
|
+
'policy.escalated',
|
|
31
|
+
'finding.raised',
|
|
32
|
+
'finding.addressed',
|
|
33
|
+
'finding.accepted',
|
|
34
|
+
'finding.rejected',
|
|
35
|
+
'finding.escalated',
|
|
36
|
+
'human.input_requested',
|
|
37
|
+
'human.input_received',
|
|
38
|
+
'human.approval_granted',
|
|
39
|
+
'human.approval_denied',
|
|
40
|
+
'human.timeout',
|
|
41
|
+
'human.permission_requested',
|
|
42
|
+
'human.permission_granted',
|
|
43
|
+
'human.permission_denied',
|
|
44
|
+
'human.clarification_requested',
|
|
45
|
+
'human.clarification_answered',
|
|
46
|
+
'checkpoint.saved',
|
|
47
|
+
'checkpoint.restored',
|
|
48
|
+
'system.error',
|
|
49
|
+
'system.warning',
|
|
50
|
+
];
|
|
51
|
+
export const eventTypeSchema = z.enum(EVENT_TYPES);
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
// Event sources
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
export const EVENT_SOURCES = [
|
|
56
|
+
'workflow_engine',
|
|
57
|
+
'runner_system',
|
|
58
|
+
'governance',
|
|
59
|
+
'policy_engine',
|
|
60
|
+
'artifact_system',
|
|
61
|
+
'state_persistence',
|
|
62
|
+
'human_interaction',
|
|
63
|
+
'provider',
|
|
64
|
+
'system',
|
|
65
|
+
];
|
|
66
|
+
export const eventSourceSchema = z.enum(EVENT_SOURCES);
|