import { loadAllPresets } from 'storybook/internal/common';
export { getPreviewBodyTemplate, getPreviewHeadTemplate } from 'storybook/internal/common';
import * as storybook_internal_types from 'storybook/internal/types';
import { CLIOptions, LoadOptions, BuilderOptions, StorybookConfigRaw, ModuleResolveConfig, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn, IndexInputStats, NormalizedStoriesSpecifier, Path as Path$1, Indexer, DocsOptions, StoryIndexEntry, DocsIndexEntry, IndexEntry, StoryIndex, Options, StatusStoreByTypeId as StatusStoreByTypeId$1 } from 'storybook/internal/types';
export { ModuleResolveConfig } from 'storybook/internal/types';
import { EventType } from 'storybook/internal/telemetry';
import { CreateNewStoryRequestPayload } from 'storybook/internal/core-events';
import { StoryId, StrictArgTypes as StrictArgTypes$1, SBType as SBType$1 } from 'storybook/internal/csf';
import { Channel } from 'storybook/internal/channels';
import { ImportEdge } from 'storybook/internal/oxc-parser';
export { ImportEdge } from 'storybook/internal/oxc-parser';
import { watch } from 'node:fs';
import { readFile, stat } from 'node:fs/promises';

type BuildStaticStandaloneOptions = CLIOptions & LoadOptions & BuilderOptions & {
    outputDir: string;
};
declare function buildStaticStandalone(options: BuildStaticStandaloneOptions): Promise<void>;

/**
 * Resolves the initialPath for the browser open URL.
 * CLI-provided initialPath always wins. If not set and not running in an agent context,
 * checks the project cache for an `onboarding-pending` entry written by `storybook init`.
 * If found, returns '/onboarding' and removes the cache entry so it only triggers once.
 * The cache entry is only written by init when onboarding is known to be supported,
 * so no further addon check is needed here.
 */
declare function resolveOnboardingInitialPath(cliInitialPath: string | undefined): Promise<string | undefined>;
declare function buildDevStandalone(options: CLIOptions & LoadOptions & BuilderOptions & {
    storybookVersion?: string;
    previewConfigPath?: string;
}): Promise<{
    port: number;
    address: string;
    networkAddress: string;
}>;

type BuildIndexOptions = CLIOptions & LoadOptions & BuilderOptions;
declare const buildIndex: (options: BuildIndexOptions) => Promise<storybook_internal_types.StoryIndex>;
declare const buildIndexStandalone: (options: BuildIndexOptions & {
    outputFile: string;
}) => Promise<void>;

declare abstract class StorybookError extends Error {
    private _name;
    /** Category of the error. Used to classify the type of error, e.g., 'PREVIEW_API'. */
    readonly category: string;
    /** Code representing the error. Used to uniquely identify the error, e.g., 1. */
    readonly code: number;
    /**
     * Data associated with the error. Used to provide additional information in the error message or
     * to be passed to telemetry.
     */
    readonly data: {};
    /**
     * Specifies the documentation for the error.
     *
     * - If `true`, links to a documentation page on the Storybook website (make sure it exists before
     *   enabling) – This is not implemented yet.
     * - If a string, uses the provided URL for documentation (external or FAQ links).
     * - If `false` (default), no documentation link is added.
     */
    readonly documentation: boolean | string | string[];
    /** Flag used to easily determine if the error originates from Storybook. */
    readonly fromStorybook: true;
    /**
     * Flag used to determine if the error is handled by us and should therefore not be shown to the
     * user.
     */
    isHandledError: boolean;
    get fullErrorCode(): `SB_${string}_${string}`;
    /** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
    get name(): string;
    set name(name: string);
    /**
     * A collection of sub errors which relate to a parent error.
     *
     * Sub-errors are used to represent multiple related errors that occurred together. When a
     * StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
     * are sent as separate telemetry events. This allows for better error tracking and debugging.
     *
     * @example
     *
     * ```ts
     * const error1 = new SomeError();
     * const error2 = new AnotherError();
     * const parentError = new ParentError({
     *   // ... other props
     *   subErrors: [error1, error2],
     * });
     * ```
     */
    subErrors: StorybookError[];
    constructor(props: {
        category: string;
        code: number;
        message: string;
        cause?: unknown;
        documentation?: boolean | string | string[];
        isHandledError?: boolean;
        name: string;
        /**
         * Optional array of sub-errors that are related to this error. When this error is sent to
         * telemetry, each sub-error will be sent as a separate event.
         */
        subErrors?: StorybookError[];
    });
    /** Generates the error message along with additional documentation link (if applicable). */
    static getFullMessage({ documentation, code, category, message, }: ConstructorParameters<typeof StorybookError>[0]): string;
}

type TelemetryOptions = {
    cliOptions: CLIOptions;
    presetOptions?: Parameters<typeof loadAllPresets>[0];
    printError?: (err: any) => void;
    skipPrompt?: boolean;
    eventType?: EventType;
    fallbackTelemetryState?: boolean;
};
type ErrorLevel = 'none' | 'error' | 'full';
declare function getErrorLevel({ cliOptions, presetOptions, skipPrompt, eventType, }: TelemetryOptions): Promise<ErrorLevel>;
declare function sendTelemetryError(_error: unknown, eventType: EventType, options: TelemetryOptions, blocking?: boolean, parent?: StorybookError): Promise<void>;
declare function withTelemetry<T>(eventType: EventType, options: TelemetryOptions, run: () => Promise<T>): Promise<T | undefined>;

declare function build(options?: any, frameworkOptions?: any): Promise<void | {
    port: number;
    address: string;
    networkAddress: string;
}>;

declare const mapStaticDir: (staticDir: NonNullable<StorybookConfigRaw["staticDirs"]>[number], configDir: string) => {
    staticDir: string;
    staticPath: string;
    targetDir: string;
    targetEndpoint: string;
};

/**
 * A function that json from a file
 */
interface ReadJsonSync {
    (packageJsonPath: string): any | undefined;
}

/**
 * Function that can match a path
 */
interface MatchPath {
    (requestedModule: string, readJson?: ReadJsonSync, fileExists?: (name: string) => boolean, extensions?: ReadonlyArray<string>): string | undefined;
}

/**
 * Actions represent the type of change to a location value.
 */
declare enum Action {
    /**
     * A POP indicates a change to an arbitrary index in the history stack, such
     * as a back or forward navigation. It does not describe the direction of the
     * navigation, only that the current index changed.
     *
     * Note: This is the default action for newly created history objects.
     */
    Pop = "POP",
    /**
     * A PUSH indicates a new entry being added to the history stack, such as when
     * a link is clicked and a new page loads. When this happens, all subsequent
     * entries in the stack are lost.
     */
    Push = "PUSH",
    /**
     * A REPLACE indicates the entry at the current index in the history stack
     * being replaced by a new one.
     */
    Replace = "REPLACE"
}
/**
 * The pathname, search, and hash values of a URL.
 */
interface Path {
    /**
     * A URL pathname, beginning with a /.
     */
    pathname: string;
    /**
     * A URL search string, beginning with a ?.
     */
    search: string;
    /**
     * A URL fragment identifier, beginning with a #.
     */
    hash: string;
}
/**
 * An entry in a history stack. A location contains information about the
 * URL path, as well as possibly some arbitrary state and a key.
 */
interface Location extends Path {
    /**
     * A value of arbitrary data associated with this location.
     */
    state: any;
    /**
     * A unique string associated with this location. May be used to safely store
     * and retrieve data in some other storage API, like `localStorage`.
     *
     * Note: This value is always "default" on the initial location.
     */
    key: string;
}

/**
 * Map of routeId -> data returned from a loader/action/error
 */
interface RouteData {
    [routeId: string]: any;
}
declare enum ResultType {
    data = "data",
    deferred = "deferred",
    redirect = "redirect",
    error = "error"
}
/**
 * Successful result from a loader or action
 */
interface SuccessResult {
    type: ResultType.data;
    data: any;
    statusCode?: number;
    headers?: Headers;
}
/**
 * Successful defer() result from a loader or action
 */
interface DeferredResult {
    type: ResultType.deferred;
    deferredData: DeferredData;
    statusCode?: number;
    headers?: Headers;
}
/**
 * Redirect result from a loader or action
 */
interface RedirectResult {
    type: ResultType.redirect;
    status: number;
    location: string;
    revalidate: boolean;
    reloadDocument?: boolean;
}
/**
 * Unsuccessful result from a loader or action
 */
interface ErrorResult {
    type: ResultType.error;
    error: any;
    headers?: Headers;
}
/**
 * Result from a loader or action - potentially successful or unsuccessful
 */
type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult;
type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
/**
 * Active navigation/fetcher form methods are exposed in lowercase on the
 * RouterState
 */
type FormMethod = LowerCaseFormMethod;
/**
 * In v7, active navigation/fetcher form methods are exposed in uppercase on the
 * RouterState.  This is to align with the normalization done via fetch().
 */
type V7_FormMethod = UpperCaseFormMethod;
type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain";
type JsonObject = {
    [Key in string]: JsonValue;
} & {
    [Key in string]?: JsonValue | undefined;
};
type JsonArray = JsonValue[] | readonly JsonValue[];
type JsonPrimitive = string | number | boolean | null;
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
/**
 * @private
 * Internal interface to pass around for action submissions, not intended for
 * external consumption
 */
type Submission = {
    formMethod: FormMethod | V7_FormMethod;
    formAction: string;
    formEncType: FormEncType;
    formData: FormData;
    json: undefined;
    text: undefined;
} | {
    formMethod: FormMethod | V7_FormMethod;
    formAction: string;
    formEncType: FormEncType;
    formData: undefined;
    json: JsonValue;
    text: undefined;
} | {
    formMethod: FormMethod | V7_FormMethod;
    formAction: string;
    formEncType: FormEncType;
    formData: undefined;
    json: undefined;
    text: string;
};
/**
 * @private
 * Arguments passed to route loader/action functions.  Same for now but we keep
 * this as a private implementation detail in case they diverge in the future.
 */
interface DataFunctionArgs {
    request: Request;
    params: Params;
    context?: any;
}
/**
 * Arguments passed to loader functions
 */
interface LoaderFunctionArgs extends DataFunctionArgs {
}
/**
 * Arguments passed to action functions
 */
interface ActionFunctionArgs extends DataFunctionArgs {
}
/**
 * Loaders and actions can return anything except `undefined` (`null` is a
 * valid return value if there is no data to return).  Responses are preferred
 * and will ease any future migration to Remix
 */
type DataFunctionValue = Response | NonNullable<unknown> | null;
/**
 * Route loader function signature
 */
interface LoaderFunction {
    (args: LoaderFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
}
/**
 * Route action function signature
 */
interface ActionFunction {
    (args: ActionFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
}
/**
 * Route shouldRevalidate function signature.  This runs after any submission
 * (navigation or fetcher), so we flatten the navigation/fetcher submission
 * onto the arguments.  It shouldn't matter whether it came from a navigation
 * or a fetcher, what really matters is the URLs and the formData since loaders
 * have to re-run based on the data models that were potentially mutated.
 */
interface ShouldRevalidateFunction {
    (args: {
        currentUrl: URL;
        currentParams: AgnosticDataRouteMatch["params"];
        nextUrl: URL;
        nextParams: AgnosticDataRouteMatch["params"];
        formMethod?: Submission["formMethod"];
        formAction?: Submission["formAction"];
        formEncType?: Submission["formEncType"];
        text?: Submission["text"];
        formData?: Submission["formData"];
        json?: Submission["json"];
        actionResult?: DataResult;
        defaultShouldRevalidate: boolean;
    }): boolean;
}
/**
 * Keys we cannot change from within a lazy() function. We spread all other keys
 * onto the route. Either they're meaningful to the router, or they'll get
 * ignored.
 */
type ImmutableRouteKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children";
type RequireOne<T, Key = keyof T> = Exclude<{
    [K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
}[keyof T], undefined>;
/**
 * lazy() function to load a route definition, which can add non-matching
 * related properties to a route
 */
interface LazyRouteFunction<R extends AgnosticRouteObject> {
    (): Promise<RequireOne<Omit<R, ImmutableRouteKey>>>;
}
/**
 * Base RouteObject with common props shared by all types of routes
 */
type AgnosticBaseRouteObject = {
    caseSensitive?: boolean;
    path?: string;
    id?: string;
    loader?: LoaderFunction;
    action?: ActionFunction;
    hasErrorBoundary?: boolean;
    shouldRevalidate?: ShouldRevalidateFunction;
    handle?: any;
    lazy?: LazyRouteFunction<AgnosticBaseRouteObject>;
};
/**
 * Index routes must not have children
 */
type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {
    children?: undefined;
    index: true;
};
/**
 * Non-index routes may have children, but cannot have index
 */
type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {
    children?: AgnosticRouteObject[];
    index?: false;
};
/**
 * A route object represents a logical route, with (optionally) its child
 * routes organized in a tree-like structure.
 */
type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
    id: string;
};
type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
    children?: AgnosticDataRouteObject[];
    id: string;
};
/**
 * A data route object, which is just a RouteObject with a required unique ID
 */
type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
/**
 * The parameters that were parsed from the URL path.
 */
type Params<Key extends string = string> = {
    readonly [key in Key]: string | undefined;
};
/**
 * A RouteMatch contains info about how a route matched a URL.
 */
interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
    /**
     * The names and values of dynamic parameters in the URL.
     */
    params: Params<ParamKey>;
    /**
     * The portion of the URL pathname that was matched.
     */
    pathname: string;
    /**
     * The portion of the URL pathname that was matched before child routes.
     */
    pathnameBase: string;
    /**
     * The route object that was used to match.
     */
    route: RouteObjectType;
}
interface AgnosticDataRouteMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
}
declare class DeferredData {
    private pendingKeysSet;
    private controller;
    private abortPromise;
    private unlistenAbortSignal;
    private subscribers;
    data: Record<string, unknown>;
    init?: ResponseInit;
    deferredKeys: string[];
    constructor(data: Record<string, unknown>, responseInit?: ResponseInit);
    private trackPromise;
    private onSettle;
    private emit;
    subscribe(fn: (aborted: boolean, settledKey?: string) => void): () => boolean;
    cancel(): void;
    resolveData(signal: AbortSignal): Promise<boolean>;
    get done(): boolean;
    get unwrappedData(): {};
    get pendingKeys(): string[];
}

/**
 * State maintained internally by the router.  During a navigation, all states
 * reflect the the "old" location unless otherwise noted.
 */
interface RouterState {
    /**
     * The action of the most recent navigation
     */
    historyAction: Action;
    /**
     * The current location reflected by the router
     */
    location: Location;
    /**
     * The current set of route matches
     */
    matches: AgnosticDataRouteMatch[];
    /**
     * Tracks whether we've completed our initial data load
     */
    initialized: boolean;
    /**
     * Current scroll position we should start at for a new view
     *  - number -> scroll position to restore to
     *  - false -> do not restore scroll at all (used during submissions)
     *  - null -> don't have a saved position, scroll to hash or top of page
     */
    restoreScrollPosition: number | false | null;
    /**
     * Indicate whether this navigation should skip resetting the scroll position
     * if we are unable to restore the scroll position
     */
    preventScrollReset: boolean;
    /**
     * Tracks the state of the current navigation
     */
    navigation: Navigation;
    /**
     * Tracks any in-progress revalidations
     */
    revalidation: RevalidationState;
    /**
     * Data from the loaders for the current matches
     */
    loaderData: RouteData;
    /**
     * Data from the action for the current matches
     */
    actionData: RouteData | null;
    /**
     * Errors caught from loaders for the current matches
     */
    errors: RouteData | null;
    /**
     * Map of current fetchers
     */
    fetchers: Map<string, Fetcher>;
    /**
     * Map of current blockers
     */
    blockers: Map<string, Blocker>;
}
/**
 * Data that can be passed into hydrate a Router from SSR
 */
type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
/**
 * Potential states for state.navigation
 */
type NavigationStates = {
    Idle: {
        state: "idle";
        location: undefined;
        formMethod: undefined;
        formAction: undefined;
        formEncType: undefined;
        formData: undefined;
        json: undefined;
        text: undefined;
    };
    Loading: {
        state: "loading";
        location: Location;
        formMethod: Submission["formMethod"] | undefined;
        formAction: Submission["formAction"] | undefined;
        formEncType: Submission["formEncType"] | undefined;
        formData: Submission["formData"] | undefined;
        json: Submission["json"] | undefined;
        text: Submission["text"] | undefined;
    };
    Submitting: {
        state: "submitting";
        location: Location;
        formMethod: Submission["formMethod"];
        formAction: Submission["formAction"];
        formEncType: Submission["formEncType"];
        formData: Submission["formData"];
        json: Submission["json"];
        text: Submission["text"];
    };
};
type Navigation = NavigationStates[keyof NavigationStates];
type RevalidationState = "idle" | "loading";
/**
 * Potential states for fetchers
 */
type FetcherStates<TData = any> = {
    Idle: {
        state: "idle";
        formMethod: undefined;
        formAction: undefined;
        formEncType: undefined;
        text: undefined;
        formData: undefined;
        json: undefined;
        data: TData | undefined;
        " _hasFetcherDoneAnything "?: boolean;
    };
    Loading: {
        state: "loading";
        formMethod: Submission["formMethod"] | undefined;
        formAction: Submission["formAction"] | undefined;
        formEncType: Submission["formEncType"] | undefined;
        text: Submission["text"] | undefined;
        formData: Submission["formData"] | undefined;
        json: Submission["json"] | undefined;
        data: TData | undefined;
        " _hasFetcherDoneAnything "?: boolean;
    };
    Submitting: {
        state: "submitting";
        formMethod: Submission["formMethod"];
        formAction: Submission["formAction"];
        formEncType: Submission["formEncType"];
        text: Submission["text"];
        formData: Submission["formData"];
        json: Submission["json"];
        data: TData | undefined;
        " _hasFetcherDoneAnything "?: boolean;
    };
};
type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
interface BlockerBlocked {
    state: "blocked";
    reset(): void;
    proceed(): void;
    location: Location;
}
interface BlockerUnblocked {
    state: "unblocked";
    reset: undefined;
    proceed: undefined;
    location: undefined;
}
interface BlockerProceeding {
    state: "proceeding";
    reset: undefined;
    proceed: undefined;
    location: Location;
}
type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;

/**
 * NOTE: If you refactor this to split up the modules into separate files,
 * you'll need to update the rollup config for react-router-dom-v5-compat.
 */

declare global {
    var __staticRouterHydrationData: HydrationState | undefined;
}

type EnvironmentType = (typeof UniversalStore.Environment)[keyof typeof UniversalStore.Environment];
type StatusType = (typeof UniversalStore.Status)[keyof typeof UniversalStore.Status];
type StateUpdater<TState> = (prevState: TState) => TState;
type Actor = {
    id: string;
    type: (typeof UniversalStore.ActorType)[keyof typeof UniversalStore.ActorType];
    environment: EnvironmentType;
};
type EventInfo = {
    actor: Actor;
    forwardingActor?: Actor;
};
type Listener<TEvent> = (event: TEvent, eventInfo: EventInfo) => void;
type BaseEvent = {
    type: string;
    payload?: any;
};
interface SetStateEvent<TState> extends BaseEvent {
    type: typeof UniversalStore.InternalEventType.SET_STATE;
    payload: {
        state: TState;
        previousState: TState;
    };
}
interface ExistingStateRequestEvent extends BaseEvent {
    type: typeof UniversalStore.InternalEventType.EXISTING_STATE_REQUEST;
    payload: never;
}
interface ExistingStateResponseEvent<TState> extends BaseEvent {
    type: typeof UniversalStore.InternalEventType.EXISTING_STATE_RESPONSE;
    payload: TState;
}
interface LeaderCreatedEvent extends BaseEvent {
    type: typeof UniversalStore.InternalEventType.LEADER_CREATED;
    payload: never;
}
interface FollowerCreatedEvent extends BaseEvent {
    type: typeof UniversalStore.InternalEventType.FOLLOWER_CREATED;
    payload: never;
}
type InternalEvent<TState> = SetStateEvent<TState> | ExistingStateRequestEvent | ExistingStateResponseEvent<TState> | FollowerCreatedEvent | LeaderCreatedEvent;
type Event<TState, TEvent extends BaseEvent> = TEvent | InternalEvent<TState>;
type ChannelLike = Pick<Channel, 'on' | 'off' | 'emit'>;
type StoreOptions<TState> = {
    id: string;
    leader?: boolean;
    initialState?: TState;
    debug?: boolean;
};
type EnvironmentOverrides = {
    channel: ChannelLike;
    environment: EnvironmentType;
};

/**
 * A universal store implementation that synchronizes state across different environments using a
 * channel-based communication.
 *
 * The store follows a leader-follower pattern where:
 *
 * - Leader: The main store instance that owns and manages the state
 * - Follower: Store instances that mirror the leader's state
 *
 * Features:
 *
 * - State synchronization across environments
 * - Event-based communication
 * - Type-safe state and custom events
 * - Subscription system for state changes and custom events
 *
 * @remarks
 * - The store must be created using the static `create()` method, not the constructor
 * - Follower stores will automatically sync with their leader's state. If they have initial state, it
 *   will be replaced immediately when it has synced with the leader.
 *
 * @example
 *
 * ```typescript
 * interface MyState {
 *   count: number;
 * }
 * interface MyCustomEvent {
 *   type: 'INCREMENT';
 *   payload: number;
 * }
 *
 * // Create a leader store
 * const leaderStore = UniversalStore.create<MyState, MyCustomEvent>({
 *   id: 'my-store',
 *   leader: true,
 *   initialState: { count: 0 },
 * });
 *
 * // Create a follower store
 * const followerStore = UniversalStore.create<MyState, MyCustomEvent>({
 *   id: 'my-store',
 *   leader: false,
 * });
 * ```
 *
 * @template State - The type of state managed by the store
 * @template CustomEvent - Custom events that can be sent through the store. Must have a `type`
 *   string and optional `payload`
 * @throws {Error} If constructed directly instead of using `create()`
 * @throws {Error} If created without setting a channel first
 * @throws {Error} If a follower is created with initial state
 * @throws {Error} If a follower cannot find its leader within 1 second
 */
