add processing start / end events

This commit is contained in:
Ramnique Singh 2025-12-17 11:43:34 +05:30
parent f1219db4ac
commit 22906894ea
3 changed files with 93 additions and 63 deletions

View file

@ -8,6 +8,14 @@ const BaseRunEvent = z.object({
subflow: z.array(z.string()),
});
export const RunProcessingStartEvent = BaseRunEvent.extend({
type: z.literal("run-processing-start"),
});
export const RunProcessingEndEvent = BaseRunEvent.extend({
type: z.literal("run-processing-end"),
});
export const StartEvent = BaseRunEvent.extend({
type: z.literal("start"),
agentName: z.string(),
@ -73,6 +81,8 @@ export const RunErrorEvent = BaseRunEvent.extend({
});
export const RunEvent = z.union([
RunProcessingStartEvent,
RunProcessingEndEvent,
StartEvent,
SpawnSubFlowEvent,
LlmStreamEvent,