import type { BaseCommand } from '../index.js'; export interface ResolvedWorkspace { /** * Org slug that owns workspaceId. Empty string in the QUONFIG_API_KEY * path because API keys are workspace-scoped and the slug is never * needed downstream — `getValidAccessTokenForOrgSlug` short-circuits * on the env key before consulting it. */ orgSlug: string; workspaceId: string; } /** * Resolve the target workspace UUID + owning org slug for commands that * don't extend APICommand (e.g. pull, push — which talk to Gitea, not the * oRPC API, but still need to mint a Gitea token for the right org). * * Resolution precedence (qfg-08i): * 1. --workspace flag * 2. QUONFIG_WORKSPACE env * 3. the target dir's quonfig.json `workspace` pin (when `dir` is given) * 4. active OAuth profile / QUONFIG_API_KEY + QUONFIG_WORKSPACE * * Ranking the pin above the active profile makes a pinned workspace dir * self-describing: a bare `qfg pull`/`qfg sync` inside it targets the pinned * workspace no matter which workspace the user's default profile points at. * Without this, `qfg sync --dir ./our-config` under an unrelated active * profile would rewrite that dir's git origin to the wrong workspace. * * Mirrors the error messages from get-client.ts so behavior feels identical * whether you're hitting the API directly or going through Gitea. */ export declare function resolveWorkspaceUuid(command: BaseCommand, flagOverride?: string, dir?: string): Promise;