declare class UniversalStore<State, CustomEvent extends {
    type: string;
    payload?: any;
} = {
    type: string;
    payload?: any;
}> {
    /**
     * Defines the possible actor types in the store system
     *
     * @readonly
     */
    static readonly ActorType: {
        readonly LEADER: "LEADER";
        readonly FOLLOWER: "FOLLOWER";
    };
    /**
     * Defines the possible environments the store can run in
     *
     * @readonly
     */
    static readonly Environment: {
        readonly SERVER: "SERVER";
        readonly MANAGER: "MANAGER";
        readonly PREVIEW: "PREVIEW";
        readonly UNKNOWN: "UNKNOWN";
        readonly MOCK: "MOCK";
    };
    /**
     * Internal event types used for store synchronization
     *
     * @readonly
     */
    static readonly InternalEventType: {
        readonly EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST";
        readonly EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE";
        readonly SET_STATE: "__SET_STATE";
        readonly LEADER_CREATED: "__LEADER_CREATED";
        readonly FOLLOWER_CREATED: "__FOLLOWER_CREATED";
    };
    static readonly Status: {
        readonly UNPREPARED: "UNPREPARED";
        readonly SYNCING: "SYNCING";
        readonly READY: "READY";
        readonly ERROR: "ERROR";
    };
    protected static isInternalConstructing: boolean;
    /**
     * The preparation construct is used to keep track of all store's preparation state the promise is
     * resolved when the store is prepared with the static __prepare() method which will also change
     * the state from PENDING to RESOLVED
     */
    private static preparation;
    private static setupPreparationPromise;
    /** Enable debug logs for this store */
    debugging: boolean;
    /** The actor object representing the store instance with a unique ID and a type */
    get actor(): Actor;
    /**
     * The current state of the store, that signals both if the store is prepared by Storybook and
     * also - in the case of a follower - if the state has been synced with the leader's state.
     */
    get status(): StatusType;
    /**
     * A promise that resolves when the store is fully ready. A leader will be ready when the store
     * has been prepared by Storybook, which is almost instantly.
     *
     * A follower will be ready when the state has been synced with the leader's state, within a few
     * hundred milliseconds.
     */
    untilReady(): Promise<[void | {
        channel: ChannelLike;
        environment: EnvironmentType;
    }, void | undefined]>;
    /**
     * The syncing construct is used to keep track of if the instance's state has been synced with the
     * other instances. A leader will immediately have the promise resolved. A follower will initially
     * be in a PENDING state, and resolve when the leader has sent the existing state, or reject if no
     * leader has responded before the timeout.
     */
    private syncing?;
    private channelEventName;
    private state;
    private channel?;
    private environment?;
    private listeners;
    private id;
    private actorId;
    private actorType;
    protected constructor(options: StoreOptions<State>, environmentOverrides?: EnvironmentOverrides);
    /** Creates a new instance of UniversalStore */
    static create<State = any, CustomEvent extends {
        type: string;
        payload?: any;
    } = {
        type: string;
        payload?: any;
    }>(options: StoreOptions<State>): UniversalStore<State, CustomEvent>;
    /** Gets the current state */
    getState: () => State;
    /**
     * Updates the store's state
     *
     * Either a new state or a state updater function can be passed to the method.
     */
    setState(updater: State | StateUpdater<State>): void;
    /**
     * Subscribes to store events
     *
     * @returns A function to unsubscribe
     */
    subscribe: {
        (listener: Listener<Event<State, CustomEvent>>): () => void;
        <EventType extends Event<State, CustomEvent>['type']>(eventType: EventType, listener: Listener<Extract<Event<State, CustomEvent>, {
            type: EventType;
        }>>): () => void;
    };
    /**
     * Subscribes to state changes
     *
     * @returns Unsubscribe function
     */
    onStateChange(listener: (state: State, previousState: State, eventInfo: EventInfo) => void): () => void;
    /** Sends a custom event to the other stores */
    send: (event: CustomEvent) => void;
    private emitToChannel;
    private prepareThis;
    private emitToListeners;
    private handleChannelEvents;
    private debug;
}

/**
 * A mock universal store that can be used when testing code that relies on a universal store. It
 * functions exactly like a normal universal store, with a few exceptions:
 *
 * - It is fully isolated, meaning that it doesn't interact with any channel, and it is always a
 *   leader.
 *
 * If the second testUtils argument is provided, all the public methods are spied on, so they can be
 * asserted.
 *
 * When a mock store is re-used across tests (eg. in stories), you manually need to reset the state
 * after each test.
 *
 * @example
 *
 * ```ts
 * import * as testUtils from 'storybook/test'; // in stories
 * import { vi as testUtils } from 'vitest'; // ... or in Vitest tests
 *
 * const initialState = { ... };
 * const store = new MockUniversalStore({ initialState }, testUtils);
 *
 * export default {
 *   title: 'My story',
 *   beforeEach: () => {
 *     return () => {
 *       store.setState(initialState);
 *     };
 *   }
 * }
 * ```
 */
declare class MockUniversalStore<State, CustomEvent extends {
    type: string;
    payload?: any;
} = {
    type: string;
    payload?: any;
}> extends UniversalStore<State, CustomEvent> {
    private testUtils;
    constructor(options: StoreOptions<State>, testUtils?: any);
    /** Create a mock universal store. This is just an alias for the constructor */
    static create<State = any, CustomEvent extends {
        type: string;
        payload?: any;
    } = {
        type: string;
        payload?: any;
    }>(options: StoreOptions<State>, testUtils?: any): MockUniversalStore<State, CustomEvent>;
    unsubscribeAll(): void;
}

type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:new' | 'status-value:modified' | 'status-value:affected' | 'status-value:reviewing' | 'status-value:warning' | 'status-value:error' | 'status-value:unknown';
type StatusTypeId = string;
type StatusByTypeId = Record<StatusTypeId, Status>;
type StatusesByStoryIdAndTypeId = Record<StoryId, StatusByTypeId>;
interface Status {
    value: StatusValue;
    typeId: StatusTypeId;
    storyId: StoryId;
    title: string;
    description: string;
    data?: any;
    sidebarContextMenu?: boolean;
}
declare const StatusStoreEventType: {
    readonly SELECT: "select";
};
type StatusStoreEvent = {
    type: typeof StatusStoreEventType.SELECT;
    payload: Status[];
};
type StatusStore = {
    getAll: () => StatusesByStoryIdAndTypeId;
    set: (statuses: Status[]) => void;
    onAllStatusChange: (listener: (statuses: StatusesByStoryIdAndTypeId, previousStatuses: StatusesByStoryIdAndTypeId) => void) => () => void;
    onSelect: (listener: (selectedStatuses: Status[]) => void) => () => void;
    unset: (storyIds?: StoryId[]) => void;
};
type StatusStoreByTypeId = StatusStore & {
    typeId: StatusTypeId;
};

type TestProviderState = 'test-provider-state:pending' | 'test-provider-state:running' | 'test-provider-state:succeeded' | 'test-provider-state:crashed';
type TestProviderId = string;
type TestProviderStateByProviderId = Record<TestProviderId, TestProviderState>;
type TestProviderStoreEventType = 'run-all' | 'clear-all' | 'settings-changed';
type TestProviderStoreEvent = BaseEvent & {
    type: TestProviderStoreEventType;
};
type BaseTestProviderStore = {
    /**
     * Notifies all listeners that settings have changed for test providers. The Storybook UI will
     * highlight the test providers to tell the user that settings has changed.
     */
    settingsChanged: () => void;
    /**
     * Subscribe to clicks on the "Run All" button, that is supposed to trigger all test providers to
     * run. Your test provider should do the "main thing" when this happens, similar to when the user
     * triggers your test provider specifically.
     *
     * @example
     *
     * ```typescript
     * // Subscribe to run-all events
     * const unsubscribe = myTestProviderStore.onRunAll(() => {
     *   await runAllMyTests();
     * });
     * ```
     */
    onRunAll: (listener: () => void) => () => void;
    /**
     * Subscribe to clicks on the "Clear All" button, that is supposed to clear all state from test
     * providers. Storybook already clears all statuses, but if your test provider has more
     * non-status-based state, you can use this to clear that here.
     *
     * @remarks
     * The purpose of this is _not_ to clear your test provider's settings, only the test results.
     * @example
     *
     * ```typescript
     * // Subscribe to clear-all events
     * const unsubscribe = myTestProviderStore.onClearAll(() => {
     *   clearMyTestResults();
     * });
     *
     * // Later, when no longer needed
     * unsubscribe();
     * ```
     */
    onClearAll: (listener: () => void) => () => void;
};
/**
 * Represents a store for a specific test provider, identified by its unique ID. This store provides
 * methods to manage the state of an individual test provider, including getting and setting its
 * state, running operations with automatic state management, and accessing its unique identifier.
 *
 * Each test provider has its own instance of this store, allowing for independent state management
 * across different test providers in the application.
 *
 * @example
 *
 * ```typescript
 * // Get a store for a specific test provider
 * const grammarStore = getTestProviderStoreById('addon-grammar');
 *
 * // Check the current state
 * if (grammarStore.getState() === 'test-provider-state:pending') {
 *   console.log('Grammar tests are ready to run');
 * }
 *
 * // Run tests with automatic state management
 * grammarStore.runWithState(async () => {
 *   await runGrammarTests();
 * });
 * ```
 *
 * @see {@link TestProviderState} for possible state values
 * @see {@link BaseTestProviderStore} for methods inherited from the base store
 */
type TestProviderStoreById = BaseTestProviderStore & {
    /**
     * Gets the current state of this specific test provider
     *
     * The state represents the current execution status of the test provider, which can be one of the
     * following:
     *
     * - 'test-provider-state:pending': Tests have not been run yet
     * - 'test-provider-state:running': Tests are currently running
     * - 'test-provider-state:succeeded': Tests completed successfully
     * - 'test-provider-state:crashed': Running tests failed or encountered an error
     *
     * Storybook UI will use this state to determine what to show in the UI.
     *
     * @remarks
     * The 'test-provider-state:crashed' is meant to signify that the test run as a whole failed to
     * execute for some reason. It should _not_ be set just because a number of tests failed, use
     * statuses and the status store for that. See {@link TestStatusStore} for managing individual test
     * statuses.
     * @example
     *
     * ```typescript
     * // Get the current state of a specific test provider
     * const state = testProviderStore.getState();
     *
     * // Conditionally render UI based on the state
     * const TestStatus = () => {
     *   const state = testProviderStore.getState();
     *
     *   if (state === 'test-provider-state:running') {
     *     return <Spinner />;
     *   } else if (state === 'test-provider-state:succeeded') {
     *     return <SuccessIcon />;
     *   } else if (state === 'test-provider-state:crashed') {
     *     return <ErrorIcon />;
     *   }
     *
     *   return <PendingIcon />;
     * };
     * ```
     */
    getState: () => TestProviderState;
    /**
     * Sets the state of this specific test provider
     *
     * This method allows you to manually update the execution state of the test provider. It's
     * typically used when you need to reflect the current status of test execution in the UI or when
     * you want to programmatically control the test provider's state.
     *
     * Common use cases include:
     *
     * - Setting to 'running' when tests start
     * - Setting to 'succeeded' when tests complete successfully
     * - Setting to 'crashed' when tests fail or encounter errors
     * - Setting to 'pending' to reset the state
     *
     * The state represents the current execution status of the test provider, which can be one of the
     * following:
     *
     * - 'test-provider-state:pending': Tests have not been run yet
     * - 'test-provider-state:running': Tests are currently running
     * - 'test-provider-state:succeeded': Tests completed successfully
     * - 'test-provider-state:crashed': Running tests failed or encountered an error
     *
     * Storybook UI will use this state to determine what to show in the UI.
     *
     * @remarks
     * The 'test-provider-state:crashed' is meant to signify that the test run as a whole failed to
     * execute for some reason. It should _not_ be set just because a number of tests failed, use
     * statuses and the status store for that. See {@link TestStatusStore} for managing individual test
     * statuses.
     *
     * For most use cases, consider using {@link runWithState} instead, which provides automatic state
     * management and error handling during test execution.
     * @example
     *
     * ```typescript
     * // Update the state when tests start running
     * const startTests = async () => {
     *   testProviderStore.setState('test-provider-state:running');
     *   ... run tests ...
     * };
     * ```
     */
    setState: (state: TestProviderState) => void;
    /**
     * Runs a callback and automatically updates the test provider's state with running, succeeded or
     * crashed, depending on the end result.
     *
     * - Immediately changes the state to 'running'
     * - If the callback returns/resolves, change the state to 'succeeded'.
     * - If the callback throws an error/rejects, change the state to 'crashed'.
     *
     * This approach helps prevent state inconsistencies that might occur if exceptions are thrown
     * during test execution.
     *
     * @example
     *
     * ```typescript
     * // Run tests with automatic state management
     * const runTests = () => {
     *   testProviderStore.runWithState(async () => {
     *     // The state is automatically set to 'running' before this callback
     *
     *     // Run tests here...
     *     const results = await executeTests();
     *   });
     * };
     * ```
     */
    runWithState: (callback: () => void | Promise<void>) => Promise<void>;
    /** The unique identifier for this test provider */
    testProviderId: TestProviderId;
};

/** Arguments handed to an {@link ImportParser} when the registry dispatches a file to it. */
interface ParseFileArgs {
    filePath: string;
    source: string;
}
/**
 * Services passed to every parser. SFC parsers (vue, svelte) extract a `<script>` block
 * and then delegate the actual import-edge extraction to the built-in oxc wrapper via
 * {@link ImportParserContext.parseScriptWithOxc}.
 */
interface ImportParserContext {
    /** Core's oxc-parser wrapper. SFC plugins call this after extracting <script> content. */
    parseScriptWithOxc(source: string, virtualFilePath: string): Promise<ImportEdge[]>;
}
/**
 * A parser plugin that claims one or more file extensions and knows how to extract import
 * edges from that file type. May be registered with a {@link ParserRegistry} directly or
 * surfaced through the `experimental_importParsers` preset key.
 *
 * Extensions are compared with `path.extname(filePath).toLowerCase()` lookup — compound
 * extensions such as `.svelte.ts` are NOT supported here (only the last segment matches).
 */
interface ImportParser {
    /**
     * Lowercase, leading dot. Compound extensions like `.svelte.ts` are NOT supported here —
     * `path.extname` returns the last segment only, so `.svelte.ts` matches `.ts`.
     */
    extensions: readonly string[];
    parse(args: ParseFileArgs, ctx: ImportParserContext): Promise<ImportEdge[]>;
}

/** JSON-serializable reverse index shape stored in open-service state. */
type StoriesByFileRecord = Record<string, Record<string, number>>;
type ErrorLike = {
    message: string;
    name?: string;
    stack?: string;
    cause?: ErrorLike;
};
type ModuleGraphStatus = {
    value: 'booting';
} | {
    value: 'ready';
} | {
    value: 'error';
    error: ErrorLike;
} | {
    value: 'unavailable';
    reason: string;
    error?: ErrorLike;
};
type ModuleGraphServiceState = {
    /** Project root used to normalize absolute file paths in query inputs. */
    workingDir: string;
    status: ModuleGraphStatus;
    graphRevision: number;
    storiesByFile: StoriesByFileRecord;
    /**
     * Per-story revision stamps keyed by story-index-style relative path. Each entry holds the
     * {@link graphRevision} at which that story's subgraph last changed. Seeded to `0` for every
     * story at snapshot time so scoped `graphRevision` reads observe existing keys.
     */
    storyChangeRevisions: Record<string, number>;
    latestChangedStoryFiles: string[];
};

/** The Standard Typed interface. This is a base type extended by other specs. */
interface StandardTypedV1<Input = unknown, Output = Input> {
    /** The Standard properties. */
    readonly "~standard": StandardTypedV1.Props<Input, Output>;
}
declare namespace StandardTypedV1 {
    /** The Standard Typed properties interface. */
    interface Props<Input = unknown, Output = Input> {
        /** The version number of the standard. */
        readonly version: 1;
        /** The vendor name of the schema library. */
        readonly vendor: string;
        /** Inferred types associated with the schema. */
        readonly types?: Types<Input, Output> | undefined;
    }
    /** The Standard Typed types interface. */
    interface Types<Input = unknown, Output = Input> {
        /** The input type of the schema. */
        readonly input: Input;
        /** The output type of the schema. */
        readonly output: Output;
    }
    /** Infers the input type of a Standard Typed. */
    type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
    /** Infers the output type of a Standard Typed. */
    type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
}
/** The Standard Schema interface. */
interface StandardSchemaV1<Input = unknown, Output = Input> {
    /** The Standard Schema properties. */
    readonly "~standard": StandardSchemaV1.Props<Input, Output>;
}
declare namespace StandardSchemaV1 {
    /** The Standard Schema properties interface. */
    interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
        /** Validates unknown input values. */
        readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
    }
    /** The result interface of the validate function. */
    type Result<Output> = SuccessResult<Output> | FailureResult;
    /** The result interface if validation succeeds. */
    interface SuccessResult<Output> {
        /** The typed output value. */
        readonly value: Output;
        /** A falsy value for `issues` indicates success. */
        readonly issues?: undefined;
    }
    interface Options {
        /** Explicit support for additional vendor-specific parameters, if needed. */
        readonly libraryOptions?: Record<string, unknown> | undefined;
    }
    /** The result interface if validation fails. */
    interface FailureResult {
        /** The issues of failed validation. */
        readonly issues: ReadonlyArray<Issue>;
    }
    /** The issue interface of the failure output. */
    interface Issue {
        /** The error message of the issue. */
        readonly message: string;
        /** The path of the issue, if any. */
        readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
    }
    /** The path segment interface of the issue. */
    interface PathSegment {
        /** The key representing a path segment. */
        readonly key: PropertyKey;
    }
    /** The Standard types interface. */
    interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
    }
    /** Infers the input type of a Standard. */
    type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
    /** Infers the output type of a Standard. */
    type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
}

/** Generic Standard Schema constraint used across open-service definitions. */
type AnySchema = StandardSchemaV1<unknown, unknown>;
/** Stable alias for service identifiers across definition, runtime, and registration APIs. */
type ServiceId = string;
/**
 * Constrains a service's state to a plain object — the only shape the architecture supports.
 *
 * This is not an arbitrary restriction; two layers require it:
 *
 * 1. State is wrapped in a `deepSignal` proxy for fine-grained per-field reactivity, and `deepSignal`
 *    throws ("this object can't be observed") on primitives, `null`, and `undefined` — there are no
 *    fields to track on a scalar.
 * 2. Cross-peer sync (`applyStatePatch` in `service-sync.ts`) merges state by walking object keys;
 *    it has no notion of replacing a whole scalar, so the wire protocol only carries keyed objects.
 *
 * Arrays are technically observable by `deepSignal` but are still rejected here: `applyStatePatch`
 * replaces arrays wholesale rather than merging by key, so a *top-level* array state would silently
 * fail to sync between peers. Wrap collections in a field instead (`{ items: [...] }`).
 *
 * Authoring helpers pair this with an `extends object` bound (which rejects primitives, `null`, and
 * `undefined` while still accepting both `interface` and `type` declarations). The naked `TState` in
 * the intersection keeps it transparent to inference; only an array collapses to the branded error.
 */
type ServiceState<TState> = TState & (TState extends readonly unknown[] ? {
    __openServiceStateError: 'Service state must be a plain object, not an array.';
} : unknown);
/** Public schema shape exposed when describing a schema-backed service contract. */
type SchemaDescriptor = AnySchema;
/** Raw caller-facing value type accepted by a schema-backed operation. */
type InferSchemaInput<TSchema extends AnySchema> = StandardSchemaV1.InferInput<TSchema>;
/** Parsed value type produced by a schema after validation. */
type InferSchemaOutput<TSchema extends AnySchema> = StandardSchemaV1.InferOutput<TSchema>;
/**
 * Named schema maps are the core inference surface for inline open-service authoring.
 *
 * `defineService()` infers one input-schema map and one output-schema map per operation family
 * (queries and commands). Keeping those maps separate gives TypeScript a place to correlate the
 * `input` and `output` properties of each inline object before it contextually types sibling
 * callbacks like `handler`, `load`, `staticPath`, and `staticInputs`.
 */
type OperationInputSchemas = Record<string, AnySchema>;
/**
 * Output-schema maps must stay key-aligned with their input-schema map.
 *
 * The authoring helper uses this alias instead of a plain `Record<string, AnySchema>` so each
 * operation key retains its own input/output schema pair during inference.
 */
type MatchingOutputSchemas<TInputSchemas extends OperationInputSchemas> = {
    [TKey in keyof TInputSchemas]: AnySchema;
};
/**
 * Internal utility used to keep handler maps assignable without collapsing everything to `unknown`.
 */
type BivariantCallback<TArgs extends unknown[], TResult> = {
    bivarianceHack(...args: TArgs): TResult;
}['bivarianceHack'];
/** Runtime shape shared by all command collections after they are built. */
type Command = Record<string, (input: unknown) => Promise<unknown>>;
/**
 * Runtime command map derived directly from the inferred command schema maps.
 *
 * Queries only need command-call typing, not the full command definition objects, so this helper
 * keeps query contexts readable while still preserving exact input/output types per command.
 */
type CommandFunctions<TCommandInputSchemas extends OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas>> = {
    [TKey in keyof TCommandInputSchemas]: BivariantCallback<[
        input: InferSchemaInput<TCommandInputSchemas[TKey]>
    ], Promise<InferSchemaOutput<TCommandOutputSchemas[TKey]>>>;
};
/**
 * Coarse lifecycle of a query's `load`, modeled after TanStack Query's `status`.
 *
 * - `pending` — no successful load has completed yet (and none has failed). The query may still
 *   expose `data` (the synchronous "current best" handler result), but nothing has been loaded.
 * - `error` — the most recent attempt (load rejection, or a synchronous handler / validation throw)
 *   failed. `data` keeps the last successful value, if any.
 * - `success` — a load has completed (or the query has no `load`, so there is nothing to load).
 */
type QueryStatus = 'pending' | 'error' | 'success';
/**
 * Whether a `load` is currently running, modeled after TanStack Query's `fetchStatus` — but named
 * with our own `load` vocabulary because open-service "loads" are any slow async work (computation,
 * extraction, I/O), not specifically remote fetching.
 *
 * - `loading` — a `load` is in flight (the first load, or a reactive background re-load).
 * - `idle` — no `load` is currently running.
 */
type LoadStatus = 'loading' | 'idle';
/**
 * The reactive state of a subscribed query: its current `data` plus the lifecycle of its `load`.
 *
 * `data` and `status` are independent. `data` is the synchronous handler result ("current best
 * effort") and holds the last successful value (or `undefined` before the first success / when a
 * handler throws), while `status`/`loadStatus`/`error` describe the asynchronous `load` lifecycle
 * tracked per subscription. A query with no `load` is `success`/`idle` from its first emission.
 *
 * `isLoading` is intentionally "any load in flight" (TanStack's `isFetching`), and
 * `isInitialLoading` is "a load is in flight and there is nothing to show yet"; the names follow our
 * `load` vocabulary rather than TanStack's `fetch`/`load` split. Unlike TanStack Query, a
 * subscription here can attach to a query whose `data` is already cached in service state, so
 * `isInitialLoading` additionally requires `data === undefined` — it never flags over cached data.
 */
