import type { NativePortableState } from './native-portable-types.js'; import type { NativeChangeState, NativeProjectPaths } from './native-types.js'; import type { NativeWorkspaceFinish, NativeWorkspaceIdentityV3 } from './native-workspace.js'; import type { WorkflowNativePullRequestFinishConfig } from '../workflow-contract/types.js'; import { type NativePullRequestFinishOutcome } from './native-pull-request-finish.js'; export interface NativeWorkspaceFinishPlan { finish: NativeWorkspaceFinish; changeRoot: string; primaryRoot: string; changeBranch: string; targetBranch: string; targetRoot: string | null; remote: string | null; isolation: 'branch' | 'worktree'; pullRequestFinish: WorkflowNativePullRequestFinishConfig | null; } export interface NativeWorkspaceFinishResult { action: NativeWorkspaceFinish; status: 'completed' | 'kept' | 'blocked'; commit: string | null; remote: string | null; pushed: boolean; pullRequestUrl: string | null; pullRequest: NativePullRequestFinishOutcome | null; merged: boolean; targetRoot: string | null; cleanup: { performed: boolean; reason: string | null; }; message: string | null; recoveryArgs: string[] | null; } export declare class NativeWorkspaceFinishError extends Error { readonly result: NativeWorkspaceFinishResult; constructor(result: NativeWorkspaceFinishResult); } type NativeWorkspaceFinishState = Pick | Pick; export declare function prepareNativeWorkspaceFinish(options: { paths: NativeProjectPaths; state: NativeChangeState; workspace: NativeWorkspaceIdentityV3; pullRequestFinish?: WorkflowNativePullRequestFinishConfig; }): Promise; /** * Prepare Git finishing directly from the portable YAML binding. * * Unlike the legacy workspace identity this deliberately does not create or * compare root hashes. The current Git worktree registration and branch are * the only local facts needed before the user-authorized finish action. */ export declare function prepareNativePortableWorkspaceFinish(options: { paths: NativeProjectPaths; state: NativePortableState; archiveDir?: string; pullRequestFinish?: WorkflowNativePullRequestFinishConfig; }): Promise; export declare function finishArchivedNativeWorkspace(options: { paths: NativeProjectPaths; state: NativeWorkspaceFinishState; name: string; archiveDir: string; transactionId: string; plan: NativeWorkspaceFinishPlan; }): Promise; export {}; //# sourceMappingURL=native-workspace-finish.d.ts.map