/** * Per-CLI extension of `@doist/cli-core`'s global-args parser. * * Layers twist's `--include-private-channels`, `--non-interactive`, * `--interactive`, and the `--progress-jsonl ` space form on top of * the subset of cli-core's canonical shape that twist actually registers * with Commander (`--json`, `--ndjson`, `--accessible`, `--no-spinner`, * `--progress-jsonl[=path]`). * * cli-core's parser also surfaces `quiet` and `verbose` from argv, but * twist does not register `--quiet` or `--verbose` globally (Commander * would reject them) — so we drop them from the exported shape to avoid * the type/API leak where helpers believe the binary supports them. */ import { type GlobalArgs as CoreGlobalArgs } from '@doist/cli-core'; type TwSpecificFlags = { /** Bare/string/false — see `TwLocalFlags.progressJsonl` for semantics. */ progressJsonl: string | true | false; /** Resolved path for `--progress-jsonl` (any form). `undefined` when bare or absent. */ progressJsonlPath: string | undefined; includePrivateChannels: boolean; nonInteractive: boolean; interactive: boolean; }; /** * Public shape exposed to twist callers. Drops cli-core's `quiet` and * `verbose` because twist does not register `--quiet` / `--verbose` with * Commander — exposing them in the type would lie about what the binary * supports. */ export type TwGlobalArgs = Pick & TwSpecificFlags; /** Back-compat alias — pre-cli-core twist code imported `GlobalArgs` from this module. */ export type GlobalArgs = TwGlobalArgs; /** * Parse well-known global flags from an argv array. Pure — pass an explicit * array for testing, or omit to read `process.argv`. Returns the narrowed * twist surface; cli-core's `quiet` and `verbose` are intentionally * dropped (see {@link TwGlobalArgs}). */ export declare function parseGlobalArgs(argv?: string[]): TwGlobalArgs; /** Clear the cached parse result. Call in test teardown. */ export declare const resetGlobalArgs: () => void; export declare function isJsonMode(): boolean; export declare function isNdjsonMode(): boolean; /** Pre-subcommand `tw --user ` (see `stripUserFlag` in `src/index.ts`). */ export declare function getRequestedUserRef(): string | undefined; export declare function isNonInteractive(): boolean; export declare function includePrivateChannels(): boolean; export declare function isProgressJsonlEnabled(): boolean; export declare function getProgressJsonlPath(): string | undefined; export declare const isAccessible: () => boolean; export declare const shouldDisableSpinner: () => boolean; export {}; //# sourceMappingURL=global-args.d.ts.map