import type { CLIInvocation } from '@struktoai/mirage-core/commands/cli/types'; import type { FlagView } from '@struktoai/mirage-core/commands/spec/index'; import { IOResult } from '@struktoai/mirage-core/io/types'; import type { ByteSource } from '@struktoai/mirage-core/io/types'; import { HfHubAccessor } from '../../../../accessor/hf_hub.ts'; /** The repo kind a line names, defaulting the way upstream does. */ export declare function repoTypeOf(fl: FlagView): string; /** * A Hub handle for the repository this line named. * * The CLI builds one per invocation rather than owning a second Hub client: * an accessor is a value object here, holding the endpoint, the credential * and which repository is being addressed, so `hf` gets the mount's tree walk * and commit builder for free. It reaches no mount, which is what keeps this * an account CLI. */ export declare function hubFor(inv: CLIInvocation, repoId: string, repoType: string, revision?: string): HfHubAccessor; /** * Refuse a line that left a required operand empty. * * `Operand.required` is inert outside the clap dialect on purpose: only clap * names the empty slots, and under every other style the refusal stays the * leaf's own business, worded by the command (`executor/command/cli.ts`). hf is * argparse, so each leaf that takes operands calls this, and it words the * refusal the way argparse does rather than letting the line reach the Hub and * come back as an authentication error. */ export declare function requireOperands(inv: CLIInvocation, names: readonly string[]): void; export declare function textOut(text: string, mutated?: boolean): [ByteSource, IOResult]; /** * Refuse a verb that cannot work anonymously, before it is tried. * * The Hub answers 401 "Invalid username or password." for an unauthenticated * write, which reads as a wrong credential rather than as a missing one. */ export declare function requireToken(inv: CLIInvocation, what: string): void; //# sourceMappingURL=accessor.d.ts.map