type QueryState<TData> = {
    /** Last successfully produced value; `undefined` before the first success. */
    data: TData | undefined;
    /** The failure that produced `status: 'error'`, otherwise `undefined`. */
    error: Error | undefined;
    status: QueryStatus;
    loadStatus: LoadStatus;
    /** `status === 'pending'`. */
    isPending: boolean;
    /** `status === 'success'`. */
    isSuccess: boolean;
    /** `status === 'error'`. */
    isError: boolean;
    /** `loadStatus === 'loading'` — any load in flight, foreground or background. */
    isLoading: boolean;
    /** `isPending && isLoading && data === undefined` — a first load with nothing to show yet. */
    isInitialLoading: boolean;
    /** `isLoading && !isPending` — a background re-load while data is already shown. */
    isRefreshing: boolean;
};
/**
 * Public runtime shape of a query.
 *
 * - `.get(input)` reads synchronously: it validates input, runs the handler against current state,
 *   and returns the validated result. It does **not** fire the query's `load` — it is a pure
 *   "current best effort" read. (Reads of *other* queries from inside a handler or `load` body still
 *   participate in dependency tracking, so `.loaded()` and subscriptions trigger those dependency
 *   loads; a bare consumer `.get()` does not.)
 * - `.loaded(input)` awaits the full load — this query's `load` plus every transitively read
 *   dependency — before resolving with the validated result.
 * - `.subscribe(input, callback)` invokes `callback` synchronously with the current {@link QueryState}
 *   and again whenever tracked state or the load lifecycle changes (deduped on the whole state).
 *   Subscribing is what fires the query's reactive `load`.
 *
 * There is intentionally no bare-call form: a previous `query(input)` that returned synchronously
 * *and* fired the `load` behind the scenes was removed because the implicit background load was
 * confusing. Read with `.get(input)`, await with `.loaded(input)`, observe with `.subscribe(...)`.
 *
 * Queries whose input schema resolves to `undefined` (for example `v.void()`) may be called with
 * zero arguments: `query.get()`, `query.loaded()`.
 */
type InputQuery<TInput, TOutput> = {
    get(input: TInput): TOutput;
    loaded(input: TInput): Promise<TOutput>;
    subscribe(input: TInput, callback: (state: QueryState<TOutput>) => void): () => void;
    subscribe<TSelected>(input: TInput, selector: (value: TOutput) => TSelected, callback: (state: QueryState<TSelected>) => void): () => void;
};
/** Zero-argument overloads merged into {@link Query} when the input schema is void. */
type VoidQuery<TOutput> = {
    get(): TOutput;
    loaded(): Promise<TOutput>;
    subscribe(callback: (state: QueryState<TOutput>) => void): () => void;
    subscribe<TSelected>(selector: (value: TOutput) => TSelected, callback: (state: QueryState<TSelected>) => void): () => void;
};
type Query<TInput, TOutput> = undefined extends TInput ? VoidQuery<TOutput> & InputQuery<TInput, TOutput> : InputQuery<TInput, TOutput>;
/**
 * Runtime query map derived directly from the inferred query schema maps.
 *
 * The query counterpart to {@link CommandFunctions}: it preserves each sibling query's exact
 * input/output types on the read-only `self.queries` handle, so a handler or `load` can call
 * `self.queries.someQuery.get(input)` without manual casts. `defineService` computes this map from
 * the inferred query schema maps and threads it into the handler/load contexts as their `TQueries`;
 * the erased {@link AnyQueryFunctions} bound is used everywhere the concrete map is not known.
 */
type QueryFunctions<TQueryInputSchemas extends OperationInputSchemas, TQueryOutputSchemas extends MatchingOutputSchemas<TQueryInputSchemas>> = {
    [TKey in keyof TQueryInputSchemas]: Query<InferSchemaInput<TQueryInputSchemas[TKey]>, InferSchemaOutput<TQueryOutputSchemas[TKey]>>;
};
/**
 * Permissive bound for a `self.queries` handle.
 *
 * Every {@link Query} — input or void — structurally satisfies {@link InputQuery} (the void
 * overloads are additive), so this is the supertype that any concrete {@link QueryFunctions} map is
 * assignable to. It is the bound (and erased default) for the `TQueries` parameter below, which lets
 * the precise per-service map flow into handler contexts while still erasing cleanly into the
 * structural `AnyQueryDefinition` storage constraint. Using `Query<unknown, unknown>` here instead
 * would wrongly demand the void zero-arg overloads from input queries.
 */
type AnyQueryFunctions = Record<string, InputQuery<unknown, unknown>>;
/**
 * Read-only service handle exposed to query handlers.
 *
 * Query handlers are strict readers: they can read state and call sibling queries, but they cannot
 * mutate state and cannot invoke commands. Mutations belong in commands; load-side preparation
 * belongs in `load`.
 */
type QuerySelf<TState = unknown, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = {
    readonly state: TState;
    queries: TQueries;
};
/**
 * Load handle exposed to `load` functions.
 *
 * `load` may read state and queries, and may invoke declared commands to mutate state. It does
 * not receive `setState` directly — all writes must flow through commands so authors keep one
 * documented mutation surface per service.
 */
type LoadSelf<TState = unknown, TCommandInputSchemas extends OperationInputSchemas = OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas> = MatchingOutputSchemas<TCommandInputSchemas>, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = QuerySelf<TState, TQueries> & {
    commands: CommandFunctions<TCommandInputSchemas, TCommandOutputSchemas>;
};
/**
 * Mutable service handle exposed to command handlers.
 *
 * Commands receive both `setState` for direct state mutation and `commands` so one command can
 * delegate to another within the same service.
 */
type CommandSelf<TState = unknown, TCommandInputSchemas extends OperationInputSchemas = OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas> = MatchingOutputSchemas<TCommandInputSchemas>, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = LoadSelf<TState, TCommandInputSchemas, TCommandOutputSchemas, TQueries> & {
    setState(mutate: (state: TState) => void): void;
};
type ServiceSummary = {
    id: ServiceId;
    description?: string;
    queryNames: string[];
    commandNames: string[];
};
type OperationDescriptor = {
    name: string;
    description?: string;
    input: SchemaDescriptor;
    output: SchemaDescriptor;
    /** Present when the query declares `staticPath` at definition time. */
    staticPath?: true;
};
type ServiceDescriptor = {
    id: ServiceId;
    description?: string;
    queries: Record<string, OperationDescriptor>;
    commands: Record<string, OperationDescriptor>;
};
/** Context passed to query handlers. */
type QueryCtx<TState, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = {
    self: QuerySelf<TState, TQueries>;
    getService: ServiceRegistryApi['getService'];
};
/** Context passed to `load` functions and static-input enumerators. */
type LoadCtx<TState, TCommandInputSchemas extends OperationInputSchemas = OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas> = MatchingOutputSchemas<TCommandInputSchemas>, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = {
    self: LoadSelf<TState, TCommandInputSchemas, TCommandOutputSchemas, TQueries>;
    getService: ServiceRegistryApi['getService'];
};
/** Static input enumerator stored on registered definitions; always receives load context. */
type RegisteredStaticInputs<TState> = BivariantCallback<[
    ctx: LoadCtx<TState>
], unknown[] | Promise<unknown[]>>;
/** Context passed to command handlers. */
type CommandCtx<TState, TCommandInputSchemas extends OperationInputSchemas = OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas> = MatchingOutputSchemas<TCommandInputSchemas>, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = {
    self: CommandSelf<TState, TCommandInputSchemas, TCommandOutputSchemas, TQueries>;
    getService: ServiceRegistryApi['getService'];
};
/**
 * Declarative definition for one query.
 *
 * Queries validate caller input synchronously, run a synchronous read-only handler, and validate
 * the resolved output. The optional `load` hook is fired by subscriptions (reactively) and by
 * `.loaded()` callers (drained to completion), deduped per `(service, query, input)` while one is
 * already in flight — a bare `.get()` read never fires it.
 *
 * Queries that participate in static JSON generation declare `staticPath` at definition time.
 * `staticInputs` may also be declared here when the input list has no runtime dependencies; inputs
 * that need registry or story-index context belong in server registration instead.
 */
type QueryDefinition<TState, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TCommandInputSchemas extends OperationInputSchemas = OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas> = MatchingOutputSchemas<TCommandInputSchemas>, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = {
    description?: string;
    /**
     * When true, hides this query from `describeService()` output. Defaults to false. Does not disable
     * the query at runtime — callers with a service handle can still invoke it.
     */
    internal?: boolean;
    input: TInputSchema;
    output: TOutputSchema;
    /** Logical path for the serialized state snapshot, relative to this service's output folder. */
    staticPath?: BivariantCallback<[input: InferSchemaOutput<TInputSchema>], string>;
    /** Dependency-free static build inputs declared alongside the public contract. */
    staticInputs?: BivariantCallback<[
    ], InferSchemaInput<TInputSchema>[] | Promise<InferSchemaInput<TInputSchema>[]>>;
    handler?: BivariantCallback<[
        input: InferSchemaOutput<TInputSchema>,
        ctx: QueryCtx<TState, TQueries>
    ], InferSchemaInput<TOutputSchema>>;
    load?: BivariantCallback<[
        input: InferSchemaOutput<TInputSchema>,
        ctx: LoadCtx<TState, TCommandInputSchemas, TCommandOutputSchemas, TQueries>
    ], void | Promise<void>>;
};
/**
 * Declarative definition for one command.
 *
 * Commands validate caller input, run against a mutable context, and validate the resolved output.
 */
type CommandDefinition<TState, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TCommandInputSchemas extends OperationInputSchemas = OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas> = MatchingOutputSchemas<TCommandInputSchemas>, TQueries extends AnyQueryFunctions = AnyQueryFunctions> = {
    description?: string;
    /**
     * When true, hides this command from `describeService()` output. Defaults to false. Does not
     * disable the command at runtime — callers with a service handle can still invoke it.
     */
    internal?: boolean;
    input: TInputSchema;
    output: TOutputSchema;
    handler?: BivariantCallback<[
        input: InferSchemaOutput<TInputSchema>,
        ctx: CommandCtx<TState, TCommandInputSchemas, TCommandOutputSchemas, TQueries>
    ], InferSchemaInput<TOutputSchema> | Promise<InferSchemaInput<TOutputSchema>>>;
};
/** Internal structural constraint used to store any query definition in a record. */
type AnyQueryDefinition<TState> = {
    description?: string;
    internal?: boolean;
    input: AnySchema;
    output: AnySchema;
    staticPath?: BivariantCallback<[input: unknown], string>;
    staticInputs?: RegisteredStaticInputs<TState>;
    handler?: BivariantCallback<[input: unknown, ctx: QueryCtx<TState>], unknown>;
    load?: BivariantCallback<[input: unknown, ctx: LoadCtx<TState>], void | Promise<void>>;
};
/** Internal structural constraint used to store any command definition in a record. */
type AnyCommandDefinition<TState> = {
    description?: string;
    internal?: boolean;
    input: AnySchema;
    output: AnySchema;
    handler?: BivariantCallback<[
        input: unknown,
        ctx: CommandCtx<TState>
    ], unknown | Promise<unknown>>;
};
/** Named query map attached to a service definition. */
type Queries<TState> = Record<string, AnyQueryDefinition<TState>>;
/** Named command map attached to a service definition. */
type Commands<TState> = Record<string, AnyCommandDefinition<TState>>;
/** Top-level description of a service: identity, initial state, queries, and commands. */
type ServiceDefinition<TState, TQueries extends Queries<TState>, TCommands extends Commands<TState>, TId extends ServiceId = ServiceId> = {
    id: TId;
    description?: string;
    /**
     * When true, hides this service from `listServices()` output. Defaults to false. Does not disable
     * the service at runtime — callers can still resolve it through `getService()`.
     */
    internal?: boolean;
    /**
     * Initial state for the service. Must be a plain object (not a primitive, `null`, or array) — see
     * {@link ServiceState} for why. The authoring boundary (`defineService`) enforces this; the runtime
     * type stays `TState` so already-constructed definitions flow through the registry unchanged.
     */
    initialState: TState;
    queries: TQueries;
    commands: TCommands;
};
/** Structural constraint for any service definition stored in the registry. */
type AnyServiceDefinition = ServiceDefinition<unknown, Queries<unknown>, Commands<unknown>>;
/** Runtime service instance derived from a `ServiceDefinition`. */
type ServiceInstance<TState, TQueries extends Queries<TState>, TCommands extends Commands<TState>> = {
    queries: {
        [TKey in keyof TQueries]: TQueries[TKey] extends {
            input: infer TInputSchema extends AnySchema;
            output: infer TOutputSchema extends AnySchema;
        } ? Query<InferSchemaInput<TInputSchema>, InferSchemaOutput<TOutputSchema>> : never;
    };
    commands: {
        [TKey in keyof TCommands]: TCommands[TKey] extends {
            input: infer TInputSchema extends AnySchema;
            output: infer TOutputSchema extends AnySchema;
        } ? (input: InferSchemaInput<TInputSchema>) => Promise<InferSchemaOutput<TOutputSchema>> : never;
    };
};
/** Runtime instance type recovered from one authored service definition. */
type ServiceInstanceOf<TDefinition extends AnyServiceDefinition> = TDefinition extends ServiceDefinition<infer TState, infer TQueries, infer TCommands> ? ServiceInstance<TState, TQueries, TCommands> : never;
interface ServiceRegistryApi {
    listServices(): Promise<ServiceSummary[]>;
    describeService(serviceId: ServiceId): Promise<ServiceDescriptor>;
    getService<TInstance = RuntimeService>(serviceId: ServiceId): TInstance;
}
type RuntimeService = ServiceInstance<unknown, Queries<unknown>, Commands<unknown>> & ServiceRegistryApi;
type ServiceQueryRegistration<TState> = {
    /** Static build inputs that may depend on registry or other server context. */
    staticInputs?: RegisteredStaticInputs<TState>;
};
type ServiceCommandRegistration<TState, TCommand extends AnyCommandDefinition<TState>> = Pick<TCommand, 'handler'>;
type ServiceRegistrationOptions<TState, TQueries extends Queries<TState>, TCommands extends Commands<TState>> = {
    queries?: {
        [TKey in keyof TQueries]?: ServiceQueryRegistration<TState>;
    };
    commands?: {
        [TKey in keyof TCommands]?: ServiceCommandRegistration<TState, TCommands[TKey]>;
    };
};
type ServerServiceRegistration<TState, TQueries extends Queries<TState>, TCommands extends Commands<TState>> = {
    definition: ServiceDefinition<TState, TQueries, TCommands>;
} & ServiceRegistrationOptions<TState, TQueries, TCommands>;

