import * as Schema from "effect/Schema"; import { type OperationEvent } from "@agentxm/workspace/transitions/planning"; /** * One lifecycle event of a running operation, written to stderr as it * happens. The `event` is the published lifecycle contract: `seq` increases * strictly within one operation and exactly one `OperationSettled` event * precedes the result document. */ export declare const ProgressEventSchema: Schema.Struct<{ readonly type: Schema.Literal<"progress">; readonly event: Schema.Union; readonly operationId: Schema.String; readonly name: Schema.String; readonly mode: Schema.Literals; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"PhaseStarted">; readonly phase: Schema.Literals; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"UnitStarted">; readonly unitId: Schema.String; readonly label: Schema.String; readonly index: Schema.Number; readonly total: Schema.optional; readonly parentUnitId: Schema.optional; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"UnitProgress">; readonly unitId: Schema.String; readonly done: Schema.Number; readonly total: Schema.optional; readonly unit: Schema.Literals; readonly attempt: Schema.optional>; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"UnitResolved">; readonly unitId: Schema.String; readonly label: Schema.String; readonly state: Schema.Literals; readonly index: Schema.Number; readonly total: Schema.optional; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"Waiting">; readonly blockingClass: Schema.Literals; readonly subject: Schema.String; readonly detail: Schema.String; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"WaitEnded">; readonly subject: Schema.String; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"OperationSettled">; readonly outcome: Schema.Literals; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>]>; }>; export type ProgressEvent = typeof ProgressEventSchema.Type; export declare const LogEventSchema: Schema.Struct<{ readonly type: Schema.Literal<"log">; readonly level: Schema.Literals; readonly message: Schema.String; }>; export type LogEvent = typeof LogEventSchema.Type; export declare const ErrorEventSchema: Schema.Struct<{ readonly type: Schema.Literal<"error">; readonly code: Schema.String; readonly message: Schema.String; readonly reason: Schema.optional; readonly signal: Schema.optional>; }>; export type ErrorEvent = typeof ErrorEventSchema.Type; export declare const SuggestionEventSchema: Schema.Struct<{ readonly type: Schema.Literal<"suggestion">; readonly description: Schema.String; readonly cmd: Schema.optional; readonly url: Schema.optional; }>; export type SuggestionEvent = typeof SuggestionEventSchema.Type; export declare const InstructionEventSchema: Schema.Struct<{ readonly type: Schema.Literal<"instruction">; readonly message: Schema.String; }>; export type InstructionEvent = typeof InstructionEventSchema.Type; export declare const MachineEventSchema: Schema.Union; readonly event: Schema.Union; readonly operationId: Schema.String; readonly name: Schema.String; readonly mode: Schema.Literals; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"PhaseStarted">; readonly phase: Schema.Literals; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"UnitStarted">; readonly unitId: Schema.String; readonly label: Schema.String; readonly index: Schema.Number; readonly total: Schema.optional; readonly parentUnitId: Schema.optional; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"UnitProgress">; readonly unitId: Schema.String; readonly done: Schema.Number; readonly total: Schema.optional; readonly unit: Schema.Literals; readonly attempt: Schema.optional>; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"UnitResolved">; readonly unitId: Schema.String; readonly label: Schema.String; readonly state: Schema.Literals; readonly index: Schema.Number; readonly total: Schema.optional; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"Waiting">; readonly blockingClass: Schema.Literals; readonly subject: Schema.String; readonly detail: Schema.String; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"WaitEnded">; readonly subject: Schema.String; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>, Schema.Struct<{ readonly _tag: Schema.tag<"OperationSettled">; readonly outcome: Schema.Literals; readonly seq: Schema.Number; readonly atMs: Schema.Number; }>]>; }>, Schema.Struct<{ readonly type: Schema.Literal<"log">; readonly level: Schema.Literals; readonly message: Schema.String; }>, Schema.Struct<{ readonly type: Schema.Literal<"error">; readonly code: Schema.String; readonly message: Schema.String; readonly reason: Schema.optional; readonly signal: Schema.optional>; }>, Schema.Struct<{ readonly type: Schema.Literal<"suggestion">; readonly description: Schema.String; readonly cmd: Schema.optional; readonly url: Schema.optional; }>, Schema.Struct<{ readonly type: Schema.Literal<"instruction">; readonly message: Schema.String; }>]>; export type MachineEvent = typeof MachineEventSchema.Type; export declare const progressEvent: (event: OperationEvent) => ProgressEvent; export declare const logEvent: (level: LogEvent["level"], message: string) => LogEvent; export declare const errorEvent: (code: string, message: string, detail?: Pick) => ErrorEvent; export declare const suggestionEvent: (suggestion: { readonly description: string; readonly cmd?: string | undefined; readonly url?: string | undefined; }) => SuggestionEvent; export declare const instructionEvent: (message: string) => InstructionEvent; export declare const encodeMachineEvent: (event: MachineEvent) => string; //# sourceMappingURL=machine-events.d.ts.map