/** What a candidate binary reports; 0.4 binaries predate `capabilities` and are mapped to protocol 1. */ export interface JevFabricCapabilities { version: string; protocol: number; store?: number; platform?: string; features: readonly string[]; } export type JevFabricSource = "config" | "user" | "bundled"; export interface JevFabricResolution { path: string; source: JevFabricSource; capabilities: JevFabricCapabilities; /** Candidates tried first and why they were passed over. */ skipped: Array<{ path: string; source: JevFabricSource; reason: string; }>; } /** What each Fabric feature needs from a binary. */ export declare const JEV_FABRIC_REQUIREMENTS: { readonly durable: { readonly protocol: 1; readonly features: readonly ["follow", "list", "label"]; }; readonly jev: { readonly protocol: 2; readonly features: readonly ["serve-concurrent", "serve-24h", "jev-request-credential"]; }; readonly decisions: { readonly protocol: 2; readonly features: readonly ["serve-concurrent", "serve-24h", "jev-request-credential", "decisions", "decision-targets"]; }; readonly sessions: { readonly protocol: 2; readonly features: readonly ["sessions", "serve-concurrent", "read", "cwd", "serve-24h", "durable-input"]; }; }; export type JevFabricRequirement = keyof typeof JEV_FABRIC_REQUIREMENTS; /** Asks a binary what it supports, without touching any store. */ export declare function probeJevFabric(file: string): Promise; /** * The user's own installs: PATH entries plus the installer's default * `~/.local/bin`, which GUI-launched Pi often lacks. Anything inside the * workspace is skipped: a repository must not be able to supply the binary * that receives Jev credentials and runs every durable command. */ export declare function userCandidates(cwd: string, env?: NodeJS.ProcessEnv, home?: string): { found: string[]; skipped: Array<{ path: string; reason: string; }>; }; /** * The optional `jev-fabric` npm package, copied once to a versioned path under * the agent directory: running workers re-execute their own path, so it must * not change when an upgrade replaces node_modules. */ type BundledPackage = { version: string; binaryPath(): string | undefined; }; export declare function stageBundledJevFabric(agentDir: string, load?: () => BundledPackage): string | undefined; /** * Picks the binary for one requirement: explicit trusted config wins outright * (no fallback when it is unsuitable), then the user's compatible install, * then the bundled package. Newer binaries that meet the protocol and * features are accepted; only an unsuitable one is passed over, and why is reported. */ export declare function resolveJevFabric(options: { configured: string; cwd: string; agentDir: string; requirement: JevFabricRequirement; env?: NodeJS.ProcessEnv; home?: string; bundled?: () => string | undefined; }): Promise; export {}; //# sourceMappingURL=resolve.d.ts.map