tarlatan
    Preparing search index...

    Variable decodeCodexEventConst

    decodeCodexEvent: (
        input: unknown,
        options?: ParseOptions,
    ) => Result<
        | { type: "thread.started" }
        | { type: "turn.started" }
        | { type: "turn.completed"; usage?: { readonly [key: string]: unknown } }
        | { error?: { readonly [key: string]: unknown }; type: "turn.failed" }
        | { message?: string; type: "error" },
        SchemaError,
    > = ...

    Decodes an unknown value as any CodexEvent; other event types fail.

    Type Declaration

      • (
            input: unknown,
            options?: ParseOptions,
        ): Result<
            | { type: "thread.started" }
            | { type: "turn.started" }
            | { type: "turn.completed"; usage?: { readonly [key: string]: unknown } }
            | { error?: { readonly [key: string]: unknown }; type: "turn.failed" }
            | { message?: string; type: "error" },
            SchemaError,
        >
      • Parameters

        Returns Result<
            | { type: "thread.started" }
            | { type: "turn.started" }
            | { type: "turn.completed"; usage?: { readonly [key: string]: unknown } }
            | { error?: { readonly [key: string]: unknown }; type: "turn.failed" }
            | { message?: string; type: "error" },
            SchemaError,
        >