import type { ResolvedTmuxBinary } from "./psmux-detect"; export { assertGjcTmuxMutationAuthoritySync, bindGjcTmuxProviderAuthority, buildTmuxProviderCommand, hasGjcTmuxProviderAuthoritySync, type ProviderAuthority, type ProviderContext, persistGjcTmuxProviderAuthoritySync, readGjcTmuxProviderAuthoritySync, resolveGjcTmuxProviderContext, type TmuxProviderKind, } from "./tmux-provider-context"; export declare const GJC_DEFAULT_TMUX_SESSION = "gajae_code"; export declare const GJC_TMUX_SESSION_PREFIX = "gajae_code_"; export declare const GJC_TMUX_COMMAND_ENV = "GJC_TMUX_COMMAND"; export declare const GJC_TMUX_ACTIVE_SESSION_ENV = "GJC_TMUX_ACTIVE_SESSION"; export declare const GJC_TMUX_PROFILE_ENV = "GJC_TMUX_PROFILE"; export declare const GJC_TMUX_MOUSE_ENV = "GJC_MOUSE"; export declare const GJC_TMUX_PROFILE_OPTION = "@gjc-profile"; export declare const GJC_TMUX_PROFILE_VALUE = "1"; export declare const GJC_TMUX_BRANCH_OPTION = "@gjc-branch"; export declare const GJC_TMUX_BRANCH_SLUG_OPTION = "@gjc-branch-slug"; export declare const GJC_TMUX_PROJECT_OPTION = "@gjc-project"; export declare const GJC_TMUX_SESSION_ID_OPTION = "@gjc-session-id"; export declare const GJC_TMUX_SESSION_STATE_FILE_OPTION = "@gjc-session-state-file"; export declare const GJC_TMUX_OWNER_GENERATION_OPTION = "@gjc-owner-generation"; export declare const GJC_TMUX_OWNER_SERVER_KEY_OPTION = "@gjc-owner-server-key"; export declare const GJC_TMUX_VERSION_OPTION = "@gjc-version"; export declare const GJC_PSMUX_PROFILE_FORCE_ENV = "GJC_PSMUX_PROFILE_FORCE"; export interface GjcTmuxProfileCommand { description: string; args: string[]; } export interface TmuxCommandResult { exitCode: number | null; stdout?: string; stderr?: string; signalCode?: string | null; } export type TmuxCommandRunner = (args: string[]) => TmuxCommandResult; export declare function envDisabled(value: string | undefined): boolean; /** * Resolve the tmux (or tmux-compatible multiplexer) command GJC should invoke. * * This is the shared entry point used by every GJC code path that needs to talk * to a multiplexer: `gjc --tmux` planning and `gjc session ...`, * the lifecycle controller, and the harness resident owner. Routing all of * them through the same resolver means a single `GJC_TMUX_COMMAND` override or * a single Windows psmux / pmux detection wins for the whole process — the * failure mode where `gjc --tmux` creates a psmux-backed session and then * `gjc session status` fails because it queries literal `tmux` is closed off. * * Explicit `GJC_TMUX_COMMAND` overrides are honored on * every platform. On native Windows without an override the resolver walks * `psmux`, then `pmux`, then `tmux` and uses the first binary present on PATH. * On POSIX the resolver returns `tmux` (the historical default) and only * falls through to the platform-aware walker if the caller opts in. */ export declare function resolveGjcTmuxCommand(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): string; export type { PsmuxProbe, ResolvedTmuxBinary, ResolveGjcTmuxBinaryOptions } from "./psmux-detect"; export { clearPsmuxDetectionCache, detectPsmux, probePsmux, resolveGjcTmuxBinary } from "./psmux-detect"; /** * Build the exact-session target for tmux *option* commands * (`show-options` / `set-option`) and `display-message -t`. * * Session-scoped commands such as `kill-session` / `attach-session` resolve a * bare exact target (`=NAME`), but tmux 3.6a refuses to resolve a bare `=NAME` * for option/display commands. Appending the empty window separator (`=NAME:`) * keeps the exact-session match while giving tmux the window-qualified target * those commands require. See gajae-code#580. */ export declare function buildGjcTmuxExactOptionTarget(sessionName: string, opts?: { env?: NodeJS.ProcessEnv; platform?: NodeJS.Platform; binary?: ResolvedTmuxBinary; }): string; /** * Build the exact-session target for tmux *session-scoped* commands such as * `attach-session` and `kill-session`. Native tmux accepts `=NAME` for an * exact session match, but Windows psmux 3.3.x rejects that target form for * session commands even though the bare `NAME` resolves. Keep native tmux on * exact targets and intentionally use the bare session name for psmux. */ export declare function buildGjcTmuxExactSessionTarget(sessionName: string, opts?: { env?: NodeJS.ProcessEnv; platform?: NodeJS.Platform; binary?: ResolvedTmuxBinary; }): string; export declare const GJC_TMUX_UNTAGGED_REASON = "gjc_tmux_session_untagged"; export declare function buildGjcTmuxUntaggedSessionHint(tmuxCommand: string): string; export declare function buildGjcTmuxUntaggedSessionError(sessionName: string, tmuxCommand: string): string; export declare function sanitizeTmuxToken(value: string): string; export declare function buildGjcTmuxSessionSlug(value: string): string; export declare function buildGjcTmuxSessionName(env?: NodeJS.ProcessEnv, context?: { branch?: string | null; now?: number; id?: string; }): string; export declare function buildGjcTmuxRequiredProfileCommands(target: string, metadata?: { branch?: string | null; branchSlug?: string | null; project?: string | null; sessionId?: string | null; sessionStateFile?: string | null; ownerGeneration?: string | null; ownerServerKey?: string | null; version?: string | null; }): GjcTmuxProfileCommand[]; export declare function buildGjcTmuxProfileCommands(target: string, env?: NodeJS.ProcessEnv, metadata?: { branch?: string | null; branchSlug?: string | null; project?: string | null; sessionId?: string | null; sessionStateFile?: string | null; ownerGeneration?: string | null; ownerServerKey?: string | null; version?: string | null; }, opts?: { platform?: NodeJS.Platform; tmuxCommand?: string; }): GjcTmuxProfileCommand[]; export declare function normalizeTmuxCreatedAt(raw: string): string;