AutoBE
    Preparing search index...

    Interface AutoBeInterfaceSchemaRelationReviewEvent

    Event fired during the relation and structure review phase of OpenAPI schema generation process.

    This event represents the specialized relation validation activity of the Interface Schema Relation Review Agent, which focuses exclusively on DTO relations, foreign key transformations, and structural integrity. The agent ensures proper modeling of business domains while preventing circular references and enabling efficient code generation.

    The Interface Schema Relation Review Agent performs targeted validation including:

    • Relation classification (Composition vs Association vs Aggregation)
    • Foreign key to object reference transformation in response DTOs
    • Actor reversal violation detection and removal (e.g., User.articles[])
    • Inline object extraction to named types with $ref
    • IInvert pattern application for alternative perspectives
    • Structural integrity and naming convention enforcement

    Relation principles enforced:

    • Composition: Same transaction, parent owns children, CASCADE DELETE
    • Association: Independent entities providing context, survive parent deletion
    • Aggregation: Event-driven data, different actors, separate APIs
    • Actor Reversal Prohibition: Actors never contain entity arrays

    Key characteristics of the relation review:

    • Every object type must be named and referenced with $ref
    • Foreign keys transformed to objects for complete information
    • Proper lifecycle-based relation classification
    • Prevention of unbounded reverse relations

    The review ensures that all DTOs accurately model the business domain with proper relations that enable code generation while preventing performance problems and circular dependencies.

    Kakasoo

    interface AutoBeInterfaceSchemaRelationReviewEvent {
        completed: number;
        content: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>;
        created_at: string & Format<"date-time">;
        id: string;
        plan: string;
        review: string;
        schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>;
        step: number;
        tokenUsage: IAutoBeTokenUsageJson.IComponent;
        total: number;
        type: "interfaceSchemaRelationReview";
    }

    Hierarchy (View Summary)

    Index

    Properties

    completed: number

    Number of items completed.

    Tracks how many items have been successfully processed so far in the current operation. This value increments as each item is completed, providing real-time progress indication.

    The ratio of completed to total gives the completion percentage: progress = (completed / total) * 100

    content: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>

    Schemas modified for relation compliance.

    Contains ONLY the schemas that were actively modified to fix relation or structural issues, including both modified existing schemas and newly created schemas (extracted types, IInvert types).

    An empty object {} indicates all relations were already properly structured.

    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.

    plan: string

    Relation correction plan applied.

    Outlines the specific relation fixes implemented including:

    • Inline objects extracted to named types
    • Foreign keys transformed to object references
    • Actor reversal arrays removed
    • IInvert types created
    • Relation types corrected

    If relations were already correct, explicitly states that no fixes were required.

    review: string

    Relation violation findings from the review.

    Documents all relation and structural issues discovered, categorized by type:

    • CRITICAL: Inline object types, actor reversal violations
    • HIGH: Raw foreign keys, wrong relation types
    • MEDIUM: Missing IInvert types
    • LOW: Naming convention violations

    Each violation includes the affected schema, specific problem, and theoretical justification for the correction.

    schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>

    Original schemas submitted for relation review.

    Contains the OpenAPI schemas that need relation and structural validation, including all DTOs with foreign keys, nested objects, or relation definitions requiring verification.

    step: number

    Current iteration number of the schema generation being reviewed.

    Indicates which version of the schemas is undergoing relation review, helping track the iterative structural refinement process.

    Detailed token usage metrics for the current operation.

    Contains comprehensive token consumption data including total usage, input token breakdown with cache statistics, and output token categorization by generation type. This component-level tracking enables precise analysis of resource utilization for specific agent operations such as schema generation, test writing, or code implementation.

    The token usage data helps identify optimization opportunities, monitor operational costs, and ensure efficient use of AI resources throughout the automated backend development process.

    total: number

    Total number of items to process.

    Represents the complete count of operations, files, endpoints, or other entities that need to be processed in the current workflow step. This value is typically determined at the beginning of an operation and remains constant throughout the process.

    Used together with the completed field to calculate progress percentage and estimate time to completion.

    type: "interfaceSchemaRelationReview"

    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", "prismaSchema", "interfaceOperation", "testScenario"