import { Option, Schema as S } from 'effect'; export declare const GOT_MESSAGE_PATTERN: RegExp; export declare const isTagged: (input: I) => input is I & S.Struct.ReadonlySide<{ readonly _tag: S.String; }, "Type">; /** Submodel chain information extracted from a recorded Message. */ export type SubmodelInfo = Readonly<{ submodelPath: ReadonlyArray; maybeLeafTag: Option.Option; }>; /** * Walk a chain of `GotMessage` wrappers in a recorded Message and * return the wrapper tags plus the innermost leaf tag. * * The Submodel pattern propagates child Messages up to a parent by wrapping * them in `GotChildMessage({ message: childMessage })`. Nested submodels stack * those wrappers. Walking the chain reveals the parent → child → grandchild * dispatch path that produced the entry. * * Returns an empty path and `Option.none` for top-level Messages whose tag * doesn't match the `Got*Message` pattern. Otherwise the path lists wrapper * tags from outer to inner, and `maybeLeafTag` is `Some` when the innermost * wrapped value is itself a tagged Message (the underlying child Message that * originated the chain). */ export declare const extractSubmodelInfo: (tag: string, message: unknown) => SubmodelInfo; //# sourceMappingURL=submodelPath.d.ts.map