@ai-dev-orchestrator/schemas 0.1.2 → 0.1.4
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/dist/config/event-payloads.d.ts +1 -1
- package/dist/config/event-system.d.ts +2 -2
- package/dist/dashboard/dashboard-api.d.ts +6 -0
- package/dist/dashboard/dashboard-api.js +2 -0
- package/dist/dashboard/dashboard-domain.d.ts +4 -4
- package/dist/governance/index.d.ts +1 -0
- package/dist/governance/index.js +1 -0
- package/dist/governance/iteration-state-mapping.d.ts +5 -0
- package/dist/governance/iteration-state-mapping.js +13 -0
- package/dist/persistence/project-context.d.ts +2 -2
- package/dist/persistence/state-persistence.d.ts +2113 -0
- package/dist/persistence/state-persistence.js +28 -0
- package/dist/runner/runner-system.d.ts +28 -18
- package/dist/runner/runner-system.js +12 -4
- package/dist/workflow/workflow-engine.d.ts +247 -20
- package/dist/workflow/workflow-engine.js +14 -0
- package/dist/workflow/workflow-file.d.ts +28 -28
- package/dist/workflow/workflow-journal.d.ts +4620 -5
- package/dist/workflow/workflow-journal.js +15 -0
- package/package.json +2 -2
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
import { artifactRefSchema } from '../artifacts/artifact-system';
|
|
3
3
|
import { escalationReasonSchema, governanceOutcomeSchema } from '../governance/governance';
|
|
4
|
+
import { entryActionContinuationSchema, persistedStateSchema, } from '../persistence/state-persistence';
|
|
4
5
|
import { transitionTriggerSchema } from './workflow-engine';
|
|
5
6
|
export const JOURNAL_EVENT_TYPES = [
|
|
7
|
+
'workflow_checkpoint',
|
|
6
8
|
'run_started',
|
|
7
9
|
'run_completed',
|
|
8
10
|
'run_failed',
|
|
@@ -42,6 +44,7 @@ export const stateTransitionDataSchema = z.object({
|
|
|
42
44
|
kind: z.literal('state_transition'),
|
|
43
45
|
from: z.string(),
|
|
44
46
|
to: z.string(),
|
|
47
|
+
transitionCount: z.number().int().nonnegative().optional(),
|
|
45
48
|
trigger: transitionTriggerSchema,
|
|
46
49
|
durationMs: z.number(),
|
|
47
50
|
guardsEvaluated: z.number(),
|
|
@@ -49,6 +52,11 @@ export const stateTransitionDataSchema = z.object({
|
|
|
49
52
|
governanceRequired: z.boolean(),
|
|
50
53
|
governanceOutcome: governanceOutcomeSchema.optional(),
|
|
51
54
|
contractId: z.string().optional(),
|
|
55
|
+
iterationCounts: z.record(z.string(), z.number()).optional(),
|
|
56
|
+
judgeArbitrationCounts: z.record(z.string(), z.number()).optional(),
|
|
57
|
+
terminalActionsPending: z.boolean().optional(),
|
|
58
|
+
pendingTerminalState: z.string().optional(),
|
|
59
|
+
terminalRecoveryState: z.string().optional(),
|
|
52
60
|
});
|
|
53
61
|
export const workerEventDataSchema = z.object({
|
|
54
62
|
kind: z.literal('worker'),
|
|
@@ -62,6 +70,8 @@ export const workerEventDataSchema = z.object({
|
|
|
62
70
|
error: z.string().optional(),
|
|
63
71
|
retryCount: z.number().optional(),
|
|
64
72
|
outputArtifacts: z.array(artifactRefSchema).readonly().optional(),
|
|
73
|
+
/** Session completion and its action cursor are replayed as one event. */
|
|
74
|
+
entryActionContinuation: entryActionContinuationSchema.optional(),
|
|
65
75
|
});
|
|
66
76
|
export const artifactEventDataSchema = z.object({
|
|
67
77
|
kind: z.literal('artifact'),
|
|
@@ -129,7 +139,12 @@ export const scriptEventDataSchema = z.object({
|
|
|
129
139
|
stderr: z.string().optional(),
|
|
130
140
|
success: z.boolean().optional(),
|
|
131
141
|
});
|
|
142
|
+
export const workflowCheckpointDataSchema = z.object({
|
|
143
|
+
kind: z.literal('workflow_checkpoint'),
|
|
144
|
+
state: persistedStateSchema,
|
|
145
|
+
});
|
|
132
146
|
export const journalEventDataSchema = z.discriminatedUnion('kind', [
|
|
147
|
+
workflowCheckpointDataSchema,
|
|
133
148
|
runLifecycleDataSchema,
|
|
134
149
|
stateTransitionDataSchema,
|
|
135
150
|
workerEventDataSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-dev-orchestrator/schemas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"zod": "^4.
|
|
24
|
+
"zod": "^4.6.7"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"vitest": "^4.1.11",
|