import { InternalError, Result } from "@outfitter/contracts"; import { z } from "zod"; /** Zod schema for CLI output mode with "human" as the default. */ declare const outputModeSchema: z.ZodType<"human" | "json" | "jsonl">; /** Coerce a flag value to a non-empty string, or `undefined`. */ declare function resolveStringFlag(value: unknown): string | undefined; /** * Resolve the `--no-tooling` / `--tooling` flag pair. * * Returns `true` to include tooling, `false` to skip, or `undefined` * when neither flag was provided. */ declare function resolveNoToolingFlag(flags: { readonly noTooling?: unknown; readonly tooling?: unknown; }): boolean | undefined; /** Resolve `--local` or its `--workspace` alias to a boolean, or `undefined` when absent. */ declare function resolveLocalFlag(flags: { readonly local?: unknown; readonly workspace?: unknown; }): boolean | undefined; /** Parse `--install-timeout` as an integer, accepting string or number input. */ declare function resolveInstallTimeoutFlag(value: unknown): number | undefined; interface CwdPresetResolver { resolve(flags: Record): { cwd: string; }; } /** Resolve the working directory from a `cwdPreset`, making relative paths absolute. */ declare function resolveCwdFromPreset(flags: Record, cwdPreset: CwdPresetResolver): string; /** Resolve a boolean flag that may appear under either its camelCase key or its kebab-case alias. */ declare function resolveBooleanFlagAlias(flags: Record, key: string, alias: string): boolean; interface ActionBoundaryErrorLike { readonly message: string; } /** Wrap an error at the action boundary into a tagged `InternalError`. */ declare function toActionInternalError(action: string, error: ActionBoundaryErrorLike): InternalError; /** Shorthand for returning `Result.err` with a tagged `InternalError` from an action handler. */ declare function actionInternalErr(action: string, error: ActionBoundaryErrorLike): Result; /** Convert an `unknown` catch value into a tagged `InternalError`, using a fallback message for non-Error values. */ declare function toActionInternalErrorFromUnknown(action: string, error: unknown, fallbackMessage: string): InternalError; export { toActionInternalErrorFromUnknown, toActionInternalError, resolveStringFlag, resolveNoToolingFlag, resolveLocalFlag, resolveInstallTimeoutFlag, resolveCwdFromPreset, resolveBooleanFlagAlias, outputModeSchema, actionInternalErr };