import type { EntityJSON } from "@uipath/entity-modeler/schema"; import type { IFileSystem } from "@uipath/solutionpackager-tool-core"; /** Why a stub↔resource pair failed. Stable codes: pack output and the editor's * failure states key on these. */ export type PairFailureCode = "StubUnparsable" | "StubFileNameMismatch" | "ResourcePathEscapes" | "ResourceMissing" | "ResourceInvalid" | "NameCoupling"; export interface PairFailure { code: PairFailureCode; message: string; } export type PairResult = { ok: true; entityName: string; resourceFile: string; entity: EntityJSON; } | { ok: false; failure: PairFailure; }; /** * Does the stub still point at a real, well-formed resource whose name matches? * Checks the stub parses, its filename equals the entity name, the resolved * resource stays inside the solution (stubs can come from unpacked archives, so * a `../../` pointer must not escape), the resource exists and parses, and its * `Name` couples back to the stub. Reads only. */ export declare function verifyPair(stubFile: string, solutionDir: string, fs: IFileSystem): Promise; /** * The owning solution dir, or undefined when outside any solution. * * An unreadable directory (EACCES, EIO) may be the real solution root, so a * `.uipx` found ABOVE one is not trusted: the walk throws the read error * rather than hand back an ancestor's solution for a mutating command to act * on. With no `.uipx` above it, the walk ends as "outside any solution" as * before — an unlistable `/home` (0711) must not turn every command run * outside a solution into a raw EACCES. A code-less error (the browser's * in-memory filesystem) reads as missing. * * @throws the read error in that one case. Earlier versions never threw and * returned the ancestor instead — callers outside this package must handle it. */ export declare function findSolutionRoot(startDir: string, fs: IFileSystem): Promise;