/** * Shared `--workspace` resolution for the `docs search` and `docs read` commands * so both apply the same workspace-aware ranking (parity: a fuzzy `docs read` * should resolve the same top hit that `docs search` ranks first). */ import { type DetectionResult, type ProjectType } from '@salesforce/b2c-tooling-sdk/discovery'; /** Minimal logger surface used by {@link resolveDocsWorkspace}. */ interface WorkspaceLogger { debug(objOrMsg: unknown, msg?: string): void; } /** Detector signature — matches the SDK's `detectWorkspaceType`; injected so commands can stub it in tests. */ type DetectWorkspaceType = (cwd: string) => Promise; /** * Resolves the `--workspace` flag value to concrete project type(s). * * Workspace awareness is ON by default (matching the MCP docs tools): when the * flag is unset — or explicitly `auto` — workspace detection runs and its result * favors the detected workspace's docs. `all` opts out (no preference); an * explicit type (or comma-separated list) is used verbatim without detection. * * Kept dependency-injected (detector/logger/warn) rather than a base-class method * so both docs commands share one implementation and can stub detection in tests. * * @param value - The raw `--workspace` flag value (may be undefined) * @param detect - Workspace detector (the command's stubbable `detectWorkspaceType`) * @param logger - Command logger for debug tracing * @param warn - Callback for surfacing unknown workspace types to the user * @returns Concrete project types to favor, or `undefined` for no preference */ export declare function resolveDocsWorkspace(value: string | undefined, detect: DetectWorkspaceType, logger: WorkspaceLogger, warn: (message: string) => void): Promise; export {};