/** * Validate `--limit`. Returns an error message, or `undefined` when the value * is an integer within [1, {@link MAX_LIMIT}]. */ export declare function validateInspectLimit(limit: number): string | undefined; /** * Validate `--runId`. Returns an error message, or `undefined` when the value * is a well-formed run id. * * Checked here so a mistyped id names the flag and costs no round trip. * `@workflow/world-vercel` validates the same shape and remains the * authority. */ export declare function validateInspectRunId(runId: string): string | undefined; /** * Validate that `--attribute` was given to a listing that consumes it. * * Only the runs listing filters by attributes. Every other resource parses * the flag and ignores it, which is the silent drop these bounds exist to * prevent — the flag is cheap to type onto the wrong subcommand and the * result looks like a successful, unfiltered answer. * * `resource` is the normalized resource and `hasId` marks a single-item * lookup, which reads one run directly and has nothing to filter. * `opensWebUi` marks `--url`/`--web`, which hand the request to the * dashboard rather than filtering here. `withData` marks the payload- * resolving path, which reads from storage and has no attribute index. */ export declare function validateAttributeScope(resource: string, hasId: boolean, hasAttribute: boolean, opensWebUi?: boolean, withData?: boolean): string | undefined; /** * Validate that a lookup scoped to a run names its run. * * Checked before backend setup, so the mistake costs no auth and project * lookup and the message says what to add. `opensWebUi` marks `--url`/`--web`, * whose deep links do not need the run. */ export declare function validateRunScope(resource: string, hasId: boolean, hasRunId: boolean, opensWebUi?: boolean): string | undefined; /** * Validate that `--all` was given to a listing that pages it. * * `--all` exists for the listings whose `--json` output is a bare array and * so cannot carry a cursor. The runs, hooks, and attributes listings print * the cursor in their JSON page object; accepting `--all` there and ignoring * it would be the silent drop these bounds exist to prevent. */ export declare function validateAllScope(resource: string, hasId: boolean, all: boolean, interactive?: boolean, opensWebUi?: boolean): string | undefined; /** Flags {@link validateInspectFlags} checks, as `inspect` parsed them. */ export interface InspectFlagBounds { /** Normalized resource, e.g. `run`, `steps` → `step`. */ resource: string; /** True when the invocation names a single item (`inspect run `). */ hasId: boolean; limit?: number; runId?: string; /** Raw repeated `--attribute key=value` values. */ attribute?: string[]; /** True for `--url`, `--web`, or the `web` resource. */ opensWebUi: boolean; withData?: boolean; all?: boolean; interactive?: boolean; } /** * Check every bounded `inspect` flag and parse `--attribute`, returning * either the first error to report or the parsed filters to pass on. * * One call, made before any backend setup: a mistyped flag should name * itself rather than surface as a rejected argument from the read path, or — * worse — be dropped and answered with a plausible unfiltered table. */ export declare function validateInspectFlags(flags: InspectFlagBounds): { error: string; } | { attributes: Record | undefined; }; //# sourceMappingURL=flag-bounds.d.ts.map