export interface PortalHandoff { schemaVersion: 1; handoffId: string; branch: string; remoteRef: string; commit: string; sourceBranch?: string; sourceDirty: boolean; createdCommit: boolean; repositoryName: string; remoteName: string; envPolicy: "load-local"; } export interface PortalEnvironment { values: Record; files: string[]; root: string; } export interface PortalWorkspace { handoff: PortalHandoff; repositoryPath: string; workspacePath: string; environmentRoot: string; environmentFiles: string[]; reused: boolean; } export interface PortalGitResult { status: number | null; stdout?: string; stderr?: string; error?: Error; } export type RunPortalGit = (args: string[], cwd: string, env?: NodeJS.ProcessEnv) => PortalGitResult | Promise; export declare function createPortalHandoff(input: { sourcePath: string; remoteName?: string; handoffId?: string; now?: Date; runGit?: RunPortalGit; }): Promise; export declare function preparePortalWorkspace(input: { handoff: unknown; workspacePath?: string; worktreeRoot?: string; runGit?: RunPortalGit; }): Promise; export declare function parsePortalHandoff(value: unknown): PortalHandoff; export declare function listPortalEnvironmentFiles(root: string, mode?: string): string[]; export declare function loadPortalEnvironment(root: string, mode?: string): PortalEnvironment;