import type { BreakpointBackend } from "../backend.js"; /** * Context used for matching a breakpoint against routing rules. */ export interface BackendResolveContext { /** Domain of the breakpoint (e.g. "backend", "security"). */ domain?: string; /** Tags on the breakpoint. */ tags?: string[]; /** Explicit backend override from the MCP tool params. */ explicitBackend?: string; /** Explicit git-native breakpoints directory override from the MCP tool params. */ breakpointsDir?: string; /** Explicit config root override. */ configRoot?: string; } export interface ResolvedBackend { /** The resolved backend instance. */ backend: BreakpointBackend; /** * "explicit-override" when MCP params force the choice, * "routed" when a routing rule matched, * "env-override" when BMUX_BACKEND forced the choice, * "default" when falling back to git-native. */ source: "explicit-override" | "routed" | "env-override" | "default"; } /** * Resolve the appropriate BreakpointBackend for a request. * * Resolution order: * 1. Explicit MCP param override. * 1. BMUX_BACKEND env var -- forces a specific backend type. * For "git-native" this uses the default git-native backend. * For "github-issues" this requires a routing config to be present * (to know which repo/owner/labels to use). * 2. BMUX_BACKEND env var -- forces a specific backend type. * 3. `.a5c/routing.json` -- if present and a rule matches the * breakpoint's domain/tags, create the backend from the rule. * 4. Fall back to git-native backend (default behaviour). */ export declare function resolveBreakpointBackend(ctx?: BackendResolveContext): ResolvedBackend; //# sourceMappingURL=backend-resolver.d.ts.map