//#endregion
//#region src/methods/fallback/fallback.d.ts
/**
* Fallback type.
*/
type Fallback<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>> = MaybeDeepReadonly<InferOutput<TSchema>> | ((dataset?: OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>, config?: Config<InferIssue<TSchema>>) => MaybeDeepReadonly<InferOutput<TSchema>>);
/**
* Schema with fallback type.
*/
type SchemaWithFallback<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TFallback$1 extends Fallback<TSchema>> = TSchema & {
  /**
  * The fallback value.
  */
  readonly fallback: TFallback$1;
};
//#endregion
//#region src/methods/fallback/fallbackAsync.d.ts
/**
* Fallback async type.
*/
type FallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>> = MaybeDeepReadonly<InferOutput<TSchema>> | ((dataset?: OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>, config?: Config<InferIssue<TSchema>>) => MaybePromise<MaybeDeepReadonly<InferOutput<TSchema>>>);
/**
* Schema with fallback async type.
*/
type SchemaWithFallbackAsync<TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TFallback$1 extends FallbackAsync<TSchema>> = Omit<TSchema, "async" | "~standard" | "~run"> & {
  /**
  * The fallback value.
  */
  readonly fallback: TFallback$1;
  /**
  * Whether it's async.
  */
  readonly async: true;
  /**
  * The Standard Schema properties.
  *
  * @internal
  */
  readonly "~standard": StandardProps<InferInput<TSchema>, InferOutput<TSchema>>;
  /**
  * Parses unknown input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<InferOutput<TSchema>, InferIssue<TSchema>>>;
};
//#endregion
//#region src/methods/pipe/pipe.d.ts
/**
* Schema with pipe type.
*/
type SchemaWithPipe<TPipe$1 extends readonly [BaseSchema<unknown, unknown, BaseIssue<unknown>>, ...PipeItem<any, unknown, BaseIssue<unknown>>[]]> = Omit<FirstTupleItem<TPipe$1>, "pipe" | "~standard" | "~run" | "~types"> & {
  /**
  * The pipe items.
  */
  readonly pipe: TPipe$1;
  /**
  * The Standard Schema properties.
  *
  * @internal
  */
  readonly "~standard": StandardProps<InferInput<FirstTupleItem<TPipe$1>>, InferOutput<LastTupleItem<TPipe$1>>>;
  /**
  * Parses unknown input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<InferOutput<LastTupleItem<TPipe$1>>, InferIssue<TPipe$1[number]>>;
  /**
  * The input, output and issue type.
  *
  * @internal
  */
  readonly "~types"?: {
    readonly input: InferInput<FirstTupleItem<TPipe$1>>;
    readonly output: InferOutput<LastTupleItem<TPipe$1>>;
    readonly issue: InferIssue<TPipe$1[number]>;
  } | undefined;
};
//#endregion
//#region src/types/metadata.d.ts
/**
* Base metadata interface.
*/
interface BaseMetadata<TInput$1> {
  /**
  * The object kind.
  */
  readonly kind: "metadata";
  /**
  * The metadata type.
  */
  readonly type: string;
  /**
  * The metadata reference.
  */
  readonly reference: (...args: any[]) => BaseMetadata<any>;
  /**
  * The input, output and issue type.
  *
  * @internal
  */
  readonly "~types"?: {
    readonly input: TInput$1;
    readonly output: TInput$1;
    readonly issue: never;
  } | undefined;
}
//#endregion
//#region src/types/dataset.d.ts
/**
* Unknown dataset interface.
*/
interface UnknownDataset {
  /**
  * Whether is's typed.
  */
  typed?: false;
  /**
  * The dataset value.
  */
  value: unknown;
  /**
  * The dataset issues.
  */
  issues?: undefined;
}
/**
* Success dataset interface.
*/
interface SuccessDataset<TValue$1> {
  /**
  * Whether is's typed.
  */
  typed: true;
  /**
  * The dataset value.
  */
  value: TValue$1;
  /**
  * The dataset issues.
  */
  issues?: undefined;
}
/**
* Partial dataset interface.
*/
interface PartialDataset<TValue$1, TIssue extends BaseIssue<unknown>> {
  /**
  * Whether is's typed.
  */
  typed: true;
  /**
  * The dataset value.
  */
  value: TValue$1;
  /**
  * The dataset issues.
  */
  issues: [TIssue, ...TIssue[]];
}
/**
* Failure dataset interface.
*/
interface FailureDataset<TIssue extends BaseIssue<unknown>> {
  /**
  * Whether is's typed.
  */
  typed: false;
  /**
  * The dataset value.
  */
  value: unknown;
  /**
  * The dataset issues.
  */
  issues: [TIssue, ...TIssue[]];
}
/**
* Output dataset type.
*/
type OutputDataset<TValue$1, TIssue extends BaseIssue<unknown>> = SuccessDataset<TValue$1> | PartialDataset<TValue$1, TIssue> | FailureDataset<TIssue>;
//#endregion
//#region src/types/standard.d.ts
/**
* The Standard Schema properties interface.
*/
interface StandardProps<TInput$1, TOutput$1> {
  /**
  * The version number of the standard.
  */
  readonly version: 1;
  /**
  * The vendor name of the schema library.
  */
  readonly vendor: "valibot";
  /**
  * Validates unknown input values.
  */
  readonly validate: (value: unknown) => StandardResult<TOutput$1> | Promise<StandardResult<TOutput$1>>;
  /**
  * Inferred types associated with the schema.
  */
  readonly types?: StandardTypes<TInput$1, TOutput$1> | undefined;
}
/**
* The result interface of the validate function.
*/
type StandardResult<TOutput$1> = StandardSuccessResult<TOutput$1> | StandardFailureResult;
/**
* The result interface if validation succeeds.
*/
interface StandardSuccessResult<TOutput$1> {
  /**
  * The typed output value.
  */
  readonly value: TOutput$1;
  /**
  * The non-existent issues.
  */
  readonly issues?: undefined;
}
/**
* The result interface if validation fails.
*/
interface StandardFailureResult {
  /**
  * The issues of failed validation.
  */
  readonly issues: readonly StandardIssue[];
}
/**
* The issue interface of the failure output.
*/
interface StandardIssue {
  /**
  * The error message of the issue.
  */
  readonly message: string;
  /**
  * The path of the issue, if any.
  */
  readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined;
}
/**
* The path item interface of the issue.
*/
interface StandardPathItem {
  /**
  * The key of the path item.
  */
  readonly key: PropertyKey;
}
/**
* The Standard Schema types interface.
*/
interface StandardTypes<TInput$1, TOutput$1> {
  /**
  * The input type of the schema.
  */
  readonly input: TInput$1;
  /**
  * The output type of the schema.
  */
  readonly output: TOutput$1;
}
//#endregion
//#region src/types/schema.d.ts
/**
* Base schema interface.
*/
interface BaseSchema<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> {
  /**
  * The object kind.
  */
  readonly kind: "schema";
  /**
  * The schema type.
  */
  readonly type: string;
  /**
  * The schema reference.
  */
  readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>>;
  /**
  * The expected property.
  */
  readonly expects: string;
  /**
  * Whether it's async.
  */
  readonly async: false;
  /**
  * The Standard Schema properties.
  *
  * @internal
  */
  readonly "~standard": StandardProps<TInput$1, TOutput$1>;
  /**
  * Parses unknown input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput$1, TIssue>;
  /**
  * The input, output and issue type.
  *
  * @internal
  */
  readonly "~types"?: {
    readonly input: TInput$1;
    readonly output: TOutput$1;
    readonly issue: TIssue;
  } | undefined;
}
/**
* Base schema async interface.
*/
interface BaseSchemaAsync<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> extends Omit<BaseSchema<TInput$1, TOutput$1, TIssue>, "reference" | "async" | "~run"> {
  /**
  * The schema reference.
  */
  readonly reference: (...args: any[]) => BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
  /**
  * Whether it's async.
  */
  readonly async: true;
  /**
  * Parses unknown input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: UnknownDataset, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput$1, TIssue>>;
}
/**
* Generic schema type.
*/
type GenericSchema<TInput$1 = unknown, TOutput$1 = TInput$1, TIssue extends BaseIssue<unknown> = BaseIssue<unknown>> = BaseSchema<TInput$1, TOutput$1, TIssue>;
//#endregion
//#region src/types/transformation.d.ts
/**
* Base transformation interface.
*/
interface BaseTransformation<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> {
  /**
  * The object kind.
  */
  readonly kind: "transformation";
  /**
  * The transformation type.
  */
  readonly type: string;
  /**
  * The transformation reference.
  */
  readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>>;
  /**
  * Whether it's async.
  */
  readonly async: false;
  /**
  * Transforms known input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: SuccessDataset<TInput$1>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput$1, BaseIssue<unknown> | TIssue>;
  /**
  * The input, output and issue type.
  *
  * @internal
  */
  readonly "~types"?: {
    readonly input: TInput$1;
    readonly output: TOutput$1;
    readonly issue: TIssue;
  } | undefined;
}
/**
* Base transformation async interface.
*/
interface BaseTransformationAsync<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> extends Omit<BaseTransformation<TInput$1, TOutput$1, TIssue>, "reference" | "async" | "~run"> {
  /**
  * The transformation reference.
  */
  readonly reference: (...args: any[]) => BaseTransformation<any, any, BaseIssue<unknown>> | BaseTransformationAsync<any, any, BaseIssue<unknown>>;
  /**
  * Whether it's async.
  */
  readonly async: true;
  /**
  * Transforms known input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: SuccessDataset<TInput$1>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput$1, BaseIssue<unknown> | TIssue>>;
}
//#endregion
//#region src/types/validation.d.ts
/**
* Base validation interface.
*/
interface BaseValidation<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> {
  /**
  * The object kind.
  */
  readonly kind: "validation";
  /**
  * The validation type.
  */
  readonly type: string;
  /**
  * The validation reference.
  */
  readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>>;
  /**
  * The expected property.
  */
  readonly expects: string | null;
  /**
  * Whether it's async.
  */
  readonly async: false;
  /**
  * Validates known input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: OutputDataset<TInput$1, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => OutputDataset<TOutput$1, BaseIssue<unknown> | TIssue>;
  /**
  * The input, output and issue type.
  *
  * @internal
  */
  readonly "~types"?: {
    readonly input: TInput$1;
    readonly output: TOutput$1;
    readonly issue: TIssue;
  } | undefined;
}
/**
* Base validation async interface.
*/
interface BaseValidationAsync<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> extends Omit<BaseValidation<TInput$1, TOutput$1, TIssue>, "reference" | "async" | "~run"> {
  /**
  * The validation reference.
  */
  readonly reference: (...args: any[]) => BaseValidation<any, any, BaseIssue<unknown>> | BaseValidationAsync<any, any, BaseIssue<unknown>>;
  /**
  * Whether it's async.
  */
  readonly async: true;
  /**
  * Validates known input values.
  *
  * @param dataset The input dataset.
  * @param config The configuration.
  *
  * @returns The output dataset.
  *
  * @internal
  */
  readonly "~run": (dataset: OutputDataset<TInput$1, BaseIssue<unknown>>, config: Config<BaseIssue<unknown>>) => Promise<OutputDataset<TOutput$1, BaseIssue<unknown> | TIssue>>;
}
//#endregion
//#region src/types/infer.d.ts
/**
* Infer input type.
*/
type InferInput<TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem$1["~types"]>["input"];
/**
* Infer output type.
*/
type InferOutput<TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem$1["~types"]>["output"];
/**
* Infer issue type.
*/
type InferIssue<TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | BaseValidation<any, unknown, BaseIssue<unknown>> | BaseValidationAsync<any, unknown, BaseIssue<unknown>> | BaseTransformation<any, unknown, BaseIssue<unknown>> | BaseTransformationAsync<any, unknown, BaseIssue<unknown>> | BaseMetadata<any>> = NonNullable<TItem$1["~types"]>["issue"];
/**
* Constructs a type that is maybe readonly.
*/
type MaybeReadonly<TValue$1> = TValue$1 | Readonly<TValue$1>;
/**
* Constructs a type that is deeply readonly.
*/
type DeepReadonly<TValue$1> = TValue$1 extends Record<string, unknown> | readonly unknown[] ? { readonly [TKey in keyof TValue$1]: DeepReadonly<TValue$1[TKey]> } : TValue$1;
/**
* Constructs a type that is maybe deeply readonly.
*/
type MaybeDeepReadonly<TValue$1> = TValue$1 | DeepReadonly<TValue$1>;
/**
* Constructs a type that is maybe a promise.
*/
type MaybePromise<TValue$1> = TValue$1 | Promise<TValue$1>;
/**
* Prettifies a type for better readability.
*
* Hint: This type has no effect and is only used so that TypeScript displays
* the final type in the preview instead of the utility types used.
*/
type Prettify<TObject> = { [TKey in keyof TObject]: TObject[TKey] } & {};
/**
* Marks specific keys as optional.
*/
type MarkOptional<TObject, TKeys extends keyof TObject> = { [TKey in keyof TObject]?: unknown } & Omit<TObject, TKeys> & Partial<Pick<TObject, TKeys>>;
/**
* Extracts first tuple item.
*/
type FirstTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[0];
/**
* Extracts last tuple item.
*/
type LastTupleItem<TTuple extends readonly [unknown, ...unknown[]]> = TTuple[TTuple extends readonly [unknown, ...infer TRest] ? TRest["length"] : never];
//#endregion
//#region src/types/other.d.ts
/**
* Error message type.
*/
type ErrorMessage<TIssue extends BaseIssue<unknown>> = ((issue: TIssue) => string) | string;
/**
* Default type.
*/
type Default<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TInput$1 extends null | undefined> = MaybeDeepReadonly<InferInput<TWrapped$1> | TInput$1> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped$1>>) => MaybeDeepReadonly<InferInput<TWrapped$1> | TInput$1>) | undefined;
/**
* Default async type.
*/
type DefaultAsync<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TInput$1 extends null | undefined> = MaybeDeepReadonly<InferInput<TWrapped$1> | TInput$1> | ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped$1>>) => MaybePromise<MaybeDeepReadonly<InferInput<TWrapped$1> | TInput$1>>) | undefined;
/**
* Default value type.
*/
type DefaultValue<TDefault extends Default<BaseSchema<unknown, unknown, BaseIssue<unknown>>, null | undefined> | DefaultAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, null | undefined>> = TDefault extends DefaultAsync<infer TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, infer TInput> ? TDefault extends ((dataset?: UnknownDataset, config?: Config<InferIssue<TWrapped>>) => MaybePromise<MaybeDeepReadonly<InferInput<TWrapped> | TInput>>) ? Awaited<ReturnType<TDefault>> : TDefault : never;
//#endregion
//#region src/types/object.d.ts
/**
* Optional entry schema type.
*/
type OptionalEntrySchema = ExactOptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchema<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown>;
/**
* Optional entry schema async type.
*/
type OptionalEntrySchemaAsync = ExactOptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | NullishSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalSchemaAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown>;
/**
* Object entries interface.
*/
interface ObjectEntries {
  [key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalEntrySchema;
}
/**
* Object entries async interface.
*/
interface ObjectEntriesAsync {
  [key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | SchemaWithFallback<BaseSchema<unknown, unknown, BaseIssue<unknown>>, unknown> | SchemaWithFallbackAsync<BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, unknown> | OptionalEntrySchema | OptionalEntrySchemaAsync;
}
/**
* Infer entries input type.
*/
type InferEntriesInput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = { -readonly [TKey in keyof TEntries$1]: InferInput<TEntries$1[TKey]> };
/**
* Infer entries output type.
*/
type InferEntriesOutput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = { -readonly [TKey in keyof TEntries$1]: InferOutput<TEntries$1[TKey]> };
/**
* Optional input keys type.
*/
type OptionalInputKeys<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = { [TKey in keyof TEntries$1]: TEntries$1[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? TKey : never }[keyof TEntries$1];
/**
* Optional output keys type.
*/
type OptionalOutputKeys<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = { [TKey in keyof TEntries$1]: TEntries$1[TKey] extends OptionalEntrySchema | OptionalEntrySchemaAsync ? undefined extends TEntries$1[TKey]["default"] ? TKey : never : never }[keyof TEntries$1];
/**
* Input with question marks type.
*/
type InputWithQuestionMarks<TEntries$1 extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesInput<TEntries$1>> = MarkOptional<TObject, OptionalInputKeys<TEntries$1>>;
/**
* Output with question marks type.
*/
type OutputWithQuestionMarks<TEntries$1 extends ObjectEntries | ObjectEntriesAsync, TObject extends InferEntriesOutput<TEntries$1>> = MarkOptional<TObject, OptionalOutputKeys<TEntries$1>>;
/**
* Readonly output keys type.
*/
type ReadonlyOutputKeys<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = { [TKey in keyof TEntries$1]: TEntries$1[TKey] extends {
  readonly pipe: readonly unknown[];
} ? ReadonlyAction<any> extends TEntries$1[TKey]["pipe"][number] ? TKey : never : never }[keyof TEntries$1];
/**
* Output with readonly type.
*/
type OutputWithReadonly<TEntries$1 extends ObjectEntries | ObjectEntriesAsync, TObject extends OutputWithQuestionMarks<TEntries$1, InferEntriesOutput<TEntries$1>>> = ReadonlyOutputKeys<TEntries$1> extends never ? TObject : Readonly<TObject> & Pick<TObject, Exclude<keyof TObject, ReadonlyOutputKeys<TEntries$1>>>;
/**
* Infer object input type.
*/
type InferObjectInput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = Prettify<InputWithQuestionMarks<TEntries$1, InferEntriesInput<TEntries$1>>>;
/**
* Infer object output type.
*/
type InferObjectOutput<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = Prettify<OutputWithReadonly<TEntries$1, OutputWithQuestionMarks<TEntries$1, InferEntriesOutput<TEntries$1>>>>;
/**
* Infer object issue type.
*/
type InferObjectIssue<TEntries$1 extends ObjectEntries | ObjectEntriesAsync> = InferIssue<TEntries$1[keyof TEntries$1]>;
//#endregion
//#region src/types/issue.d.ts
/**
* Array path item interface.
*/
interface ArrayPathItem {
  /**
  * The path item type.
  */
  readonly type: "array";
  /**
  * The path item origin.
  */
  readonly origin: "value";
  /**
  * The path item input.
  */
  readonly input: MaybeReadonly<unknown[]>;
  /**
  * The path item key.
  */
  readonly key: number;
  /**
  * The path item value.
  */
  readonly value: unknown;
}
/**
* Map path item interface.
*/
interface MapPathItem {
  /**
  * The path item type.
  */
  readonly type: "map";
  /**
  * The path item origin.
  */
  readonly origin: "key" | "value";
  /**
  * The path item input.
  */
  readonly input: Map<unknown, unknown>;
  /**
  * The path item key.
  */
  readonly key: unknown;
  /**
  * The path item value.
  */
  readonly value: unknown;
}
/**
* Object path item interface.
*/
interface ObjectPathItem {
  /**
  * The path item type.
  */
  readonly type: "object";
  /**
  * The path item origin.
  */
  readonly origin: "key" | "value";
  /**
  * The path item input.
  */
  readonly input: Record<string, unknown>;
  /**
  * The path item key.
  */
  readonly key: string;
  /**
  * The path item value.
  */
  readonly value: unknown;
}
/**
* Set path item interface.
*/
interface SetPathItem {
  /**
  * The path item type.
  */
  readonly type: "set";
  /**
  * The path item origin.
  */
  readonly origin: "value";
  /**
  * The path item input.
  */
  readonly input: Set<unknown>;
  /**
  * The path item key.
  */
  readonly key: null;
  /**
  * The path item key.
  */
  readonly value: unknown;
}
/**
* Unknown path item interface.
*/
interface UnknownPathItem {
  /**
  * The path item type.
  */
  readonly type: "unknown";
  /**
  * The path item origin.
  */
  readonly origin: "key" | "value";
  /**
  * The path item input.
  */
  readonly input: unknown;
  /**
  * The path item key.
  */
  readonly key: unknown;
  /**
  * The path item value.
  */
  readonly value: unknown;
}
/**
* Issue path item type.
*/
type IssuePathItem = ArrayPathItem | MapPathItem | ObjectPathItem | SetPathItem | UnknownPathItem;
/**
* Base issue interface.
*/
interface BaseIssue<TInput$1> extends Config<BaseIssue<TInput$1>> {
  /**
  * The issue kind.
  */
  readonly kind: "schema" | "validation" | "transformation";
  /**
  * The issue type.
  */
  readonly type: string;
  /**
  * The raw input data.
  */
  readonly input: TInput$1;
  /**
  * The expected property.
  */
  readonly expected: string | null;
  /**
  * The received property.
  */
  readonly received: string;
  /**
  * The error message.
  */
  readonly message: string;
  /**
  * The input requirement.
  */
  readonly requirement?: unknown | undefined;
  /**
  * The issue path.
  */
  readonly path?: [IssuePathItem, ...IssuePathItem[]] | undefined;
  /**
  * The sub issues.
  */
  readonly issues?: [BaseIssue<TInput$1>, ...BaseIssue<TInput$1>[]] | undefined;
}
//#endregion
//#region src/types/config.d.ts
/**
* Config interface.
*/
interface Config<TIssue extends BaseIssue<unknown>> {
  /**
  * The selected language.
  */
  readonly lang?: string | undefined;
  /**
  * The error message.
  */
  readonly message?: ErrorMessage<TIssue> | undefined;
  /**
  * Whether it should be aborted early.
  */
  readonly abortEarly?: boolean | undefined;
  /**
  * Whether a pipe should be aborted early.
  */
  readonly abortPipeEarly?: boolean | undefined;
}
//#endregion
//#region src/types/pipe.d.ts
/**
* Pipe action type.
*/
type PipeAction<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> = BaseValidation<TInput$1, TOutput$1, TIssue> | BaseTransformation<TInput$1, TOutput$1, TIssue> | BaseMetadata<TInput$1>;
/**
* Pipe item type.
*/
type PipeItem<TInput$1, TOutput$1, TIssue extends BaseIssue<unknown>> = BaseSchema<TInput$1, TOutput$1, TIssue> | PipeAction<TInput$1, TOutput$1, TIssue>;
//#endregion
//#region src/schemas/array/types.d.ts
/**
* Array issue interface.
*/
interface ArrayIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "array";
  /**
  * The expected property.
  */
  readonly expected: "Array";
}
//#endregion
//#region src/schemas/array/array.d.ts
/**
* Array schema interface.
*/
interface ArraySchema<TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TMessage extends ErrorMessage<ArrayIssue> | undefined> extends BaseSchema<InferInput<TItem$1>[], InferOutput<TItem$1>[], ArrayIssue | InferIssue<TItem$1>> {
  /**
  * The schema type.
  */
  readonly type: "array";
  /**
  * The schema reference.
  */
  readonly reference: typeof array;
  /**
  * The expected property.
  */
  readonly expects: "Array";
  /**
  * The array item schema.
  */
  readonly item: TItem$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates an array schema.
*
* @param item The item schema.
*
* @returns An array schema.
*/
declare function array<const TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(item: TItem$1): ArraySchema<TItem$1, undefined>;
/**
* Creates an array schema.
*
* @param item The item schema.
* @param message The error message.
*
* @returns An array schema.
*/
declare function array<const TItem$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<ArrayIssue> | undefined>(item: TItem$1, message: TMessage): ArraySchema<TItem$1, TMessage>;
//#endregion
//#region src/schemas/custom/types.d.ts
/**
* Custom issue interface.
*/
interface CustomIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "custom";
  /**
  * The expected property.
  */
  readonly expected: "unknown";
}
//#endregion
//#region src/schemas/custom/custom.d.ts
/**
* Check type.
*/
type Check = (input: unknown) => boolean;
/**
* Custom schema interface.
*/
interface CustomSchema<TInput$1, TMessage extends ErrorMessage<CustomIssue> | undefined> extends BaseSchema<TInput$1, TInput$1, CustomIssue> {
  /**
  * The schema type.
  */
  readonly type: "custom";
  /**
  * The schema reference.
  */
  readonly reference: typeof custom;
  /**
  * The expected property.
  */
  readonly expects: "unknown";
  /**
  * The type check function.
  */
  readonly check: Check;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a custom schema.
*
* @param check The type check function.
*
* @returns A custom schema.
*/
declare function custom<TInput$1>(check: Check): CustomSchema<TInput$1, undefined>;
/**
* Creates a custom schema.
*
* @param check The type check function.
* @param message The error message.
*
* @returns A custom schema.
*/
declare function custom<TInput$1, const TMessage extends ErrorMessage<CustomIssue> | undefined = ErrorMessage<CustomIssue> | undefined>(check: Check, message: TMessage): CustomSchema<TInput$1, TMessage>;
//#endregion
//#region src/schemas/exactOptional/exactOptional.d.ts
/**
* Exact optional schema interface.
*/
interface ExactOptionalSchema<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped$1, never>> extends BaseSchema<InferInput<TWrapped$1>, InferOutput<TWrapped$1>, InferIssue<TWrapped$1>> {
  /**
  * The schema type.
  */
  readonly type: "exact_optional";
  /**
  * The schema reference.
  */
  readonly reference: typeof exactOptional;
  /**
  * The expected property.
  */
  readonly expects: TWrapped$1["expects"];
  /**
  * The wrapped schema.
  */
  readonly wrapped: TWrapped$1;
  /**
  * The default value.
  */
  readonly default: TDefault;
}
/**
* Creates an exact optional schema.
*
* @param wrapped The wrapped schema.
*
* @returns An exact optional schema.
*/
declare function exactOptional<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped$1): ExactOptionalSchema<TWrapped$1, undefined>;
/**
* Creates an exact optional schema.
*
* @param wrapped The wrapped schema.
* @param default_ The default value.
*
* @returns An exact optional schema.
*/
declare function exactOptional<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped$1, never>>(wrapped: TWrapped$1, default_: TDefault): ExactOptionalSchema<TWrapped$1, TDefault>;
//#endregion
//#region src/schemas/exactOptional/exactOptionalAsync.d.ts
/**
* Exact optional schema async interface.
*/
interface ExactOptionalSchemaAsync<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped$1, never>> extends BaseSchemaAsync<InferInput<TWrapped$1>, InferOutput<TWrapped$1>, InferIssue<TWrapped$1>> {
  /**
  * The schema type.
  */
  readonly type: "exact_optional";
  /**
  * The schema reference.
  */
  readonly reference: typeof exactOptional | typeof exactOptionalAsync;
  /**
  * The expected property.
  */
  readonly expects: TWrapped$1["expects"];
  /**
  * The wrapped schema.
  */
  readonly wrapped: TWrapped$1;
  /**
  * The default value.
  */
  readonly default: TDefault;
}
/**
* Creates an exact optional schema.
*
* @param wrapped The wrapped schema.
*
* @returns An exact optional schema.
*/
declare function exactOptionalAsync<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped$1): ExactOptionalSchemaAsync<TWrapped$1, undefined>;
/**
* Creates an exact optional schema.
*
* @param wrapped The wrapped schema.
* @param default_ The default value.
*
* @returns An exact optional schema.
*/
declare function exactOptionalAsync<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped$1, never>>(wrapped: TWrapped$1, default_: TDefault): ExactOptionalSchemaAsync<TWrapped$1, TDefault>;
//#endregion
//#region src/schemas/literal/literal.d.ts
/**
* Literal type.
*/
type Literal = bigint | boolean | number | string | symbol;
/**
* Literal issue interface.
*/
interface LiteralIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "literal";
  /**
  * The expected property.
  */
  readonly expected: string;
}
/**
* Literal schema interface.
*/
interface LiteralSchema<TLiteral extends Literal, TMessage extends ErrorMessage<LiteralIssue> | undefined> extends BaseSchema<TLiteral, TLiteral, LiteralIssue> {
  /**
  * The schema type.
  */
  readonly type: "literal";
  /**
  * The schema reference.
  */
  readonly reference: typeof literal;
  /**
  * The literal value.
  */
  readonly literal: TLiteral;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a literal schema.
*
* @param literal_ The literal value.
*
* @returns A literal schema.
*/
declare function literal<const TLiteral extends Literal>(literal_: TLiteral): LiteralSchema<TLiteral, undefined>;
/**
* Creates a literal schema.
*
* @param literal_ The literal value.
* @param message The error message.
*
* @returns A literal schema.
*/
declare function literal<const TLiteral extends Literal, const TMessage extends ErrorMessage<LiteralIssue> | undefined>(literal_: TLiteral, message: TMessage): LiteralSchema<TLiteral, TMessage>;
//#endregion
//#region src/schemas/looseObject/types.d.ts
/**
* Loose object issue interface.
*/
interface LooseObjectIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "loose_object";
  /**
  * The expected property.
  */
  readonly expected: "Object" | `"${string}"`;
}
//#endregion
//#region src/schemas/looseObject/looseObject.d.ts
/**
* Loose object schema interface.
*/
interface LooseObjectSchema<TEntries$1 extends ObjectEntries, TMessage extends ErrorMessage<LooseObjectIssue> | undefined> extends BaseSchema<InferObjectInput<TEntries$1> & {
  [key: string]: unknown;
}, InferObjectOutput<TEntries$1> & {
  [key: string]: unknown;
}, LooseObjectIssue | InferObjectIssue<TEntries$1>> {
  /**
  * The schema type.
  */
  readonly type: "loose_object";
  /**
  * The schema reference.
  */
  readonly reference: typeof looseObject;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a loose object schema.
*
* @param entries The entries schema.
*
* @returns A loose object schema.
*/
declare function looseObject<const TEntries$1 extends ObjectEntries>(entries: TEntries$1): LooseObjectSchema<TEntries$1, undefined>;
/**
* Creates a loose object schema.
*
* @param entries The entries schema.
* @param message The error message.
*
* @returns A loose object schema.
*/
declare function looseObject<const TEntries$1 extends ObjectEntries, const TMessage extends ErrorMessage<LooseObjectIssue> | undefined>(entries: TEntries$1, message: TMessage): LooseObjectSchema<TEntries$1, TMessage>;
//#endregion
//#region src/schemas/looseObject/looseObjectAsync.d.ts
/**
* Object schema async interface.
*/
interface LooseObjectSchemaAsync<TEntries$1 extends ObjectEntriesAsync, TMessage extends ErrorMessage<LooseObjectIssue> | undefined> extends BaseSchemaAsync<InferObjectInput<TEntries$1> & {
  [key: string]: unknown;
}, InferObjectOutput<TEntries$1> & {
  [key: string]: unknown;
}, LooseObjectIssue | InferObjectIssue<TEntries$1>> {
  /**
  * The schema type.
  */
  readonly type: "loose_object";
  /**
  * The schema reference.
  */
  readonly reference: typeof looseObject | typeof looseObjectAsync;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a loose object schema.
*
* @param entries The entries schema.
*
* @returns A loose object schema.
*/
declare function looseObjectAsync<const TEntries$1 extends ObjectEntriesAsync>(entries: TEntries$1): LooseObjectSchemaAsync<TEntries$1, undefined>;
/**
* Creates a loose object schema.
*
* @param entries The entries schema.
* @param message The error message.
*
* @returns A loose object schema.
*/
declare function looseObjectAsync<const TEntries$1 extends ObjectEntriesAsync, const TMessage extends ErrorMessage<LooseObjectIssue> | undefined>(entries: TEntries$1, message: TMessage): LooseObjectSchemaAsync<TEntries$1, TMessage>;
//#endregion
//#region src/schemas/nullish/types.d.ts
/**
* Infer nullish output type.
*/
type InferNullishOutput<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped$1, null | undefined>> = undefined extends TDefault ? InferOutput<TWrapped$1> | null | undefined : InferOutput<TWrapped$1> | Extract<DefaultValue<TDefault>, null | undefined>;
//#endregion
//#region src/schemas/nullish/nullish.d.ts
/**
* Nullish schema interface.
*/
interface NullishSchema<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped$1, null | undefined>> extends BaseSchema<InferInput<TWrapped$1> | null | undefined, InferNullishOutput<TWrapped$1, TDefault>, InferIssue<TWrapped$1>> {
  /**
  * The schema type.
  */
  readonly type: "nullish";
  /**
  * The schema reference.
  */
  readonly reference: typeof nullish;
  /**
  * The expected property.
  */
  readonly expects: `(${TWrapped$1["expects"]} | null | undefined)`;
  /**
  * The wrapped schema.
  */
  readonly wrapped: TWrapped$1;
  /**
  * The default value.
  */
  readonly default: TDefault;
}
/**
* Creates a nullish schema.
*
* @param wrapped The wrapped schema.
*
* @returns A nullish schema.
*/
declare function nullish<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped$1): NullishSchema<TWrapped$1, undefined>;
/**
* Creates a nullish schema.
*
* @param wrapped The wrapped schema.
* @param default_ The default value.
*
* @returns A nullish schema.
*/
declare function nullish<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped$1, null | undefined>>(wrapped: TWrapped$1, default_: TDefault): NullishSchema<TWrapped$1, TDefault>;
//#endregion
//#region src/schemas/nullish/nullishAsync.d.ts
/**
* Nullish schema async interface.
*/
interface NullishSchemaAsync<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped$1, null | undefined>> extends BaseSchemaAsync<InferInput<TWrapped$1> | null | undefined, InferNullishOutput<TWrapped$1, TDefault>, InferIssue<TWrapped$1>> {
  /**
  * The schema type.
  */
  readonly type: "nullish";
  /**
  * The schema reference.
  */
  readonly reference: typeof nullish | typeof nullishAsync;
  /**
  * The expected property.
  */
  readonly expects: `(${TWrapped$1["expects"]} | null | undefined)`;
  /**
  * The wrapped schema.
  */
  readonly wrapped: TWrapped$1;
  /**
  * The default value.
  */
  readonly default: TDefault;
}
/**
* Creates a nullish schema.
*
* @param wrapped The wrapped schema.
*
* @returns A nullish schema.
*/
declare function nullishAsync<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped$1): NullishSchemaAsync<TWrapped$1, undefined>;
/**
* Creates a nullish schema.
*
* @param wrapped The wrapped schema.
* @param default_ The default value.
*
* @returns A nullish schema.
*/
declare function nullishAsync<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped$1, null | undefined>>(wrapped: TWrapped$1, default_: TDefault): NullishSchemaAsync<TWrapped$1, TDefault>;
//#endregion
//#region src/schemas/number/number.d.ts
/**
* Number issue interface.
*/
interface NumberIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "number";
  /**
  * The expected property.
  */
  readonly expected: "number";
}
/**
* Number schema interface.
*/
interface NumberSchema<TMessage extends ErrorMessage<NumberIssue> | undefined> extends BaseSchema<number, number, NumberIssue> {
  /**
  * The schema type.
  */
  readonly type: "number";
  /**
  * The schema reference.
  */
  readonly reference: typeof number;
  /**
  * The expected property.
  */
  readonly expects: "number";
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a number schema.
*
* @returns A number schema.
*/
declare function number(): NumberSchema<undefined>;
/**
* Creates a number schema.
*
* @param message The error message.
*
* @returns A number schema.
*/
declare function number<const TMessage extends ErrorMessage<NumberIssue> | undefined>(message: TMessage): NumberSchema<TMessage>;
//#endregion
//#region src/schemas/object/types.d.ts
/**
* Object issue interface.
*/
interface ObjectIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "object";
  /**
  * The expected property.
  */
  readonly expected: "Object" | `"${string}"`;
}
//#endregion
//#region src/schemas/object/object.d.ts
/**
* Object schema interface.
*/
interface ObjectSchema<TEntries$1 extends ObjectEntries, TMessage extends ErrorMessage<ObjectIssue> | undefined> extends BaseSchema<InferObjectInput<TEntries$1>, InferObjectOutput<TEntries$1>, ObjectIssue | InferObjectIssue<TEntries$1>> {
  /**
  * The schema type.
  */
  readonly type: "object";
  /**
  * The schema reference.
  */
  readonly reference: typeof object;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates an object schema.
*
* Hint: This schema removes unknown entries. The output will only include the
* entries you specify. To include unknown entries, use `looseObject`. To
* return an issue for unknown entries, use `strictObject`. To include and
* validate unknown entries, use `objectWithRest`.
*
* @param entries The entries schema.
*
* @returns An object schema.
*/
declare function object<const TEntries$1 extends ObjectEntries>(entries: TEntries$1): ObjectSchema<TEntries$1, undefined>;
/**
* Creates an object schema.
*
* Hint: This schema removes unknown entries. The output will only include the
* entries you specify. To include unknown entries, use `looseObject`. To
* return an issue for unknown entries, use `strictObject`. To include and
* validate unknown entries, use `objectWithRest`.
*
* @param entries The entries schema.
* @param message The error message.
*
* @returns An object schema.
*/
declare function object<const TEntries$1 extends ObjectEntries, const TMessage extends ErrorMessage<ObjectIssue> | undefined>(entries: TEntries$1, message: TMessage): ObjectSchema<TEntries$1, TMessage>;
//#endregion
//#region src/schemas/object/objectAsync.d.ts
/**
* Object schema async interface.
*/
interface ObjectSchemaAsync<TEntries$1 extends ObjectEntriesAsync, TMessage extends ErrorMessage<ObjectIssue> | undefined> extends BaseSchemaAsync<InferObjectInput<TEntries$1>, InferObjectOutput<TEntries$1>, ObjectIssue | InferObjectIssue<TEntries$1>> {
  /**
  * The schema type.
  */
  readonly type: "object";
  /**
  * The schema reference.
  */
  readonly reference: typeof object | typeof objectAsync;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates an object schema.
*
* Hint: This schema removes unknown entries. The output will only include the
* entries you specify. To include unknown entries, use `looseObjectAsync`. To
* return an issue for unknown entries, use `strictObjectAsync`. To include and
* validate unknown entries, use `objectWithRestAsync`.
*
* @param entries The entries schema.
*
* @returns An object schema.
*/
declare function objectAsync<const TEntries$1 extends ObjectEntriesAsync>(entries: TEntries$1): ObjectSchemaAsync<TEntries$1, undefined>;
/**
* Creates an object schema.
*
* Hint: This schema removes unknown entries. The output will only include the
* entries you specify. To include unknown entries, use `looseObjectAsync`. To
* return an issue for unknown entries, use `strictObjectAsync`. To include and
* validate unknown entries, use `objectWithRestAsync`.
*
* @param entries The entries schema.
* @param message The error message.
*
* @returns An object schema.
*/
declare function objectAsync<const TEntries$1 extends ObjectEntriesAsync, const TMessage extends ErrorMessage<ObjectIssue> | undefined>(entries: TEntries$1, message: TMessage): ObjectSchemaAsync<TEntries$1, TMessage>;
//#endregion
//#region src/schemas/objectWithRest/types.d.ts
/**
* Object with rest issue interface.
*/
interface ObjectWithRestIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "object_with_rest";
  /**
  * The expected property.
  */
  readonly expected: "Object" | `"${string}"`;
}
//#endregion
//#region src/schemas/objectWithRest/objectWithRest.d.ts
/**
* Object with rest schema interface.
*/
interface ObjectWithRestSchema<TEntries$1 extends ObjectEntries, TRest$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TMessage extends ErrorMessage<ObjectWithRestIssue> | undefined> extends BaseSchema<InferObjectInput<TEntries$1> & {
  [key: string]: InferInput<TRest$1>;
}, InferObjectOutput<TEntries$1> & {
  [key: string]: InferOutput<TRest$1>;
}, ObjectWithRestIssue | InferObjectIssue<TEntries$1> | InferIssue<TRest$1>> {
  /**
  * The schema type.
  */
  readonly type: "object_with_rest";
  /**
  * The schema reference.
  */
  readonly reference: typeof objectWithRest;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The rest schema.
  */
  readonly rest: TRest$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates an object with rest schema.
*
* @param entries The entries schema.
* @param rest The rest schema.
*
* @returns An object with rest schema.
*/
declare function objectWithRest<const TEntries$1 extends ObjectEntries, const TRest$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(entries: TEntries$1, rest: TRest$1): ObjectWithRestSchema<TEntries$1, TRest$1, undefined>;
/**
* Creates an object with rest schema.
*
* @param entries The entries schema.
* @param rest The rest schema.
* @param message The error message.
*
* @returns An object with rest schema.
*/
declare function objectWithRest<const TEntries$1 extends ObjectEntries, const TRest$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<ObjectWithRestIssue> | undefined>(entries: TEntries$1, rest: TRest$1, message: TMessage): ObjectWithRestSchema<TEntries$1, TRest$1, TMessage>;
//#endregion
//#region src/schemas/objectWithRest/objectWithRestAsync.d.ts
/**
* Object schema async interface.
*/
interface ObjectWithRestSchemaAsync<TEntries$1 extends ObjectEntriesAsync, TRest$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TMessage extends ErrorMessage<ObjectWithRestIssue> | undefined> extends BaseSchemaAsync<InferObjectInput<TEntries$1> & {
  [key: string]: InferInput<TRest$1>;
}, InferObjectOutput<TEntries$1> & {
  [key: string]: InferOutput<TRest$1>;
}, ObjectWithRestIssue | InferObjectIssue<TEntries$1> | InferIssue<TRest$1>> {
  /**
  * The schema type.
  */
  readonly type: "object_with_rest";
  /**
  * The schema reference.
  */
  readonly reference: typeof objectWithRest | typeof objectWithRestAsync;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The rest schema.
  */
  readonly rest: TRest$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates an object with rest schema.
*
* @param entries The entries schema.
* @param rest The rest schema.
*
* @returns An object with rest schema.
*/
declare function objectWithRestAsync<const TEntries$1 extends ObjectEntriesAsync, const TRest$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(entries: TEntries$1, rest: TRest$1): ObjectWithRestSchemaAsync<TEntries$1, TRest$1, undefined>;
/**
* Creates an object with rest schema.
*
* @param entries The entries schema.
* @param rest The rest schema.
* @param message The error message.
*
* @returns An object with rest schema.
*/
declare function objectWithRestAsync<const TEntries$1 extends ObjectEntriesAsync, const TRest$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<ObjectWithRestIssue> | undefined>(entries: TEntries$1, rest: TRest$1, message: TMessage): ObjectWithRestSchemaAsync<TEntries$1, TRest$1, TMessage>;
//#endregion
//#region src/schemas/optional/types.d.ts
/**
* Infer optional output type.
*/
type InferOptionalOutput<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped$1, undefined>> = undefined extends TDefault ? InferOutput<TWrapped$1> | undefined : InferOutput<TWrapped$1> | Extract<DefaultValue<TDefault>, undefined>;
//#endregion
//#region src/schemas/optional/optional.d.ts
/**
* Optional schema interface.
*/
interface OptionalSchema<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped$1, undefined>> extends BaseSchema<InferInput<TWrapped$1> | undefined, InferOptionalOutput<TWrapped$1, TDefault>, InferIssue<TWrapped$1>> {
  /**
  * The schema type.
  */
  readonly type: "optional";
  /**
  * The schema reference.
  */
  readonly reference: typeof optional;
  /**
  * The expected property.
  */
  readonly expects: `(${TWrapped$1["expects"]} | undefined)`;
  /**
  * The wrapped schema.
  */
  readonly wrapped: TWrapped$1;
  /**
  * The default value.
  */
  readonly default: TDefault;
}
/**
* Creates an optional schema.
*
* @param wrapped The wrapped schema.
*
* @returns An optional schema.
*/
declare function optional<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped$1): OptionalSchema<TWrapped$1, undefined>;
/**
* Creates an optional schema.
*
* @param wrapped The wrapped schema.
* @param default_ The default value.
*
* @returns An optional schema.
*/
declare function optional<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped$1, undefined>>(wrapped: TWrapped$1, default_: TDefault): OptionalSchema<TWrapped$1, TDefault>;
//#endregion
//#region src/schemas/optional/optionalAsync.d.ts
/**
* Optional schema async interface.
*/
interface OptionalSchemaAsync<TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped$1, undefined>> extends BaseSchemaAsync<InferInput<TWrapped$1> | undefined, InferOptionalOutput<TWrapped$1, TDefault>, InferIssue<TWrapped$1>> {
  /**
  * The schema type.
  */
  readonly type: "optional";
  /**
  * The schema reference.
  */
  readonly reference: typeof optional | typeof optionalAsync;
  /**
  * The expected property.
  */
  readonly expects: `(${TWrapped$1["expects"]} | undefined)`;
  /**
  * The wrapped schema.
  */
  readonly wrapped: TWrapped$1;
  /**
  * The default value.
  */
  readonly default: TDefault;
}
/**
* Creates an optional schema.
*
* @param wrapped The wrapped schema.
*
* @returns An optional schema.
*/
declare function optionalAsync<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>>(wrapped: TWrapped$1): OptionalSchemaAsync<TWrapped$1, undefined>;
/**
* Creates an optional schema.
*
* @param wrapped The wrapped schema.
* @param default_ The default value.
*
* @returns An optional schema.
*/
declare function optionalAsync<const TWrapped$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped$1, undefined>>(wrapped: TWrapped$1, default_: TDefault): OptionalSchemaAsync<TWrapped$1, TDefault>;
//#endregion
//#region src/schemas/record/types.d.ts
/**
* Record issue interface.
*/
interface RecordIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "record";
  /**
  * The expected property.
  */
  readonly expected: "Object";
}
/**
* Is literal type.
*/
type IsLiteral<TKey$1 extends string | number | symbol> = string extends TKey$1 ? false : number extends TKey$1 ? false : symbol extends TKey$1 ? false : TKey$1 extends Brand<string | number | symbol> ? false : true;
/**
* Optional keys type.
*/
type OptionalKeys<TObject extends Record<string | number | symbol, unknown>> = { [TKey in keyof TObject]: IsLiteral<TKey> extends true ? TKey : never }[keyof TObject];
/**
* With question marks type.
*
* Hint: We mark an entry as optional if we detect that its key is a literal
* type. The reason for this is that it is not technically possible to detect
* missing literal keys without restricting the key schema to `string`, `enum`
* and `picklist`. However, if `enum` and `picklist` are used, it is better to
* use `object` with `entriesFromList` because it already covers the needed
* functionality. This decision also reduces the bundle size of `record`,
* because it only needs to check the entries of the input and not any missing
* keys.
*/
type WithQuestionMarks<TObject extends Record<string | number | symbol, unknown>> = MarkOptional<TObject, OptionalKeys<TObject>>;
/**
* With readonly type.
*/
type WithReadonly<TValue$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TObject extends WithQuestionMarks<Record<string | number | symbol, unknown>>> = TValue$1 extends {
  readonly pipe: readonly unknown[];
} ? ReadonlyAction<any> extends TValue$1["pipe"][number] ? Readonly<TObject> : TObject : TObject;
/**
* Infer record input type.
*/
type InferRecordInput<TKey$1 extends BaseSchema<string, string | number | symbol, BaseIssue<unknown>> | BaseSchemaAsync<string, string | number | symbol, BaseIssue<unknown>>, TValue$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>> = Prettify<WithQuestionMarks<Record<InferInput<TKey$1>, InferInput<TValue$1>>>>;
/**
* Infer record output type.
*/
type InferRecordOutput<TKey$1 extends BaseSchema<string, string | number | symbol, BaseIssue<unknown>> | BaseSchemaAsync<string, string | number | symbol, BaseIssue<unknown>>, TValue$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>> = Prettify<WithReadonly<TValue$1, WithQuestionMarks<Record<InferOutput<TKey$1>, InferOutput<TValue$1>>>>>;
//#endregion
//#region src/schemas/record/record.d.ts
/**
* Record schema interface.
*/
interface RecordSchema<TKey$1 extends BaseSchema<string, string | number | symbol, BaseIssue<unknown>>, TValue$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TMessage extends ErrorMessage<RecordIssue> | undefined> extends BaseSchema<InferRecordInput<TKey$1, TValue$1>, InferRecordOutput<TKey$1, TValue$1>, RecordIssue | InferIssue<TKey$1> | InferIssue<TValue$1>> {
  /**
  * The schema type.
  */
  readonly type: "record";
  /**
  * The schema reference.
  */
  readonly reference: typeof record;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The record key schema.
  */
  readonly key: TKey$1;
  /**
  * The record value schema.
  */
  readonly value: TValue$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a record schema.
*
* @param key The key schema.
* @param value The value schema.
*
* @returns A record schema.
*/
declare function record<const TKey$1 extends BaseSchema<string, string | number | symbol, BaseIssue<unknown>>, const TValue$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>>(key: TKey$1, value: TValue$1): RecordSchema<TKey$1, TValue$1, undefined>;
/**
* Creates a record schema.
*
* @param key The key schema.
* @param value The value schema.
* @param message The error message.
*
* @returns A record schema.
*/
declare function record<const TKey$1 extends BaseSchema<string, string | number | symbol, BaseIssue<unknown>>, const TValue$1 extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<RecordIssue> | undefined>(key: TKey$1, value: TValue$1, message: TMessage): RecordSchema<TKey$1, TValue$1, TMessage>;
//#endregion
//#region src/schemas/strictObject/types.d.ts
/**
* Strict object issue interface.
*/
interface StrictObjectIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "strict_object";
  /**
  * The expected property.
  */
  readonly expected: "Object" | `"${string}"` | "never";
}
//#endregion
//#region src/schemas/strictObject/strictObject.d.ts
/**
* Strict object schema interface.
*/
interface StrictObjectSchema<TEntries$1 extends ObjectEntries, TMessage extends ErrorMessage<StrictObjectIssue> | undefined> extends BaseSchema<InferObjectInput<TEntries$1>, InferObjectOutput<TEntries$1>, StrictObjectIssue | InferObjectIssue<TEntries$1>> {
  /**
  * The schema type.
  */
  readonly type: "strict_object";
  /**
  * The schema reference.
  */
  readonly reference: typeof strictObject;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a strict object schema.
*
* @param entries The entries schema.
*
* @returns A strict object schema.
*/
declare function strictObject<const TEntries$1 extends ObjectEntries>(entries: TEntries$1): StrictObjectSchema<TEntries$1, undefined>;
/**
* Creates a strict object schema.
*
* @param entries The entries schema.
* @param message The error message.
*
* @returns A strict object schema.
*/
declare function strictObject<const TEntries$1 extends ObjectEntries, const TMessage extends ErrorMessage<StrictObjectIssue> | undefined>(entries: TEntries$1, message: TMessage): StrictObjectSchema<TEntries$1, TMessage>;
//#endregion
//#region src/schemas/strictObject/strictObjectAsync.d.ts
/**
* Strict object schema async interface.
*/
interface StrictObjectSchemaAsync<TEntries$1 extends ObjectEntriesAsync, TMessage extends ErrorMessage<StrictObjectIssue> | undefined> extends BaseSchemaAsync<InferObjectInput<TEntries$1>, InferObjectOutput<TEntries$1>, StrictObjectIssue | InferObjectIssue<TEntries$1>> {
  /**
  * The schema type.
  */
  readonly type: "strict_object";
  /**
  * The schema reference.
  */
  readonly reference: typeof strictObject | typeof strictObjectAsync;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The entries schema.
  */
  readonly entries: TEntries$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a strict object schema.
*
* @param entries The entries schema.
*
* @returns A strict object schema.
*/
declare function strictObjectAsync<const TEntries$1 extends ObjectEntriesAsync>(entries: TEntries$1): StrictObjectSchemaAsync<TEntries$1, undefined>;
/**
* Creates a strict object schema.
*
* @param entries The entries schema.
* @param message The error message.
*
* @returns A strict object schema.
*/
declare function strictObjectAsync<const TEntries$1 extends ObjectEntriesAsync, const TMessage extends ErrorMessage<StrictObjectIssue> | undefined>(entries: TEntries$1, message: TMessage): StrictObjectSchemaAsync<TEntries$1, TMessage>;
//#endregion
//#region src/schemas/string/string.d.ts
/**
* String issue interface.
*/
interface StringIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "string";
  /**
  * The expected property.
  */
  readonly expected: "string";
}
/**
* String schema interface.
*/
interface StringSchema<TMessage extends ErrorMessage<StringIssue> | undefined> extends BaseSchema<string, string, StringIssue> {
  /**
  * The schema type.
  */
  readonly type: "string";
  /**
  * The schema reference.
  */
  readonly reference: typeof string;
  /**
  * The expected property.
  */
  readonly expects: "string";
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a string schema.
*
* @returns A string schema.
*/
declare function string(): StringSchema<undefined>;
/**
* Creates a string schema.
*
* @param message The error message.
*
* @returns A string schema.
*/
declare function string<const TMessage extends ErrorMessage<StringIssue> | undefined>(message: TMessage): StringSchema<TMessage>;
//#endregion
//#region src/schemas/undefined/undefined.d.ts
/**
* Undefined issue interface.
*/
interface UndefinedIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "undefined";
  /**
  * The expected property.
  */
  readonly expected: "undefined";
}
/**
* Undefined schema interface.
*/
interface UndefinedSchema<TMessage extends ErrorMessage<UndefinedIssue> | undefined> extends BaseSchema<undefined, undefined, UndefinedIssue> {
  /**
  * The schema type.
  */
  readonly type: "undefined";
  /**
  * The schema reference.
  */
  readonly reference: typeof undefined_;
  /**
  * The expected property.
  */
  readonly expects: "undefined";
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates an undefined schema.
*
* @returns An undefined schema.
*/
declare function undefined_(): UndefinedSchema<undefined>;
/**
* Creates an undefined schema.
*
* @param message The error message.
*
* @returns An undefined schema.
*/
declare function undefined_<const TMessage extends ErrorMessage<UndefinedIssue> | undefined>(message: TMessage): UndefinedSchema<TMessage>;
//#endregion
//#region src/schemas/variant/variant.d.ts
/**
* Variant schema interface.
*/
interface VariantSchema<TKey$1 extends string, TOptions$1 extends VariantOptions<TKey$1>, TMessage extends ErrorMessage<VariantIssue> | undefined> extends BaseSchema<InferInput<TOptions$1[number]>, InferOutput<TOptions$1[number]>, VariantIssue | InferVariantIssue<TOptions$1>> {
  /**
  * The schema type.
  */
  readonly type: "variant";
  /**
  * The schema reference.
  */
  readonly reference: typeof variant;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The discriminator key.
  */
  readonly key: TKey$1;
  /**
  * The variant options.
  */
  readonly options: TOptions$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a variant schema.
*
* @param key The discriminator key.
* @param options The variant options.
*
* @returns A variant schema.
*/
declare function variant<const TKey$1 extends string, const TOptions$1 extends VariantOptions<TKey$1>>(key: TKey$1, options: TOptions$1): VariantSchema<TKey$1, TOptions$1, undefined>;
/**
* Creates a variant schema.
*
* @param key The discriminator key.
* @param options The variant options.
* @param message The error message.
*
* @returns An variant schema.
*/
declare function variant<const TKey$1 extends string, const TOptions$1 extends VariantOptions<TKey$1>, const TMessage extends ErrorMessage<VariantIssue> | undefined>(key: TKey$1, options: TOptions$1, message: TMessage): VariantSchema<TKey$1, TOptions$1, TMessage>;
//#endregion
//#region src/schemas/variant/variantAsync.d.ts
/**
* Variant schema async interface.
*/
interface VariantSchemaAsync<TKey$1 extends string, TOptions$1 extends VariantOptionsAsync<TKey$1>, TMessage extends ErrorMessage<VariantIssue> | undefined> extends BaseSchemaAsync<InferInput<TOptions$1[number]>, InferOutput<TOptions$1[number]>, VariantIssue | InferVariantIssue<TOptions$1>> {
  /**
  * The schema type.
  */
  readonly type: "variant";
  /**
  * The schema reference.
  */
  readonly reference: typeof variant | typeof variantAsync;
  /**
  * The expected property.
  */
  readonly expects: "Object";
  /**
  * The discriminator key.
  */
  readonly key: TKey$1;
  /**
  * The variant options.
  */
  readonly options: TOptions$1;
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a variant schema.
*
* @param key The discriminator key.
* @param options The variant options.
*
* @returns A variant schema.
*/
declare function variantAsync<const TKey$1 extends string, const TOptions$1 extends VariantOptionsAsync<TKey$1>>(key: TKey$1, options: TOptions$1): VariantSchemaAsync<TKey$1, TOptions$1, undefined>;
/**
* Creates a variant schema.
*
* @param key The discriminator key.
* @param options The variant options.
* @param message The error message.
*
* @returns An variant schema.
*/
declare function variantAsync<const TKey$1 extends string, const TOptions$1 extends VariantOptionsAsync<TKey$1>, const TMessage extends ErrorMessage<VariantIssue> | undefined>(key: TKey$1, options: TOptions$1, message: TMessage): VariantSchemaAsync<TKey$1, TOptions$1, TMessage>;
//#endregion
//#region src/schemas/variant/types.d.ts
/**
* Variant issue interface.
*/
interface VariantIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "variant";
  /**
  * The expected property.
  */
  readonly expected: string;
}
/**
* Variant option schema interface.
*/
interface VariantOptionSchema<TKey$1 extends string> extends BaseSchema<unknown, unknown, VariantIssue | BaseIssue<unknown>> {
  readonly type: "variant";
  readonly reference: typeof variant;
  readonly key: string;
  readonly options: VariantOptions<TKey$1>;
  readonly message: ErrorMessage<VariantIssue> | undefined;
}
/**
* Variant option schema async interface.
*/
interface VariantOptionSchemaAsync<TKey$1 extends string> extends BaseSchemaAsync<unknown, unknown, VariantIssue | BaseIssue<unknown>> {
  readonly type: "variant";
  readonly reference: typeof variant | typeof variantAsync;
  readonly key: string;
  readonly options: VariantOptionsAsync<TKey$1>;
  readonly message: ErrorMessage<VariantIssue> | undefined;
}
/**
* Variant object entries type.
*/
type VariantObjectEntries<TKey$1 extends string> = Record<TKey$1, BaseSchema<unknown, unknown, BaseIssue<unknown>> | OptionalEntrySchema> & ObjectEntries;
/**
* Variant object entries async type.
*/
type VariantObjectEntriesAsync<TKey$1 extends string> = Record<TKey$1, BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>> | OptionalEntrySchema | OptionalEntrySchemaAsync> & ObjectEntriesAsync;
/**
* Variant option type.
*/
type VariantOption<TKey$1 extends string> = LooseObjectSchema<VariantObjectEntries<TKey$1>, ErrorMessage<LooseObjectIssue> | undefined> | ObjectSchema<VariantObjectEntries<TKey$1>, ErrorMessage<ObjectIssue> | undefined> | ObjectWithRestSchema<VariantObjectEntries<TKey$1>, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined> | StrictObjectSchema<VariantObjectEntries<TKey$1>, ErrorMessage<StrictObjectIssue> | undefined> | VariantOptionSchema<TKey$1>;
/**
* Variant option async type.
*/
type VariantOptionAsync<TKey$1 extends string> = LooseObjectSchemaAsync<VariantObjectEntriesAsync<TKey$1>, ErrorMessage<LooseObjectIssue> | undefined> | ObjectSchemaAsync<VariantObjectEntriesAsync<TKey$1>, ErrorMessage<ObjectIssue> | undefined> | ObjectWithRestSchemaAsync<VariantObjectEntriesAsync<TKey$1>, BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<ObjectWithRestIssue> | undefined> | StrictObjectSchemaAsync<VariantObjectEntriesAsync<TKey$1>, ErrorMessage<StrictObjectIssue> | undefined> | VariantOptionSchemaAsync<TKey$1>;
/**
* Variant options type.
*/
type VariantOptions<TKey$1 extends string> = MaybeReadonly<VariantOption<TKey$1>[]>;
/**
* Variant options async type.
*/
type VariantOptionsAsync<TKey$1 extends string> = MaybeReadonly<(VariantOption<TKey$1> | VariantOptionAsync<TKey$1>)[]>;
/**
* Infer variant issue type.
*/
type InferVariantIssue<TOptions$1 extends VariantOptions<string> | VariantOptionsAsync<string>> = Exclude<InferIssue<TOptions$1[number]>, {
  type: "loose_object" | "object" | "object_with_rest";
}>;
//#endregion
//#region src/schemas/void/void.d.ts
/**
* Void issue interface.
*/
interface VoidIssue extends BaseIssue<unknown> {
  /**
  * The issue kind.
  */
  readonly kind: "schema";
  /**
  * The issue type.
  */
  readonly type: "void";
  /**
  * The expected property.
  */
  readonly expected: "void";
}
/**
* Void schema interface.
*/
interface VoidSchema<TMessage extends ErrorMessage<VoidIssue> | undefined> extends BaseSchema<void, void, VoidIssue> {
  /**
  * The schema type.
  */
  readonly type: "void";
  /**
  * The schema reference.
  */
  readonly reference: typeof void_;
  /**
  * The expected property.
  */
  readonly expects: "void";
  /**
  * The error message.
  */
  readonly message: TMessage;
}
/**
* Creates a void schema.
*
* @returns A void schema.
*/
declare function void_(): VoidSchema<undefined>;
/**
* Creates a void schema.
*
* @param message The error message.
*
* @returns A void schema.
*/
declare function void_<const TMessage extends ErrorMessage<VoidIssue> | undefined>(message: TMessage): VoidSchema<TMessage>;
//#endregion
//#region src/actions/brand/brand.d.ts
/**
* Brand symbol.
*/
declare const BrandSymbol: unique symbol;
/**
* Brand name type.
*/
type BrandName = string | number | symbol;
/**
* Brand interface.
*/
interface Brand<TName extends BrandName> {
  [BrandSymbol]: { [TValue in TName]: TValue };
}
//#endregion
//#region src/actions/description/description.d.ts
/**
* Description action interface.
*/
interface DescriptionAction<TInput$1, TDescription extends string> extends BaseMetadata<TInput$1> {
  /**
  * The action type.
  */
  readonly type: "description";
  /**
  * The action reference.
  */
  readonly reference: typeof description;
  /**
  * The description text.
  */
  readonly description: TDescription;
}
/**
* Creates a description metadata action.
*
* @param description_ The description text.
*
* @returns A description action.
*/
declare function description<TInput$1, TDescription extends string>(description_: TDescription): DescriptionAction<TInput$1, TDescription>;
//#endregion
//#region src/actions/readonly/readonly.d.ts
/**
* Readonly output type.
*/
type ReadonlyOutput<TInput$1> = TInput$1 extends Map<infer TKey, infer TValue> ? ReadonlyMap<TKey, TValue> : TInput$1 extends Set<infer TValue> ? ReadonlySet<TValue> : Readonly<TInput$1>;
/**
* Readonly action interface.
*/
interface ReadonlyAction<TInput$1> extends BaseTransformation<TInput$1, ReadonlyOutput<TInput$1>, never> {
  /**
  * The action type.
  */
  readonly type: "readonly";
  /**
  * The action reference.
  */
  readonly reference: typeof readonly;
}
/**
* Creates a readonly transformation action.
*
* @returns A readonly action.
*/
declare function readonly<TInput$1>(): ReadonlyAction<TInput$1>;

/**
 * Builder-agnostic change-detection adapter contract.
 *
 * The detector is owned by `code/core/src/core-server/change-detection/` and never imports a
 * builder package. Each builder ships its own `ChangeDetectionAdapter` implementation that
 * (a) supplies static resolve config once at start, and (b) pushes file-system events as
 * they occur.
 *
 * Builder-vite is the first consumer (see `code/builders/builder-vite/src/change-detection-adapter/`).
 */

type FileChangeEvent = {
    kind: 'add';
    path: string;
} | {
    kind: 'change';
    path: string;
} | {
    kind: 'unlink';
    path: string;
};
interface ChangeDetectionAdapter {
    /** Pull: builder produces resolve-config once at start; detector caches it. */
    getResolveConfig(): Promise<ModuleResolveConfig>;
    /** Push: builder reports file-system events; returns an unsubscribe function. */
    onFileChange(handler: (event: FileChangeEvent) => void): () => void;
    /** Optional: builder reports a startup failure so the detector can mark itself unavailable. */
    onStartupFailure?(handler: (event: {
        reason: string;
        error?: Error;
    }) => void): () => void;
}

/** Free-form error attached to a payload or subcomponent. */
interface DocgenError {
    name: string;
    message: string;
}
/** Compact JSDoc tag map: tag name → list of tag values (e.g. `@example a` → `{ example: ['a'] }`). */
type DocgenJsDocTags = Record<string, string[]>;
/**
 * Docgen payload returned by `core/docgen`'s `docgen` query.
 *
 * Component-only fields (props, descriptions, subcomponents). Story snippets and file-level
 * imports live in `core/story-docs` when `experimentalDocgenServer` is enabled.
 */
interface DocgenPayload {
    id: string;
    name: string;
    /** CSF story file import path from the index entry (same as component manifest `path`). */
    path: string;
    description?: string;
    summary?: string;
    jsDocTags: DocgenJsDocTags;
    /** Renderer-converted argTypes derived from integration-specific docgen data at write time. */
    argTypes?: StrictArgTypes$1;
    subcomponents?: Record<string, DocgenSubcomponent>;
    error?: DocgenError;
    [key: string]: unknown;
}
/** Component-level summary + docgen for one subcomponent. */
interface DocgenSubcomponent {
    name: string;
    path: string;
    description?: string;
    summary?: string;
    import?: string;
    jsDocTags: DocgenJsDocTags;
    /** Renderer-converted argTypes derived from integration-specific docgen data at write time. */
    argTypes?: StrictArgTypes$1;
    error?: DocgenError;
    [key: string]: unknown;
}

/** Free-form error attached to a story snippet entry. */
interface StoryDocsError {
    name: string;
    message: string;
}
/** Snippet + metadata for one story under a component. */
interface StoryDoc {
    id: string;
    name: string;
    snippet?: string;
    description?: string;
    summary?: string;
    error?: StoryDocsError;
}
/** Story docs keyed by story id for O(1) lookup and fine-grained open-service subscriptions. */
type StoryDocsById = Record<string, StoryDoc>;
/**
 * Story-docs payload returned by `core/story-docs`'s `storyDocs` query.
 *
 * Carries per-story snippets and descriptions plus file-level import statements. Import snippets
 * do not currently honor the component `@import` JSDoc override tag — see the story-docs service
 * README for details.
 */
interface StoryDocsPayload {
    id: string;
    name: string;
    /** CSF story file import path from the index entry. */
    path: string;
    /** Suggested import statement(s) prepended to story snippets in docs. */
    import?: string;
    stories: StoryDocsById;
    error?: StoryDocsError;
}

type StoryDocsServiceState = {
    /** Extracted story docs keyed by component id. Populated by the `extractStoryDocs` command. */
    components: Record<string, StoryDocsPayload>;
};

interface SBBaseType {
    required?: boolean;
    raw?: string;
}
type SBScalarType = SBBaseType & {
    name: 'boolean' | 'string' | 'number' | 'function' | 'symbol' | 'date';
};
type SBArrayType = SBBaseType & {
    name: 'array';
    value: SBType;
};
type SBNodeType = SBBaseType & {
    name: 'node';
    renderer: string;
};
type SBObjectType = SBBaseType & {
    name: 'object';
    value: Record<string, SBType>;
};
type SBEnumType = SBBaseType & {
    name: 'enum';
    value: (string | number)[];
};
type SBIntersectionType = SBBaseType & {
    name: 'intersection';
    value: SBType[];
};
type SBUnionType = SBBaseType & {
    name: 'union';
    value: SBType[];
};
type SBLiteralType = SBBaseType & {
    name: 'literal';
    value: unknown;
};
type SBTupleType = SBBaseType & {
    name: 'tuple';
    value: SBType[];
};
type SBOtherType = SBBaseType & {
    name: 'other';
    value: string;
};
type SBType = SBScalarType | SBEnumType | SBArrayType | SBNodeType | SBObjectType | SBIntersectionType | SBUnionType | SBLiteralType | SBTupleType | SBOtherType;

type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
type ConditionalTest = {
    truthy?: boolean;
} | {
    exists: boolean;
} | {
    eq: any;
} | {
    neq: any;
};
type ConditionalValue = {
    arg: string;
} | {
    global: string;
};
type Conditional = ConditionalValue & ConditionalTest;
interface ControlBase {
    [key: string]: any;
    /** @see https://storybook.js.org/docs/api/arg-types#controltype */
    type?: ControlType;
    disable?: boolean;
}
type Control = ControlType | false | (ControlBase & (ControlBase | {
    type: 'color';
    /** @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors */
    presetColors?: string[];
} | {
    type: 'file';
    /** @see https://storybook.js.org/docs/api/arg-types#controlaccept */
    accept?: string;
} | {
    type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select';
    /** @see https://storybook.js.org/docs/api/arg-types#controllabels */
    labels?: {
        [options: string]: string;
    };
} | {
    type: 'number' | 'range';
    /** @see https://storybook.js.org/docs/api/arg-types#controlmax */
    max?: number;
    /** @see https://storybook.js.org/docs/api/arg-types#controlmin */
    min?: number;
    /** @see https://storybook.js.org/docs/api/arg-types#controlstep */
    step?: number;
}));
interface InputType {
    /** @see https://storybook.js.org/docs/api/arg-types#control */
    control?: Control;
    /** @see https://storybook.js.org/docs/api/arg-types#description */
    description?: string;
    /** @see https://storybook.js.org/docs/api/arg-types#if */
    if?: Conditional;
    /** @see https://storybook.js.org/docs/api/arg-types#mapping */
    mapping?: {
        [key: string]: any;
    };
    /** @see https://storybook.js.org/docs/api/arg-types#name */
    name?: string;
    /** @see https://storybook.js.org/docs/api/arg-types#options */
    options?: readonly any[];
    /** @see https://storybook.js.org/docs/api/arg-types#table */
    table?: {
        [key: string]: unknown;
        /** @see https://storybook.js.org/docs/api/arg-types#tablecategory */
        category?: string;
        /** @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue */
        defaultValue?: {
            summary?: string | undefined;
            detail?: string | undefined;
        };
        /** @see https://storybook.js.org/docs/api/arg-types#tabledisable */
        disable?: boolean;
        /** @see https://storybook.js.org/docs/api/arg-types#tablesubcategory */
        subcategory?: string;
        /** @see https://storybook.js.org/docs/api/arg-types#tabletype */
        type?: {
            summary?: string | undefined;
            detail?: string | undefined;
        };
    };
    /** @see https://storybook.js.org/docs/api/arg-types#type */
    type?: SBType | SBScalarType['name'];
    /**
     * @deprecated Use `table.defaultValue.summary` instead.
     * @see https://storybook.js.org/docs/api/arg-types#defaultvalue
     */
    defaultValue?: any;
    [key: string]: any;
}
interface StrictInputType extends InputType {
    name: string;
    type?: SBType;
}
interface Args {
    [name: string]: any;
}
type StrictArgTypes<TArgs = Args> = {
    [name in keyof TArgs]: StrictInputType;
};

type InvalidInternalOperationName<TName extends string> = {
    __internal_naming_error: `Operation "${TName}" has internal: true but must be prefixed with "_"`;
};
type InvalidUnderscoreWithoutInternal<TName extends string> = {
    __internal_naming_error: `Operation "${TName}" is prefixed with "_" and must set internal: true`;
};
type InternalOperationNaming<TKey> = TKey extends string ? TKey extends `_${string}` ? {
    internal: true;
} | InvalidUnderscoreWithoutInternal<TKey> : {
    internal?: false;
} | InvalidInternalOperationName<TKey> : {};
/**
 * Authoring-side query map derived from separate query input/output schema maps.
 *
 * The second mapped-type intersection is deliberate. During experiments, TypeScript would infer
 * the `input` schema for each inline query, but then lose the corresponding `output` schema before
 * it contextually typed sibling callbacks. Repeating the output map through a keyed `output` view
 * keeps each query key's input and output schemas correlated while handlers, load hooks, and
 * static callbacks are being typed.
 */
type DefinedQueries<TState, TQueryInputSchemas extends OperationInputSchemas, TQueryOutputSchemas extends MatchingOutputSchemas<TQueryInputSchemas>, TCommandInputSchemas extends OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas>> = {
    [TKey in keyof TQueryInputSchemas]: QueryDefinition<TState, TQueryInputSchemas[TKey], TQueryOutputSchemas[TKey], TCommandInputSchemas, TCommandOutputSchemas, QueryFunctions<TQueryInputSchemas, TQueryOutputSchemas>> & InternalOperationNaming<TKey>;
} & {
    [TKey in keyof TQueryOutputSchemas]: {
        output: TQueryOutputSchemas[TKey];
    };
};
/**
 * Authoring-side command map derived from separate command input/output schema maps.
 *
 * Commands do not need access to the command schema maps in their own context, but they still
 * benefit from the same key-correlation trick as queries so TypeScript preserves each inline
 * command object's `output` schema while typing its `handler`.
 */
type DefinedCommands<TState, TCommandInputSchemas extends OperationInputSchemas, TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas>, TQueryInputSchemas extends OperationInputSchemas, TQueryOutputSchemas extends MatchingOutputSchemas<TQueryInputSchemas>> = {
    [TKey in keyof TCommandInputSchemas]: CommandDefinition<TState, TCommandInputSchemas[TKey], TCommandOutputSchemas[TKey], TCommandInputSchemas, TCommandOutputSchemas, QueryFunctions<TQueryInputSchemas, TQueryOutputSchemas>> & InternalOperationNaming<TKey>;
} & {
    [TKey in keyof TCommandOutputSchemas]: {
        output: TCommandOutputSchemas[TKey];
    };
};
/**
 * Finalizes a service definition while preserving inline query and command inference.
 *
 * The generic order matters here. We infer the per-operation schema maps first, then derive the
 * concrete query/command definition maps from those schemas. If we instead ask TypeScript to infer
 * the full runtime `ServiceDefinition` maps directly, it widens callback parameters to `unknown`
 * before it has correlated each inline object's `input` and `output` properties.
 */
declare const defineService: <TState extends object, const TQueryInputSchemas extends OperationInputSchemas, const TQueryOutputSchemas extends MatchingOutputSchemas<TQueryInputSchemas>, const TCommandInputSchemas extends OperationInputSchemas, const TCommandOutputSchemas extends MatchingOutputSchemas<TCommandInputSchemas>, const TId extends ServiceId = ServiceId>(def: {
    id: TId;
    description?: string;
    internal?: boolean;
    initialState: ServiceState<TState>;
    queries: DefinedQueries<TState, TQueryInputSchemas, TQueryOutputSchemas, TCommandInputSchemas, TCommandOutputSchemas>;
    commands: DefinedCommands<TState, TCommandInputSchemas, TCommandOutputSchemas, TQueryInputSchemas, TQueryOutputSchemas>;
}) => ServiceDefinition<TState, DefinedQueries<TState, TQueryInputSchemas, TQueryOutputSchemas, TCommandInputSchemas, TCommandOutputSchemas>, DefinedCommands<TState, TCommandInputSchemas, TCommandOutputSchemas, TQueryInputSchemas, TQueryOutputSchemas>, TId>;

declare const serverCoreServiceDefs: (ServiceDefinition<StoryDocsServiceState, {
    readonly storyDocs: QueryDefinition<StoryDocsServiceState, ObjectSchema<{
        readonly id: StringSchema<undefined>;
    }, undefined>, OptionalSchema<ObjectSchema<{
        readonly id: StringSchema<undefined>;
        readonly name: StringSchema<undefined>;
        readonly path: StringSchema<undefined>;
        readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly error: OptionalSchema<ObjectSchema<{
            readonly name: StringSchema<undefined>;
            readonly message: StringSchema<undefined>;
        }, undefined>, undefined>;
    }, undefined>, undefined>, {
        readonly extractStoryDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllStoryDocs: UndefinedSchema<undefined>;
    }, {
        readonly extractStoryDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly extractAllStoryDocs: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storyDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly storyDocsForAllComponents: VoidSchema<undefined>;
    }, {
        readonly storyDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly storyDocsForAllComponents: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"storyDocs\" has internal: true but must be prefixed with \"_\"";
    });
    readonly storyDocsForAllComponents: QueryDefinition<StoryDocsServiceState, VoidSchema<undefined>, RecordSchema<StringSchema<undefined>, ObjectSchema<{
        readonly id: StringSchema<undefined>;
        readonly name: StringSchema<undefined>;
        readonly path: StringSchema<undefined>;
        readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly error: OptionalSchema<ObjectSchema<{
            readonly name: StringSchema<undefined>;
            readonly message: StringSchema<undefined>;
        }, undefined>, undefined>;
    }, undefined>, undefined>, {
        readonly extractStoryDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllStoryDocs: UndefinedSchema<undefined>;
    }, {
        readonly extractStoryDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly extractAllStoryDocs: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storyDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly storyDocsForAllComponents: VoidSchema<undefined>;
    }, {
        readonly storyDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly storyDocsForAllComponents: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"storyDocsForAllComponents\" has internal: true but must be prefixed with \"_\"";
    });
} & {
    readonly storyDocs: {
        output: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
    };
    readonly storyDocsForAllComponents: {
        output: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
    };
}, {
    readonly extractStoryDocs: CommandDefinition<StoryDocsServiceState, ObjectSchema<{
        readonly id: StringSchema<undefined>;
    }, undefined>, OptionalSchema<ObjectSchema<{
        readonly id: StringSchema<undefined>;
        readonly name: StringSchema<undefined>;
        readonly path: StringSchema<undefined>;
        readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly error: OptionalSchema<ObjectSchema<{
            readonly name: StringSchema<undefined>;
            readonly message: StringSchema<undefined>;
        }, undefined>, undefined>;
    }, undefined>, undefined>, {
        readonly extractStoryDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllStoryDocs: UndefinedSchema<undefined>;
    }, {
        readonly extractStoryDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly extractAllStoryDocs: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storyDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly storyDocsForAllComponents: VoidSchema<undefined>;
    }, {
        readonly storyDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly storyDocsForAllComponents: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"extractStoryDocs\" has internal: true but must be prefixed with \"_\"";
    });
    readonly extractAllStoryDocs: CommandDefinition<StoryDocsServiceState, UndefinedSchema<undefined>, VoidSchema<undefined>, {
        readonly extractStoryDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllStoryDocs: UndefinedSchema<undefined>;
    }, {
        readonly extractStoryDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly extractAllStoryDocs: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storyDocs: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly storyDocsForAllComponents: VoidSchema<undefined>;
    }, {
        readonly storyDocs: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
        readonly storyDocsForAllComponents: RecordSchema<StringSchema<undefined>, ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"extractAllStoryDocs\" has internal: true but must be prefixed with \"_\"";
    });
} & {
    readonly extractStoryDocs: {
        output: OptionalSchema<ObjectSchema<{
            readonly id: StringSchema<undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly import: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly stories: RecordSchema<StringSchema<undefined>, ObjectSchema<{
                readonly id: StringSchema<undefined>;
                readonly name: StringSchema<undefined>;
                readonly snippet: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
                readonly error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>;
    };
    readonly extractAllStoryDocs: {
        output: VoidSchema<undefined>;
    };
}, "core/story-docs"> | ServiceDefinition<{
    components: Record<string, DocgenPayload>;
}, {
    readonly docgen: QueryDefinition<{
        components: Record<string, DocgenPayload>;
    }, ObjectSchema<{
        readonly id: StringSchema<undefined>;
    }, undefined>, OptionalSchema<LooseObjectSchema<{
        readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            import: OptionalSchema<StringSchema<undefined>, undefined>;
            name: StringSchema<undefined>;
            path: StringSchema<undefined>;
            description: OptionalSchema<StringSchema<undefined>, undefined>;
            summary: OptionalSchema<StringSchema<undefined>, undefined>;
            jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>, undefined>;
        readonly name: StringSchema<undefined>;
        readonly path: StringSchema<undefined>;
        readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
        readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
        readonly error: OptionalSchema<ObjectSchema<{
            readonly name: StringSchema<undefined>;
            readonly message: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly id: StringSchema<undefined>;
    }, undefined>, undefined>, {
        readonly extractDocgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllDocgen: UndefinedSchema<undefined>;
    }, {
        readonly extractDocgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly extractAllDocgen: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly docgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly docgenForAllComponents: VoidSchema<undefined>;
    }, {
        readonly docgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly docgenForAllComponents: RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"docgen\" has internal: true but must be prefixed with \"_\"";
    });
    readonly docgenForAllComponents: QueryDefinition<{
        components: Record<string, DocgenPayload>;
    }, VoidSchema<undefined>, RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
        readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            import: OptionalSchema<StringSchema<undefined>, undefined>;
            name: StringSchema<undefined>;
            path: StringSchema<undefined>;
            description: OptionalSchema<StringSchema<undefined>, undefined>;
            summary: OptionalSchema<StringSchema<undefined>, undefined>;
            jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>, undefined>;
        readonly name: StringSchema<undefined>;
        readonly path: StringSchema<undefined>;
        readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
        readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
        readonly error: OptionalSchema<ObjectSchema<{
            readonly name: StringSchema<undefined>;
            readonly message: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly id: StringSchema<undefined>;
    }, undefined>, undefined>, {
        readonly extractDocgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllDocgen: UndefinedSchema<undefined>;
    }, {
        readonly extractDocgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly extractAllDocgen: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly docgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly docgenForAllComponents: VoidSchema<undefined>;
    }, {
        readonly docgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly docgenForAllComponents: RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"docgenForAllComponents\" has internal: true but must be prefixed with \"_\"";
    });
} & {
    readonly docgen: {
        output: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
    };
    readonly docgenForAllComponents: {
        output: RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
    };
}, {
    readonly extractDocgen: CommandDefinition<{
        components: Record<string, DocgenPayload>;
    }, ObjectSchema<{
        readonly id: StringSchema<undefined>;
    }, undefined>, OptionalSchema<LooseObjectSchema<{
        readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            import: OptionalSchema<StringSchema<undefined>, undefined>;
            name: StringSchema<undefined>;
            path: StringSchema<undefined>;
            description: OptionalSchema<StringSchema<undefined>, undefined>;
            summary: OptionalSchema<StringSchema<undefined>, undefined>;
            jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
        }, undefined>, undefined>, undefined>;
        readonly name: StringSchema<undefined>;
        readonly path: StringSchema<undefined>;
        readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
        readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
        readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
        readonly error: OptionalSchema<ObjectSchema<{
            readonly name: StringSchema<undefined>;
            readonly message: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly id: StringSchema<undefined>;
    }, undefined>, undefined>, {
        readonly extractDocgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllDocgen: UndefinedSchema<undefined>;
    }, {
        readonly extractDocgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly extractAllDocgen: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly docgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly docgenForAllComponents: VoidSchema<undefined>;
    }, {
        readonly docgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly docgenForAllComponents: RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"extractDocgen\" has internal: true but must be prefixed with \"_\"";
    });
    readonly extractAllDocgen: CommandDefinition<{
        components: Record<string, DocgenPayload>;
    }, UndefinedSchema<undefined>, VoidSchema<undefined>, {
        readonly extractDocgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly extractAllDocgen: UndefinedSchema<undefined>;
    }, {
        readonly extractDocgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly extractAllDocgen: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly docgen: ObjectSchema<{
            readonly id: StringSchema<undefined>;
        }, undefined>;
        readonly docgenForAllComponents: VoidSchema<undefined>;
    }, {
        readonly docgen: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
        readonly docgenForAllComponents: RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"extractAllDocgen\" has internal: true but must be prefixed with \"_\"";
    });
} & {
    readonly extractDocgen: {
        output: OptionalSchema<LooseObjectSchema<{
            readonly subcomponents: OptionalSchema<RecordSchema<StringSchema<undefined>, LooseObjectSchema<{
                import: OptionalSchema<StringSchema<undefined>, undefined>;
                name: StringSchema<undefined>;
                path: StringSchema<undefined>;
                description: OptionalSchema<StringSchema<undefined>, undefined>;
                summary: OptionalSchema<StringSchema<undefined>, undefined>;
                jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
                argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
                error: OptionalSchema<ObjectSchema<{
                    readonly name: StringSchema<undefined>;
                    readonly message: StringSchema<undefined>;
                }, undefined>, undefined>;
            }, undefined>, undefined>, undefined>;
            readonly name: StringSchema<undefined>;
            readonly path: StringSchema<undefined>;
            readonly description: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly summary: OptionalSchema<StringSchema<undefined>, undefined>;
            readonly jsDocTags: RecordSchema<StringSchema<undefined>, ArraySchema<StringSchema<undefined>, undefined>, undefined>;
            readonly argTypes: OptionalSchema<CustomSchema<StrictArgTypes<Args>, undefined>, undefined>;
            readonly error: OptionalSchema<ObjectSchema<{
                readonly name: StringSchema<undefined>;
                readonly message: StringSchema<undefined>;
            }, undefined>, undefined>;
            readonly id: StringSchema<undefined>;
        }, undefined>, undefined>;
    };
    readonly extractAllDocgen: {
        output: VoidSchema<undefined>;
    };
}, "core/docgen"> | ServiceDefinition<ModuleGraphServiceState, {
    readonly storiesForFiles: QueryDefinition<ModuleGraphServiceState, ObjectSchema<{
        readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
    }, undefined>, ArraySchema<ArraySchema<ObjectSchema<{
        readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
        readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
    }, undefined>, undefined>, undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"storiesForFiles\" has internal: true but must be prefixed with \"_\"";
    });
    readonly status: QueryDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, VariantSchema<"value", [ObjectSchema<{
        readonly value: LiteralSchema<"booting", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"ready", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"error", undefined>;
        readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"unavailable", undefined>;
        readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
        readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
    }, undefined>], undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"status\" has internal: true but must be prefixed with \"_\"";
    });
    readonly graphRevision: QueryDefinition<ModuleGraphServiceState, OptionalSchema<ObjectSchema<{
        readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
    }, undefined>, undefined>, NumberSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"graphRevision\" has internal: true but must be prefixed with \"_\"";
    });
    readonly latestStoryChanges: QueryDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, ObjectSchema<{
        readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
        readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
    }, undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"latestStoryChanges\" has internal: true but must be prefixed with \"_\"";
    });
    readonly getStatus: QueryDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, VariantSchema<"value", [ObjectSchema<{
        readonly value: LiteralSchema<"booting", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"ready", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"error", undefined>;
        readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"unavailable", undefined>;
        readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
        readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
    }, undefined>], undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"getStatus\" has internal: true but must be prefixed with \"_\"";
    });
    readonly getGraphRevision: QueryDefinition<ModuleGraphServiceState, OptionalSchema<ObjectSchema<{
        readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
    }, undefined>, undefined>, NumberSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"getGraphRevision\" has internal: true but must be prefixed with \"_\"";
    });
} & {
    readonly storiesForFiles: {
        output: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
    };
    readonly status: {
        output: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
    };
    readonly graphRevision: {
        output: NumberSchema<undefined>;
    };
    readonly latestStoryChanges: {
        output: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
    };
    readonly getStatus: {
        output: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
    };
    readonly getGraphRevision: {
        output: NumberSchema<undefined>;
    };
}, {
    readonly _applyGraphSnapshot: CommandDefinition<ModuleGraphServiceState, ObjectSchema<{
        readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
            [x: string]: {
                [x: string]: number;
            };
        }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
    }, undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_applyGraphSnapshot\" is prefixed with \"_\" and must set internal: true";
    });
    readonly _applyGraphUpdate: CommandDefinition<ModuleGraphServiceState, ObjectSchema<{
        readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
            [x: string]: {
                [x: string]: number;
            };
        }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
    }, undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_applyGraphUpdate\" is prefixed with \"_\" and must set internal: true";
    });
    readonly _setStatus: CommandDefinition<ModuleGraphServiceState, VariantSchema<"value", [ObjectSchema<{
        readonly value: LiteralSchema<"booting", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"ready", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"error", undefined>;
        readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"unavailable", undefined>;
        readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
        readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
    }, undefined>], undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_setStatus\" is prefixed with \"_\" and must set internal: true";
    });
    readonly _waitForSettledEngine: CommandDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_waitForSettledEngine\" is prefixed with \"_\" and must set internal: true";
    });
} & {
    readonly _applyGraphSnapshot: {
        output: VoidSchema<undefined>;
    };
    readonly _applyGraphUpdate: {
        output: VoidSchema<undefined>;
    };
    readonly _setStatus: {
        output: VoidSchema<undefined>;
    };
    readonly _waitForSettledEngine: {
        output: VoidSchema<undefined>;
    };
}, "core/module-graph">)[];
/** Maps a list of service definitions to `{ [id]: instance }`, keyed by each definition's id. */
type CoreServices<TDefs extends readonly AnyServiceDefinition[]> = {
    [Def in TDefs[number] as Def['id']]: ServiceInstanceOf<Def>;
};
/** Core services registered on the dev server. */
type ServerCoreServices = CoreServices<typeof serverCoreServiceDefs>;
/** Module-level `getService` overloads keyed by a per-runtime core-service map. */
interface TypedGetService<TMap> {
    <K extends keyof TMap & ServiceId>(serviceId: K): TMap[K];
    <TInstance = RuntimeService>(serviceId: ServiceId): TInstance;
}

