import { type PsmuxSpawnRunner, type ResolvedTmuxBinary } from "./psmux-detect"; /** @internal Test-only seam for hermetic Windows authority storage tests. */ /** * The platform that governs psmux authority decisions, honoring the test * override. Every authority gate must read this rather than `process.platform`, * or a pinned test platform is silently ignored on non-Windows hosts. */ export declare function gjcTmuxAuthorityPlatform(): NodeJS.Platform; export declare function __setTmuxProviderAuthorityPlatformForTests(platform: NodeJS.Platform | null): void; export type TmuxProviderKind = "native-tmux" | "windows-psmux"; /** A structured tmux provider. Native tmux intentionally has no prefix. */ export interface ProviderContext { readonly kind: TmuxProviderKind; readonly command: string; readonly commandPrefix: readonly string[]; readonly namespace: string | null; readonly executableIdentity: string | null; readonly binary: ResolvedTmuxBinary; readonly platform: NodeJS.Platform; } /** Durable authority binding for one owner generation. */ export interface ProviderAuthority extends ProviderContext { readonly stateDir: string; readonly sessionId: string; readonly generation: string; } /** Resolve a structured provider. Native tmux remains byte-for-byte argv compatible. */ export declare function resolveGjcTmuxProviderContext(options?: { env?: NodeJS.ProcessEnv; platform?: NodeJS.Platform; runner?: PsmuxSpawnRunner; binary?: ResolvedTmuxBinary; }): ProviderContext; export declare function buildTmuxProviderCommand(context: ProviderContext, command: string, args?: readonly string[]): string[]; /** Returns whether an owner generation has a persisted Windows psmux authority. */ export declare function hasGjcTmuxProviderAuthoritySync(input: { stateDir: string; sessionId: string; generation: string; }): boolean; export declare function bindGjcTmuxProviderAuthority(context: ProviderContext, input: { stateDir: string; sessionId: string; generation: string; }): ProviderAuthority; export declare function persistGjcTmuxProviderAuthoritySync(authority: ProviderAuthority): void; export declare function readGjcTmuxProviderAuthoritySync(input: { stateDir: string; sessionId: string; generation: string; }): ProviderAuthority; /** Enumerates owner-secured, executable-validated psmux authorities in one durable state root. */ export declare function listGjcTmuxProviderAuthoritiesSync(stateDirInput: string): ProviderAuthority[]; /** Re-proves the staged immutable record and executable identity before generation publication. */ export declare function assertGjcTmuxStagedMutationAuthoritySync(authority: ProviderAuthority): void; /** Re-proves the current pointer, exact executable identity, and native root before mutation. */ export declare function assertGjcTmuxMutationAuthoritySync(authority: ProviderAuthority): void;