Skip to content
File

Blob: src/contracts/log.ts

typescript17 lines
1import { eg, type TypeFromCodec } from "@cloudflare/util-en-garde";
2 
3import { IsoDateTime, OpaqueId, RunId } from "@/contracts/common";
4import { LogStream } from "@/contracts/execution";
5 
6export const LogEvent = eg.exactStrict(
7 eg.object({
8 id: OpaqueId,
9 runId: RunId,
10 seq: eg.number,
11 stream: LogStream,
12 chunk: eg.string,
13 createdAt: IsoDateTime,
14 }),
15);
16export type LogEvent = TypeFromCodec<typeof LogEvent>;