proposit-core
    Preparing search index...

    Type Alias TPipelineEvent

    TPipelineEvent:
        | {
            at: number;
            kind: "pipeline:start";
            pipelineId: string;
            pipelineVersion: string;
        }
        | {
            at: number;
            kind: "pipeline:end";
            output: "present"
            | "null";
            status: "completed" | "failed";
        }
        | { at: number; kind: "stage:start"; stageId: string }
        | {
            at: number;
            kind: "stage:end";
            stageId: string;
            status: TStageStatus;
            tokenUsage?: TLlmTokenUsage;
        }
        | {
            at: number;
            attempt: number;
            kind: "stage:retry";
            reason: string;
            stageId: string;
        }
        | {
            at: number;
            attempt: number;
            kind: "stage:llm-request";
            prompts: { system: string; user: string };
            stageId: string;
        }
        | {
            at: number;
            attempt: number;
            kind: "stage:llm-response-created";
            responseId: string;
            stageId: string;
        }
        | {
            at: number;
            attempt: number;
            kind: "stage:llm-call";
            output: unknown;
            prompts: { system: string; user: string };
            rawResponseId?: string;
            stageId: string;
            tokenUsage: TLlmTokenUsage;
            validationError?: string;
        }

    Type Declaration

    • {
          at: number;
          kind: "pipeline:start";
          pipelineId: string;
          pipelineVersion: string;
      }
    • {
          at: number;
          kind: "pipeline:end";
          output: "present" | "null";
          status: "completed" | "failed";
      }
    • { at: number; kind: "stage:start"; stageId: string }
    • {
          at: number;
          kind: "stage:end";
          stageId: string;
          status: TStageStatus;
          tokenUsage?: TLlmTokenUsage;
      }
    • {
          at: number;
          attempt: number;
          kind: "stage:retry";
          reason: string;
          stageId: string;
      }
    • {
          at: number;
          attempt: number;
          kind: "stage:llm-request";
          prompts: { system: string; user: string };
          stageId: string;
      }
      • at: number
      • attempt: number

        1, 2, ... — one event per LLM-call attempt, emitted before the provider call resolves. Symmetric with the post-call stage:llm-call.attempt.

      • kind: "stage:llm-request"
      • prompts: { system: string; user: string }

        The prompts about to be sent for this attempt. The user message includes any retry-suffix appended on attempt 2+ after a prior schema-validation failure — identical to the same attempt's stage:llm-call.prompts.user.

      • stageId: string
    • {
          at: number;
          attempt: number;
          kind: "stage:llm-response-created";
          responseId: string;
          stageId: string;
      }
      • at: number
      • attempt: number

        1, 2, ... — the attempt index this id belongs to.

      • kind: "stage:llm-response-created"

        Emitted by llmStage as soon as a response id is known. In background+stream mode the id is available from the initial submit POST response before any SSE bytes, making this event the earliest durable persistence point. In synchronous mode the id is only known at completion, so this event fires immediately before stage:llm-call on the same attempt; early-persistence is a background-mode- only guarantee.

      • responseId: string

        The OpenAI response id for this attempt.

      • stageId: string
    • {
          at: number;
          attempt: number;
          kind: "stage:llm-call";
          output: unknown;
          prompts: { system: string; user: string };
          rawResponseId?: string;
          stageId: string;
          tokenUsage: TLlmTokenUsage;
          validationError?: string;
      }
      • at: number
      • attempt: number

        1, 2, ... — one event per LLM-call attempt.

      • kind: "stage:llm-call"
      • output: unknown

        Raw LLM JSON as returned. May not conform to the stage's outputSchema if validationError is set.

      • prompts: { system: string; user: string }

        The actual prompts sent for this attempt (the user message includes any retry-suffix appended on attempt 2+ after a prior schema-validation failure).

      • OptionalrawResponseId?: string

        The OpenAI response id for this attempt, when the provider surfaces one. Absent for providers that do not expose a response id (e.g. the chat-completions provider) and for attempts where the id could not be captured before completion.

      • stageId: string
      • tokenUsage: TLlmTokenUsage
      • OptionalvalidationError?: string

        Set iff outputSchema rejected this output. When the schema accepted the output the field is undefined.