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;
            delta: string;
            kind: "stage:llm-text-delta";
            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. On a streaming call that makes a single request (either streaming mode, with no function tools) the id arrives with the first SSE event, while the call is still running. Only a background-stream response keeps generating after the caller disconnects, so only there is this the point to persist the id for recovery. Otherwise (synchronous, poll-only, or a function-tool loop) the id is known at completion, and this event fires immediately before stage:llm-call on the same attempt, with the same id that event carries.

      • responseId: string

        The OpenAI response id for this attempt.

      • stageId: string
    • {
          at: number;
          attempt: number;
          delta: string;
          kind: "stage:llm-text-delta";
          stageId: string;
      }
      • at: number
      • attempt: number

        1, 2, ... — the attempt this chunk belongs to. A retried attempt streams its text again from the beginning.

      • delta: string

        One chunk of assistant output text, as the provider emitted it. Never accumulated.

      • kind: "stage:llm-text-delta"
      • 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.