declare global {
    var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
    var defaultProjectAnnotations: ProjectAnnotations<any>;
}
type WrappedStoryRef = {
    __pw_type: 'jsx';
    props: Record<string, any>;
} | {
    __pw_type: 'importRef';
};
type UnwrappedJSXStoryRef = {
    __pw_type: 'jsx';
    type: UnwrappedImportStoryRef;
};
type UnwrappedImportStoryRef = ComposedStoryFn;
declare global {
    function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
}

/** System tags used throughout Storybook for categorizing and filtering stories and docs entries. */
declare const Tag: {
    /** Indicates that autodocs should be generated for this component */
    readonly AUTODOCS: "autodocs";
    /** MDX documentation attached to a component's stories file */
    readonly ATTACHED_MDX: "attached-mdx";
    /** Standalone MDX documentation not attached to stories */
    readonly UNATTACHED_MDX: "unattached-mdx";
    /** Story has a play function */
    readonly PLAY_FN: "play-fn";
    /** Story has a test function */
    readonly TEST_FN: "test-fn";
    /** Development environment tag */
    readonly DEV: "dev";
    /** Test environment tag */
    readonly TEST: "test";
    /** Manifest generation tag */
    readonly MANIFEST: "manifest";
};
/**
 * Tags can be any string, including custom user-defined tags. The Tag constant above defines the
 * system tags used by Storybook.
 */
