/** * Resolution of the `--instance` / `--agent` pair into the tool and instance a * command addresses (Issue #3224). * * Lives beside, not inside, `./instances` so that a test which replaces * `resolveInstanceTarget` on that module is still seen by every caller here. */ import type { ApiClient } from '../utils/api-client'; import type { InstanceConflictMode, ResolvedInstanceTarget } from './instances'; export interface CommandTarget { /** The roster target, or null when no selector was given */ target: ResolvedInstanceTarget | null; /** The tool the instance is registered under, else the `--agent` value */ agent: string | undefined; /** The RESOLVED instance id, never the string the user typed */ instanceId: string | undefined; } /** * @param selector - Falsy means "no instance": nothing is requested of the server * @param mode - Passed on only when given, so the call shape stays as it was */ export declare function resolveCommandTarget(client: ApiClient, worktreeId: string, selector: string | undefined, requestedAgent: string | undefined, mode?: InstanceConflictMode): Promise; /** * The {@link CommandTarget} for a target resolved some other way (Issue #3982: * `attach` and `wait` resolve their own), by the same rule as above. * * @param target - The resolved instance, or null when no selector was given */ export declare function commandTargetOf(target: ResolvedInstanceTarget | null, requestedAgent: string | undefined): CommandTarget; //# sourceMappingURL=command-target.d.ts.map