import { type ActiveAgentSessionIdentity, type CodexOpenRootRolloutIdentity, type CodexOpenRootRolloutInventory } from "./agent-session-provider.js"; /** Exact open-file inventory. A cwd match alone never establishes process ownership. */ export declare const MAX_CODEX_OPEN_ROOT_ROLLOUTS = 128; export interface LsofOpenFileRecord { fd?: string; type?: string; device?: string; inode?: string; path?: string; } export declare function parseLsofOpenFiles(text: string): LsofOpenFileRecord[]; export declare function resolveCodexOpenRolloutIdentity({ codexHome, pid, cwd, preferredSessionId, allowedCompanionIdentity, allowedAdditionalIdentities, processBirth, lsofOutput }: { codexHome: string; pid: number; cwd?: string; preferredSessionId?: string; allowedCompanionIdentity?: ActiveAgentSessionIdentity; allowedAdditionalIdentities?: readonly ActiveAgentSessionIdentity[]; processBirth: string; lsofOutput: string; }): ActiveAgentSessionIdentity | undefined; export declare function inspectCodexOpenRootRolloutInventory({ codexHome, pid, cwd, processBirth, lsofOutput }: { codexHome: string; pid: number; cwd?: string; processBirth: string; lsofOutput: string; }): CodexOpenRootRolloutInventory; export type CodexOpenRootDuplicateDisposition = "none" | "transient_exact_descriptor_duplicate" | "conflicting_identity"; export declare function classifyCodexOpenRootDuplicates(identities: readonly CodexOpenRootRolloutIdentity[]): CodexOpenRootDuplicateDisposition; export declare function codexOpenRootRolloutInventoryResult({ pid, processUuid, processBirth, cwd, roots }: { pid: number; processUuid: string; processBirth: string; cwd?: string; roots: CodexOpenRootRolloutIdentity[]; }): CodexOpenRootRolloutInventory; export declare function selectCodexOpenRolloutIdentity({ inventory, preferredSessionId, allowedCompanionIdentity, allowedAdditionalIdentities }: { inventory: CodexOpenRootRolloutInventory; preferredSessionId?: string; allowedCompanionIdentity?: ActiveAgentSessionIdentity; allowedAdditionalIdentities?: readonly ActiveAgentSessionIdentity[]; }): ActiveAgentSessionIdentity | undefined; export declare function sameActiveCodexIdentity(left: ActiveAgentSessionIdentity, right: ActiveAgentSessionIdentity): boolean; export declare function parseLsofInteger(value: string): bigint; export declare function readCodexSessionMetadata(filePath: string, expectedDevice: bigint, expectedInode: bigint, pid: number): { id: string; cwd: string; originator: string; source: unknown; } | undefined;