AutoBE
    Preparing search index...

    Interface AutoBePreliminaryRewriteEvent

    Event fired when the LLM agent submits a subsequent write call during the preliminary RAG write loop, replacing its previous output.

    The preliminary system operates as a write-review-rewrite cycle: after the LLM incrementally loads context via RAG requests and submits its first write, the system allows it to self-review the output. If the LLM is satisfied, it calls complete to finalize (IAutoBePreliminaryComplete). If it wants to improve, it submits another write — and that subsequent write triggers this event.

    This event captures the full before-and-after picture of a rewrite: the agent's reasoning for why the previous output was insufficient (thinking), the raw arguments of the previous write (oldbie), and the raw arguments of the new replacement write (newbie). The number of rewrites is capped by AutoBeConfigConstant.PRELIMINARY_WRITE_LIMIT.

    Unlike AutoBePreliminaryAcquireEvent which tracks incremental context loading (RAG data requests), this event specifically tracks the moment the agent decides its prior output needs improvement and submits a replacement.

    Samchon

    interface AutoBePreliminaryRewriteEvent {
        created_at: string & Format<"date-time">;
        id: string;
        newbie: Record<string, unknown>;
        oldbie: Record<string, unknown>;
        source:
            | "imageDescribeDraft"
            | "imageDescribeComplete"
            | "analyzeScenario"
            | "analyzeWriteModule"
            | "analyzeWriteUnit"
            | "analyzeWriteSection"
            | "analyzeSectionReview"
            | "databaseGroup"
            | "databaseAuthorization"
            | "databaseComponent"
            | "databaseSchema"
            | "databaseCorrect"
            | "interfaceGroup"
            | "interfaceEndpoint"
            | "interfaceOperation"
            | "interfaceAuthorization"
            | "interfaceSchema"
            | "interfaceSchemaCasting"
            | "interfaceSchemaRefine"
            | "interfaceSchemaReview"
            | "interfaceSchemaRename"
            | "interfaceSchemaComplement"
            | "interfaceSchemaDecouple"
            | "interfacePrerequisite"
            | "testScenario"
            | "testWrite"
            | "testCorrect"
            | "realizePlan"
            | "realizeWrite"
            | "realizeCorrect"
            | "realizeAuthorizationWrite"
            | "realizeAuthorizationCorrect"
            | "multiLingualStart"
            | "multiLingualDatabaseComplete"
            | "multiLingualInterfaceComplete"
            | "multiLingualComplete";
        thinking: string;
        type: "preliminaryRewrite";
    }

    Hierarchy

    • AutoBeEventBase<"preliminaryRewrite">
      • AutoBePreliminaryRewriteEvent
    Index

    Properties

    created_at: string & Format<"date-time">

    Timestamp when the event was created.

    ISO 8601 formatted date-time string indicating when this event was emitted by the system. This timestamp is crucial for event ordering, performance analysis, and debugging the agent workflow execution timeline.

    Format: "YYYY-MM-DDTHH:mm:ss.sssZ" (e.g., "2024-01-15T14:30:45.123Z")

    id: string

    A unique identifier for the event.

    newbie: Record<string, unknown>

    Raw function calling arguments from the new replacement write submission.

    Contains the full arguments object the LLM passed in its latest write call, which replaces the previous output stored in oldbie. This becomes the candidate output that will either be finalized via complete or replaced again by yet another rewrite if the write limit has not been reached.

    oldbie: Record<string, unknown>

    Raw function calling arguments from the previous write submission.

    Contains the full arguments object the LLM passed in its prior write call (e.g., { type: "write", plan: "...", definition: {...} } for database schema generation). The structure varies by orchestrator type. Comparing oldbie and newbie reveals exactly what the agent changed during its self-review rewrite cycle.

    source:
        | "imageDescribeDraft"
        | "imageDescribeComplete"
        | "analyzeScenario"
        | "analyzeWriteModule"
        | "analyzeWriteUnit"
        | "analyzeWriteSection"
        | "analyzeSectionReview"
        | "databaseGroup"
        | "databaseAuthorization"
        | "databaseComponent"
        | "databaseSchema"
        | "databaseCorrect"
        | "interfaceGroup"
        | "interfaceEndpoint"
        | "interfaceOperation"
        | "interfaceAuthorization"
        | "interfaceSchema"
        | "interfaceSchemaCasting"
        | "interfaceSchemaRefine"
        | "interfaceSchemaReview"
        | "interfaceSchemaRename"
        | "interfaceSchemaComplement"
        | "interfaceSchemaDecouple"
        | "interfacePrerequisite"
        | "testScenario"
        | "testWrite"
        | "testCorrect"
        | "realizePlan"
        | "realizeWrite"
        | "realizeCorrect"
        | "realizeAuthorizationWrite"
        | "realizeAuthorizationCorrect"
        | "multiLingualStart"
        | "multiLingualDatabaseComplete"
        | "multiLingualInterfaceComplete"
        | "multiLingualComplete"

    Source orchestrator whose write loop produced this rewrite.

    Identifies which pipeline operation (e.g., database schema generation, interface operation design, test scenario creation) the LLM was working on when it decided to rewrite its previous output. Cannot be "facade" or "preliminaryAcquire" as those are not content-producing orchestrators.

    thinking: string

    The LLM's chain-of-thought reasoning for why the previous write was insufficient and what the new write improves.

    Extracted from the thinking field of the LLM's function calling arguments. Documents the agent's self-review process: what it found lacking in the previous output and what design decisions changed in the replacement. Useful for debugging output quality and understanding the agent's iterative refinement process.

    type: "preliminaryRewrite"

    Unique identifier for the event type.

    A literal string that discriminates between different event types in the AutoBE system. This field enables TypeScript's discriminated union feature, allowing type-safe event handling through switch statements or conditional checks.

    Examples: "analyzeWrite", "databaseSchema", "interfaceOperation", "testScenario"