import type { ByteSource } from '../../../io/types.ts'; import { PathSpec } from '../../../types.ts'; import { type MountRegistry } from '../../mount/registry.ts'; export declare const CWD_DEFAULT_RAW: Record; export declare function defaultCwdOperand(parts: readonly (string | PathSpec)[], cmdName: string, registry: MountRegistry, cwd: string, stdin: ByteSource | null): PathSpec | null; export declare function pathFlagScopes(cmdName: string, argv: string[], cwd: string): PathSpec[]; /** * The path operands a line names positionally, flag values left out. * * Classification turns every path-shaped word into a PathSpec, including the * value of a path-valued flag, so the classified word list cannot tell * `tar -xf a.tar -C /mnt` (extract INTO a mount) from `tar -cf a.tar /mnt` * (archive a whole mount). Only the spec knows which slot a word filled, so * this asks it and keeps the classified spec for each surviving operand, * whose `rawPath` is what a message should name. */ export declare function positionalScopes(cmdName: string, argv: string[], cwd: string, words: readonly (string | PathSpec)[]): PathSpec[]; /** Combine positional and path-flag scopes, keeping operand order. */ export declare function mergeScopes(positional: PathSpec[], flagScopes: PathSpec[]): PathSpec[]; /** * The line as an admission pattern reads it, and the program it runs. * * For an installed CLI head the spec walk names the verb path (global * options before the verb dropped, an alias canonicalized) and hands * back the leaf's own words, so `git -C /r push origin` reads as * `git push origin` and a rule on `git push` catches it; a walk the tree * refuses (unknown verb, bare group, usage error) reads the raw words, * since the line fails on its own. Anything else is the name and the raw * argv, and the program is the bare name. */ export declare function programTokens(registry: MountRegistry, name: string, argv: readonly string[], cwd: string): [readonly string[], readonly string[]]; //# sourceMappingURL=routing.d.ts.map