type Tag = string;

declare class IndexingError extends Error {
    importPaths: string[];
    constructor(message: string, importPaths: string[], stack?: string);
    pathsString(): string;
    toString(): string;
}

type IndexStatsSummary = Record<keyof IndexInputStats, number>;

type StoryIndexEntryWithExtra = StoryIndexEntry & {
    extra: {
        metaId?: string;
        stats: IndexInputStats;
    };
};
/** A .mdx file will produce a docs entry */
type DocsCacheEntry = DocsIndexEntry;
/** A `_.stories._` file will produce a list of stories and possibly a docs entry */
type StoriesCacheEntry = {
    entries: (StoryIndexEntryWithExtra | DocsIndexEntry)[];
    dependents: Path$1[];
    type: 'stories';
};
type ErrorEntry = {
    type: 'error';
    err: IndexingError;
};
type CacheEntry = false | StoriesCacheEntry | DocsCacheEntry | ErrorEntry;
type SpecifierStoriesCache = Record<Path$1, CacheEntry>;
type StoryIndexGeneratorOptions = {
    workingDir: Path$1;
    configDir: Path$1;
    indexers: Indexer[];
    docs: DocsOptions;
    build?: StorybookConfigRaw['build'];
};
/**
 * The StoryIndexGenerator extracts stories and docs entries for each file matching (one or more)
 * stories "specifiers", as defined in main.js.
 *
 * The output is a set of entries (see above for the types).
 *
 * Each file is treated as a stories or a (modern) docs file.
 *
 * A stories file is indexed by an indexer (passed in), which produces a list of stories.
 *
 * - If the stories have the `parameters.docsOnly` setting, they are disregarded.
 * - If the stories have `autodocs` enabled, a docs entry is added pointing to the story file.
 *
 * A (modern) docs (.mdx) file is indexed, a docs entry is added.
 *
 * In the preview, a docs entry with the `autodocs` tag will be rendered as a CSF file that exports
 * an MDX template on the `docs.page` parameter, whereas other docs entries are rendered as MDX
 * files directly.
 *
 * The entries are "uniq"-ed and sorted. Stories entries are preferred to docs entries and MDX docs
 * entries are preferred to CSF templates (with warnings).
 */
