xray-core
    Preparing search index...

    Class XRay

    Main X-Ray class - entry point for the library.

    const xray = new XRay({ storage: new InMemoryStorage() });

    const session = xray.session('my-pipeline')
    .meta({ input: 'some data' })
    .start();

    session.step('step1', 'transform')
    .input({ data: 'input' })
    .output({ data: 'output' })
    .reasoning('Transformed data because...')
    .complete();

    session.complete();
    Index

    Constructors

    Methods

    • Clears all stored sessions.

      Returns void

    • Deletes a session by its ID.

      Parameters

      • id: string

        The session ID to delete

      Returns void

    • Exports all sessions as a JSON string.

      Returns string

      JSON string representation of all sessions

    • Retrieves a session by its unique ID.

      Parameters

      • id: string

        The session ID to look up

      Returns XRaySession | null

      The session if found, null otherwise

    • Imports sessions from a JSON string.

      Parameters

      • data: string

        JSON string containing session data

      Returns void

    • Creates a new session builder for tracking a pipeline execution.

      Parameters

      • name: string

        Human-readable name for the session (e.g., 'competitor-selection')

      Returns SessionBuilder

      A SessionBuilder instance for fluent configuration