declare class StoryIndexGenerator {
    readonly specifiers: NormalizedStoriesSpecifier[];
    readonly options: StoryIndexGeneratorOptions;
    private specifierToCache;
    /** Cache for findMatchingFiles results */
    private static findMatchingFilesCache;
    private lastIndex?;
    private lastStats?;
    private lastError?;
    private invalidationListeners;
    constructor(specifiers: NormalizedStoriesSpecifier[], options: StoryIndexGeneratorOptions);
    /** Generate a cache key for findMatchingFiles */
    private static getFindMatchingFilesCacheKey;
    /** Clear the findMatchingFiles cache */
    static clearFindMatchingFilesCache(): void;
    static findMatchingFiles(specifier: NormalizedStoriesSpecifier, workingDir: Path$1, ignoreWarnings?: boolean): Promise<SpecifierStoriesCache>;
    static findMatchingFilesForSpecifiers(specifiers: NormalizedStoriesSpecifier[], workingDir: Path$1, ignoreWarnings?: boolean): Promise<Array<readonly [NormalizedStoriesSpecifier, SpecifierStoriesCache]>>;
    initialize(): Promise<void>;
    /** Run the updater function over all the empty cache entries */
    updateExtracted(updater: (specifier: NormalizedStoriesSpecifier, absolutePath: Path$1, existingEntry: CacheEntry) => Promise<CacheEntry>, overwrite?: boolean): Promise<void>;
    isDocsMdx(absolutePath: Path$1): boolean;
    ensureExtracted({ projectTags, }: {
        projectTags?: Tag[];
    }): Promise<{
        entries: (IndexEntry | ErrorEntry)[];
        stats: IndexStatsSummary;
    }>;
    findDependencies(absoluteImports: Path$1[]): StoriesCacheEntry[];
    /**
     * Try to find the component path from a raw import string and return it in the same format as
     * `importPath`. Respect tsconfig paths if available.
     *
     * If no such file exists, assume that the import is from a package and return the raw
     */
    resolveComponentPath(rawComponentPath: Path$1, absolutePath: Path$1, matchPath: MatchPath | undefined): string;
    extractStories(specifier: NormalizedStoriesSpecifier, absolutePath: Path$1, projectTags?: Tag[]): Promise<StoriesCacheEntry | DocsCacheEntry>;
    extractDocs(specifier: NormalizedStoriesSpecifier, absolutePath: Path$1, projectTags?: Tag[]): Promise<false | DocsIndexEntry>;
    chooseDuplicate(firstEntry: IndexEntry, secondEntry: IndexEntry, projectTags: Tag[]): IndexEntry;
    sortStories(entries: StoryIndex['entries'], storySortParameter: any): Promise<Record<string, IndexEntry>>;
    getIndex(): Promise<StoryIndex>;
    getIndexAndStats(): Promise<{
        storyIndex: StoryIndex;
        stats: IndexStatsSummary;
    }>;
    invalidateAll(): void;
    invalidate(importPath: Path$1, removed: boolean): void;
    onInvalidated(listener: () => void): () => void;
    getPreviewCode(): Promise<string | undefined>;
    getProjectTags(previewCode?: string): string[];
    static storyFileNames(specifierToCache: Map<NormalizedStoriesSpecifier, SpecifierStoriesCache>): string[];
}

/**
 * Resolves story file paths from a main config's `stories` field without evaluating story files.
 *
 * @example
 *
 * ```typescript
 * const storiesPaths = await getStoriesPathsFromConfig({
 *   stories: ['src\/**\/*.stories.tsx'],
 *   configDir: '/path/to/.storybook',
 *   workingDir: '/path/to/project',
 * });
 * ```
 */
declare const getStoriesPathsFromConfig: ({ stories, configDir, workingDir, }: {
    stories: StorybookConfigRaw["stories"];
    configDir: string;
    workingDir: string;
}) => Promise<string[]>;

interface GenerateStoryResult {
    success: boolean;
    storyId?: string;
    kind?: string;
    storyFilePath?: string;
    exportedStoryName?: string;
    error?: string;
    errorType?: 'STORY_FILE_EXISTS' | 'UNKNOWN';
}
interface GenerateStoryOptions {
    /**
     * If true, checks if the file exists and returns an error without writing. If false, writes the
     * file even if it exists (overwrites).
     *
     * @default true
     */
    checkFileExists?: boolean;
}
/**
 * Generates and writes a new story file for a component.
 *
 * This function orchestrates the entire story file creation process:
 *
 * 1. Generates the story file path and content based on the component
 * 2. Optionally checks if the file already exists
 * 3. Writes the story file to disk
 * 4. Returns metadata about the created story
 *
 * @example
 *
 * ```ts
 * const result = await generateStoryFile(
 *   {
 *     componentFilePath: 'src/components/Button.tsx',
 *     componentExportName: 'Button',
 *     componentIsDefaultExport: true,
 *     componentExportCount: 1,
 *   },
 *   options
 * );
 *
 * if (result.success) {
 *   console.log(`Story created at ${result.storyFilePath}`);
 * }
 * ```
 *
 * @param payload - The component information for which to create a story
 * @param options - Storybook options for configuration
 * @param generateOptions - Additional options for story generation behavior
 * @returns A promise that resolves to the result of the story generation
 */
declare function generateStoryFile(payload: CreateNewStoryRequestPayload, options: Options, generateOptions?: GenerateStoryOptions): Promise<GenerateStoryResult>;

type ComponentArgTypesInfo = {
    required: boolean;
    type: SBType$1;
};
type ComponentArgTypesData = {
    props?: Record<string, ComponentArgTypesInfo>;
};

declare function loadStorybook(options: CLIOptions & LoadOptions & BuilderOptions & {
    storybookVersion?: string;
    previewConfigPath?: string;
}): Promise<Options>;

type MdxAnalysisResult = {
    title: string | undefined;
    of: string | undefined;
    name: string | undefined;
    id: string | undefined;
    summary: string | undefined;
    isTemplate: boolean;
    metaTags?: string[];
    imports: string[];
};
declare const analyzeMdx: (code: string) => Promise<MdxAnalysisResult>;

/**
 * Canonical contract for the MDX docs open service.
 *
 * The service implementation lives in `@storybook/addon-docs`, but the data contract (service id,
 * on-disk/`$ref` layout, payload shapes, and the consumer query handle) lives here in core so the
 * addon that produces it and the core manifest writer that consumes it share one source of truth.
 * Mirrors the docgen service contract under `shared/open-service/services/docgen/`.
 */
/** A JSON Reference (`{ $ref }`) pointing at a value in another manifest document. */
type JsonRef = {
    $ref: string;
};
/** Open-service id for the MDX docs service (also the on-disk directory under `services/`). */
declare const MDX_SERVICE_ID = "addon-docs/mdx";
/** Free-form error captured while reading or analyzing an MDX doc. */
interface MdxError {
    name: string;
    message: string;
}
/**
 * One MDX doc, both as stored in the service and as resolved from a manifest `$ref`.
 *
 * `summary` shares `content`'s optionality: it is derived from the doc when available (an explicit
 * `Meta` summary, falling back to text extracted from the content) and omitted otherwise.
 */
interface MdxDocPayload {
    id: string;
    name: string;
    path: string;
    title: string;
    content?: string;
    summary?: string;
    error?: MdxError;
    mdx?: never;
}
/** Per-component MDX payload: every doc grouped under a single component (or standalone) id. */
interface MdxPayload {
    id: string;
    name: string;
    docs: Record<string, MdxDocPayload>;
}
/** Shallow docs index row: id, name, optional summary, and a `$ref` to the full MDX payload. */
interface DocsManifestRefEntry {
    id: string;
    name: string;
    summary?: string;
    mdx: JsonRef;
    path?: never;
    title?: never;
    content?: never;
    error?: never;
}
/** A docs manifest entry is either an inline payload or a shallow `$ref` row. */
type DocsManifestEntry = MdxDocPayload | DocsManifestRefEntry;
/** Minimal consumer handle for reading every MDX payload from the live service (dev). */
interface MdxServiceContract {
    queries: {
        mdxForAllComponents: {
            loaded: () => Promise<Record<string, MdxPayload>>;
        };
    };
}
/** Relative path segment for one component's static snapshot file (`<id>.json`). */
declare function mdxQueryStaticPath(id: string): string;
/** Logical static-store key: `addon-docs/mdx/<id>.json`. */
declare function mdxStaticStorePath(id: string): string;
/** `$ref` target for one doc, relative to the `manifests/` directory. */
declare function mdxManifestRef(componentId: string, docId: string): string;

/**
 * Unified service registry for the open-service multi-master architecture.
 *
 * One implementation backs every runtime — the dev server (Node), the manager (top window), and each
 * preview iframe. Registration builds a local `ServiceRuntime` and, when a channel is present, wires it
 * into the cross-peer sync protocol through the shared transport. The only thing that differs per
 * runtime is the `relay` role: the dev server and the manager are hubs (`relay: true`) that bridge
 * their other channel transports, while a preview is a leaf (`relay: false`) — a single transport has
 * nothing to forward. The handshake + patch-broadcast protocol lives in `service-transport.ts` and the
 * last-write-wins reconciliation in `service-sync.ts`; both transports drive them identically.
 *
 * The registry is anchored on a symbol-keyed `globalThis` slot so every module in one realm shares a
 * single registration map even if this file is reached through different import paths. Server (Node),
 * manager (top window), and preview (iframe) are already isolated realms, so one symbol is correct for
 * all three — they never share a map at runtime.
 */

/** Returns one summary entry per registered service — the lowest-cost discovery endpoint. */
declare function listServices(): Promise<ServiceSummary[]>;
/** Returns the schema-backed descriptor for one registered service. */
declare function describeService(serviceId: ServiceId): Promise<ServiceDescriptor>;

declare const getService: TypedGetService<ServerCoreServices>;

/**
 * Registers a service on the dev server and returns its runtime surface.
 *
 * The server is a relay hub: when a channel is installed (the `services` preset does this on a real
 * websocket transport) it bridges every connected manager tab. Without a channel — static builds and
 * the index builder — the runtime stays local-only.
 */
declare function registerService<TState, TQueries extends Queries<TState>, TCommands extends Commands<TState>>(definition: ServiceDefinition<TState, TQueries, TCommands>, registration?: ServiceRegistrationOptions<TState, TQueries, TCommands>): ServiceInstance<TState, TQueries, TCommands> & ServiceRegistryApi;

declare const fullStatusStore: StatusStore & {
    selectStatuses: (statuses: Status[]) => void;
    typeId: undefined;
};
declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
declare const universalStatusStore: UniversalStore<StatusesByStoryIdAndTypeId, StatusStoreEvent>;

declare class ChangeDetectionUnavailableError extends Error {
    constructor(message: string, options?: ErrorOptions);
}
declare class ChangeDetectionFailureError extends Error {
    constructor(message: string, options?: ErrorOptions);
}

type ChangeDetectionReadiness = {
    status: 'ready';
} | {
    status: 'unavailable';
    reason: string;
    error?: Error;
} | {
    status: 'error';
    error: Error;
};
declare function getChangeDetectionReadiness(): Promise<ChangeDetectionReadiness>;

declare const moduleGraphServiceDef: ServiceDefinition<ModuleGraphServiceState, {
    readonly storiesForFiles: QueryDefinition<ModuleGraphServiceState, ObjectSchema<{
        readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
    }, undefined>, ArraySchema<ArraySchema<ObjectSchema<{
        readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
        readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
    }, undefined>, undefined>, undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"storiesForFiles\" has internal: true but must be prefixed with \"_\"";
    });
    readonly status: QueryDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, VariantSchema<"value", [ObjectSchema<{
        readonly value: LiteralSchema<"booting", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"ready", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"error", undefined>;
        readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"unavailable", undefined>;
        readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
        readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
    }, undefined>], undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"status\" has internal: true but must be prefixed with \"_\"";
    });
    readonly graphRevision: QueryDefinition<ModuleGraphServiceState, OptionalSchema<ObjectSchema<{
        readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
    }, undefined>, undefined>, NumberSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"graphRevision\" has internal: true but must be prefixed with \"_\"";
    });
    readonly latestStoryChanges: QueryDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, ObjectSchema<{
        readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
        readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
    }, undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"latestStoryChanges\" has internal: true but must be prefixed with \"_\"";
    });
    readonly getStatus: QueryDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, VariantSchema<"value", [ObjectSchema<{
        readonly value: LiteralSchema<"booting", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"ready", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"error", undefined>;
        readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"unavailable", undefined>;
        readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
        readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
    }, undefined>], undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"getStatus\" has internal: true but must be prefixed with \"_\"";
    });
    readonly getGraphRevision: QueryDefinition<ModuleGraphServiceState, OptionalSchema<ObjectSchema<{
        readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
    }, undefined>, undefined>, NumberSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal?: false;
    } | {
        __internal_naming_error: "Operation \"getGraphRevision\" has internal: true but must be prefixed with \"_\"";
    });
} & {
    readonly storiesForFiles: {
        output: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
    };
    readonly status: {
        output: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
    };
    readonly graphRevision: {
        output: NumberSchema<undefined>;
    };
    readonly latestStoryChanges: {
        output: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
    };
    readonly getStatus: {
        output: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
    };
    readonly getGraphRevision: {
        output: NumberSchema<undefined>;
    };
}, {
    readonly _applyGraphSnapshot: CommandDefinition<ModuleGraphServiceState, ObjectSchema<{
        readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
            [x: string]: {
                [x: string]: number;
            };
        }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
    }, undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_applyGraphSnapshot\" is prefixed with \"_\" and must set internal: true";
    });
    readonly _applyGraphUpdate: CommandDefinition<ModuleGraphServiceState, ObjectSchema<{
        readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
            [x: string]: {
                [x: string]: number;
            };
        }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
    }, undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_applyGraphUpdate\" is prefixed with \"_\" and must set internal: true";
    });
    readonly _setStatus: CommandDefinition<ModuleGraphServiceState, VariantSchema<"value", [ObjectSchema<{
        readonly value: LiteralSchema<"booting", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"ready", undefined>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"error", undefined>;
        readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
    }, undefined>, ObjectSchema<{
        readonly value: LiteralSchema<"unavailable", undefined>;
        readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
        readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
    }, undefined>], undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_setStatus\" is prefixed with \"_\" and must set internal: true";
    });
    readonly _waitForSettledEngine: CommandDefinition<ModuleGraphServiceState, UndefinedSchema<undefined>, VoidSchema<undefined>, {
        readonly _applyGraphSnapshot: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
        }, undefined>;
        readonly _applyGraphUpdate: ObjectSchema<{
            readonly storiesByFile: SchemaWithPipe<readonly [RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, RecordSchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>, undefined>, undefined>, DescriptionAction<{
                [x: string]: {
                    [x: string]: number;
                };
            }, "Complete relative reverse index keyed by story-index-style source file paths. Values map affected story-index-style story file paths to breadth-first-search depths.">]>;
            readonly bumpedStoryFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story files whose graph changed, using story-index-style relative paths. Each listed file has its version incremented.">]>;
        }, undefined>;
        readonly _setStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly _waitForSettledEngine: UndefinedSchema<undefined>;
    }, {
        readonly _applyGraphSnapshot: VoidSchema<undefined>;
        readonly _applyGraphUpdate: VoidSchema<undefined>;
        readonly _setStatus: VoidSchema<undefined>;
        readonly _waitForSettledEngine: VoidSchema<undefined>;
    }, QueryFunctions<{
        readonly storiesForFiles: ObjectSchema<{
            readonly files: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Input source file path. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`.">]>, undefined>, DescriptionAction<string[], "Source files to look up. Output arrays match this input order.">]>;
        }, undefined>;
        readonly status: UndefinedSchema<undefined>;
        readonly graphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
        readonly latestStoryChanges: UndefinedSchema<undefined>;
        readonly getStatus: UndefinedSchema<undefined>;
        readonly getGraphRevision: OptionalSchema<ObjectSchema<{
            readonly storyFiles: ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Story file to scope the watch to. Accepts absolute paths, story-index-style relative paths with `./`, or relative paths without `./`. Pass an empty array to watch nothing (returns 0).">]>, undefined>;
        }, undefined>, undefined>;
    }, {
        readonly storiesForFiles: ArraySchema<ArraySchema<ObjectSchema<{
            readonly storyFile: SchemaWithPipe<readonly [SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, DescriptionAction<string, "Affected story file, returned in the same `./`-prefixed relative import-path format used by the story index.">]>;
            readonly depth: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Breadth-first-search depth: the shortest number of import edges between the source file and this story file.">]>;
        }, undefined>, undefined>, undefined>;
        readonly status: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly graphRevision: NumberSchema<undefined>;
        readonly latestStoryChanges: ObjectSchema<{
            readonly revision: SchemaWithPipe<readonly [NumberSchema<undefined>, DescriptionAction<number, "Graph revision number for this latest story change set.">]>;
            readonly storyFiles: SchemaWithPipe<readonly [ArraySchema<SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "A story-index-style relative path such as `./src/Button.stories.tsx`.">]>, undefined>, DescriptionAction<string[], "Story-index-relative story files touched by the latest module graph change set.">]>;
        }, undefined>;
        readonly getStatus: VariantSchema<"value", [ObjectSchema<{
            readonly value: LiteralSchema<"booting", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"ready", undefined>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"error", undefined>;
            readonly error: SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Serializable error describing why the module graph failed unexpectedly.">]>;
        }, undefined>, ObjectSchema<{
            readonly value: LiteralSchema<"unavailable", undefined>;
            readonly reason: SchemaWithPipe<readonly [StringSchema<undefined>, DescriptionAction<string, "Human-readable reason why the current builder/runtime cannot provide module graph functionality.">]>;
            readonly error: OptionalSchema<SchemaWithPipe<readonly [GenericSchema, DescriptionAction<unknown, "Optional serializable error reported by the builder adapter.">]>, undefined>;
        }, undefined>], undefined>;
        readonly getGraphRevision: NumberSchema<undefined>;
    }>> & ({
        internal: true;
    } | {
        __internal_naming_error: "Operation \"_waitForSettledEngine\" is prefixed with \"_\" and must set internal: true";
    });
} & {
    readonly _applyGraphSnapshot: {
        output: VoidSchema<undefined>;
    };
    readonly _applyGraphUpdate: {
        output: VoidSchema<undefined>;
    };
    readonly _setStatus: {
        output: VoidSchema<undefined>;
    };
    readonly _waitForSettledEngine: {
        output: VoidSchema<undefined>;
    };
}, "core/module-graph">;
type ModuleGraphService = ServiceInstanceOf<typeof moduleGraphServiceDef>;

interface GitDiffResult {
    changed: Set<string>;
    new: Set<string>;
}
type GitStateChangeCallback = () => void;
type GitFileSystem = {
    watch: typeof watch;
    readFile: typeof readFile;
    stat: typeof stat;
};
declare class GitDiffProvider {
    private readonly cwd;
    private readonly fileSystem;
    private repoRoot;
    private gitStateCallback;
    private branchWatcher;
    private headWatcher;
    private packedRefsWatcher;
    private watchingInitialized;
    private watchingStopped;
    constructor(cwd?: string, fileSystem?: GitFileSystem);
    getRepoRoot(): Promise<string>;
    getChangedFiles(): Promise<GitDiffResult>;
    getHeadCommit(): Promise<string>;
    isWorkingTreeClean(): Promise<boolean>;
    onGitStateChange(callback: GitStateChangeCallback): void;
    private initializeWatching;
    private attachWatcher;
    private configureBranchWatcher;
    private reconfigureBranchWatcher;
    dispose(): void;
    private stopWatching;
    private getGitDir;
    private readHeadRef;
    private runGitCommand;
    private isEnoentError;
    private toGitError;
}

type BaselineCache = {
    get: <T = unknown>(key: string) => Promise<T | undefined>;
    set: <T = unknown>(key: string, value: T) => Promise<void>;
};
declare class IndexBaselineService {
    private readonly options;
    private baselineEntryIds;
    private initializePromise;
    private syncInFlight;
    private cache;
    constructor(options: {
        storyIndexGeneratorPromise: Promise<StoryIndexGenerator>;
        gitDiffProvider: GitDiffProvider;
        onBaselineUpdated: () => void;
        cache?: BaselineCache;
    });
    start(): Promise<void>;
    getBaselineEntryIds(): Promise<Set<string>>;
    handleGitStateChange(): Promise<void>;
    private initialize;
    private refreshBaseline;
}

/**
 * Publishes change-detection story statuses to the status store. It resolves git-changed files,
 * maps them to affected stories through the `core/module-graph` open service, and emits
 * `modified`/`affected`/`new` statuses (plus index-baseline `new` entries).
 */
declare class ChangeDetectionService {
    private readonly options;
    private disposed;
    private debounceTimer;
    private scanInFlight;
    private rerunAfterCurrentScan;
    private readinessResolved;
    private statusPipelineStarted;
    private changeDetectionEnabled;
    private previousStatuses;
    private gitDiffProvider;
    private indexBaselineService;
    private unsubscribeModuleGraphStatus;
    private unsubscribeModuleGraphRevision;
    private readonly workingDir;
    private readonly debounceMs;
    constructor(options: {
        storyIndexGeneratorPromise: Promise<StoryIndexGenerator>;
        statusStore: StatusStoreByTypeId$1;
        gitDiffProvider?: GitDiffProvider;
        indexBaselineService?: IndexBaselineService;
        workingDir?: string;
        debounceMs?: number;
    });
    private getModuleGraph;
    /** True while the service is live and change-detection status publishing is enabled. */
    private isActive;
    private onGraphReady;
    private onGraphChange;
    private onGraphError;
    private onGraphUnavailable;
    private onModuleGraphStatus;
    start(enabled: boolean | undefined): void;
    /**
     * Wires the git-diff-driven status pipeline. Runs once the dependency graph is ready (so the
     * initial scan and every git-state-change scan read a populated reverse index).
     */
    private startStatusPipeline;
    dispose(): Promise<void>;
    private scheduleScan;
    private scan;
    private buildStatuses;
    private getGitDiffProvider;
    private getIndexBaselineService;
    private applyStatusStorePatch;
    private resolveReadiness;
}

declare const fullTestProviderStore: {
    settingsChanged: () => void;
    onRunAll: (listener: () => void) => () => void;
    onClearAll: (listener: () => void) => () => void;
} & {
    getFullState: UniversalStore<TestProviderStateByProviderId, TestProviderStoreEvent>["getState"];
    setFullState: UniversalStore<TestProviderStateByProviderId, TestProviderStoreEvent>["setState"];
    onSettingsChanged: (listener: (testProviderId: TestProviderId) => void) => () => void;
    runAll: () => void;
    clearAll: () => void;
};
declare const getTestProviderStoreById: (testProviderId: TestProviderId) => TestProviderStoreById;
declare const universalTestProviderStore: UniversalStore<TestProviderStateByProviderId, TestProviderStoreEvent>;

declare function getComponentCandidates({ sampleSize, globPattern, cwd, }?: {
    sampleSize?: number;
    globPattern?: string;
    /** Working directory for glob. Defaults to process.cwd(). */
    cwd?: string;
}): Promise<{
    candidates: string[];
    error?: string;
    globMatchCount: number;
    analyzedCount?: number;
    avgComplexity?: number;
}>;

interface StoryTestResult {
    storyId: string;
    status: 'PASS' | 'FAIL' | 'PENDING';
    error?: string;
    stack?: string;
    /** Whether the story rendered to an empty/invisible DOM element */
    emptyRender?: boolean;
}
/**
 * A `StoryTestResult` augmented with the timestamp at which it was recorded.
 * Used by the agent self-healing flow to persist the most recent outcome
 * per story across runs (in cache only — never sent in telemetry).
 */
interface StoryTestResultHistoryEntry extends StoryTestResult {
    timestamp: number;
}
type StoryTestResultHistory = Record<string, StoryTestResultHistoryEntry>;
interface CategorizedError {
    category: string;
    count: number;
    uniqueCount: number;
    matchedDependencies: string[];
}
/**
 * Outcome of the `CssCheck` story — a story (id suffix `--css-check`)
 * whose `play` asserts a component-specific computed style via
 * `getComputedStyle`. Distinguishes "component mounted" from "the
 * user's CSS actually loaded".
 *
 * - `'pass'`    — a `CssCheck` story ran and passed.
 * - `'fail'`    — a `CssCheck` story ran and failed.
 * - `'not-run'` — no pass/fail signal available: either no `CssCheck`
 *                 story is in the suite, or the story existed but was
 *                 not executed (skipped, pending, todo, filtered out).
 *
 * Only the three-valued enum is emitted — no storyId or component
 * name — so no user-authored data enters telemetry.
 */
type CssCheckOutcome = 'pass' | 'fail' | 'not-run';
interface TestRunAnalysis {
    /** Stats for the current run (only stories executed in this run). */
    total: number;
    passed: number;
    passedButEmptyRender: number;
    successRate: number;
    successRateWithoutEmptyRender: number;
    uniqueErrorCount: number;
    categorizedErrors: Record<string, CategorizedError>;
    cssCheck: CssCheckOutcome;
    /**
     * Stats accumulated across runs: for every story we've ever seen, we
     * keep the most recent outcome (by timestamp). Only emitted by the
     * agent self-healing flow, which is the only consumer that persists
     * a per-story history in the Storybook cache.
     */
    cumulativeTotal?: number;
    cumulativePassed?: number;
    cumulativePassedButEmptyRender?: number;
    cumulativeSuccessRate?: number;
    cumulativeSuccessRateWithoutEmptyRender?: number;
    cumulativeUniqueErrorCount?: number;
    cumulativeCategorizedErrors?: Record<string, CategorizedError>;
    cumulativeCssCheck?: CssCheckOutcome;
}

interface TestRunSummary {
    duration?: number;
    summary?: TestRunAnalysis;
    runError?: string;
}

/**
 * Run ghost stories: execute vitest on component file paths to auto-generate
 * and test stories that don't exist on disk.
 *
 * @param componentFilePaths - Absolute paths to component files to test.
 * @param options.cwd - Working directory for vitest. Defaults to process.cwd().
 */
declare function runStoryTests(componentFilePaths: string[], options?: {
    cwd?: string;
    ghostRun?: boolean;
}): Promise<TestRunSummary>;

interface PortOptions {
    exactPort?: boolean;
}
declare const getServerPort: (port?: number, { exactPort }?: PortOptions) => Promise<number>;

/**
 * Analyze a list of story test results and produce a TestRunAnalysis with pass/fail counts, success
 * rates, empty render detection, and categorized errors.
 *
 * @param results Story results from the current run.
 * @param cumulativeResults Optional aggregated results across runs (latest outcome per story).
 *   Only the agent self-healing flow tracks history and passes this; when omitted no
 *   `cumulative*` fields are emitted.
 */
declare function analyzeTestResults(results: StoryTestResult[], cumulativeResults?: StoryTestResult[]): TestRunAnalysis;

interface VitestLikeReport {
    type: string;
    result?: {
        emptyRender?: boolean;
    } | unknown;
}
interface VitestLikeError {
    message?: string;
    stack?: string;
}
interface VitestLikeInput {
    storyId: string | undefined;
    /** Raw vitest status, e.g. 'passed' | 'failed' | 'skipped' | 'pending' | 'running' | ... */
    statusRaw: string | undefined;
    errors?: readonly VitestLikeError[];
    reports?: readonly VitestLikeReport[];
}
/**
 * Convert a Vitest-like input (either a JSON reporter assertion or a runtime TestCase) into a
 * StoryTestResult. Returns null when the input has no storyId — callers can use this to skip
 * non-story tests.
 */
declare function toStoryTestResult(input: VitestLikeInput): StoryTestResult | null;

export { type BuildIndexOptions, type BuildStaticStandaloneOptions, type ChangeDetectionAdapter, ChangeDetectionFailureError, ChangeDetectionService, ChangeDetectionUnavailableError, type Command, type CommandCtx, type CommandDefinition, type ComponentArgTypesData, type DocsManifestEntry, type DocsManifestRefEntry, type ChangeDetectionReadiness as Experimental_ChangeDetectionReadiness, type FileChangeEvent, type GenerateStoryOptions, type GenerateStoryResult, type ImportParser, type ImportParserContext, type JsonRef, MDX_SERVICE_ID, type MdxDocPayload, type MdxError, type MdxPayload, type MdxServiceContract, type ModuleGraphService, type OperationDescriptor, type ParseFileArgs, type Query, type QueryCtx, type QueryDefinition, type RuntimeService, type SchemaDescriptor, type ServerServiceRegistration, type ServiceDefinition, type ServiceDescriptor, type ServiceInstance, type ServiceRegistrationOptions, type ServiceSummary, StoryIndexGenerator, type StoryTestResult, type StoryTestResultHistory, type StoryTestResultHistoryEntry, Tag, analyzeMdx, analyzeTestResults, build, buildDevStandalone, buildIndex, buildIndexStandalone, buildStaticStandalone, describeService, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, defineService as experimental_defineService, getChangeDetectionReadiness as experimental_getChangeDetectionReadiness, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, loadStorybook as experimental_loadStorybook, registerService as experimental_registerService, generateStoryFile, getComponentCandidates, getErrorLevel, getServerPort, getService, getStoriesPathsFromConfig, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, universalStatusStore as internal_universalStatusStore, universalTestProviderStore as internal_universalTestProviderStore, listServices, mapStaticDir, mdxManifestRef, mdxQueryStaticPath, mdxStaticStorePath, moduleGraphServiceDef, resolveOnboardingInitialPath, runStoryTests, sendTelemetryError, toStoryTestResult, withTelemetry };
