import type { NativeProjectPaths, NativeWorkspaceProjection } from './native-types.js'; export type NativeWorkspaceIsolation = 'current' | 'branch' | 'worktree'; export type NativeWorkspaceFinish = 'merge' | 'push' | 'pull-request' | 'keep'; export interface NativeWorkspaceBinding { isolation: NativeWorkspaceIsolation; changeBranch: string | null; targetBranch: string | null; } export interface NativeWorkspaceGitProvenance { provider: 'git'; baseCommit: string; targetBranch: string; targetCommit: string; } interface NativeWorkspaceIdentityFields { capturedAt: string; capturedRevision: number; nativeRootRef: string; projectRootId: string; nativeRootId: string; /** Stable real-path hashes used for root drift decisions. */ projectRootPathId?: string; nativeRootPathId?: string; sessionHash?: string; git?: NativeWorkspaceGitProvenance; } export interface NativeWorkspaceIdentityV2 extends NativeWorkspaceIdentityFields { schema: 'comet.native.workspace.v2'; } export interface NativeWorkspaceIdentityV3 extends NativeWorkspaceIdentityFields, NativeWorkspaceBinding { schema: 'comet.native.workspace.v3'; finish: NativeWorkspaceFinish | null; } export type NativeWorkspaceIdentity = NativeWorkspaceIdentityV2 | NativeWorkspaceIdentityV3; export interface NativeWorkspaceBindingInspection { state: 'legacy' | 'aligned' | 'drifted'; code: 'workspace-binding-legacy' | 'workspace-binding-root-changed' | 'workspace-branch-changed' | 'workspace-kind-changed' | 'workspace-vcs-unavailable' | null; message: string | null; } export type NativeWorkspaceDriftComponent = 'native-root-ref' | 'project-root-path' | 'native-root-path' | 'project-root-legacy-identity' | 'native-root-legacy-identity'; export type NativeWorkspaceFindingCode = 'workspace-root-changed' | 'workspace-inspection-unavailable'; export declare const NATIVE_WORKSPACE_ADVISORY_CODES: ReadonlySet; export declare function isNativeWorkspaceAdvisoryCode(code: string): code is NativeWorkspaceFindingCode; export interface NativeWorkspaceAdvisory { state: 'aligned' | 'drifted' | 'unknown'; findingCodes: NativeWorkspaceFindingCode[]; driftComponents: NativeWorkspaceDriftComponent[]; } export interface CaptureNativeWorkspaceOptions { paths: NativeProjectPaths; name: string; revision: number; now?: Date; sessionId?: string; binding?: NativeWorkspaceBinding; finish?: NativeWorkspaceFinish; } export interface ResolveNativeWorkspaceBindingOptions { projectRoot: string; isolation: NativeWorkspaceIsolation; changeBranch?: string; targetBranch?: string; } export declare function resolveNativeWorkspaceBinding(options: ResolveNativeWorkspaceBindingOptions): NativeWorkspaceBinding; export declare function assertNativeWorkspaceBindingCurrent(projectRoot: string, expected: NativeWorkspaceBinding): void; export declare function nativeWorkspaceFile(paths: NativeProjectPaths, name: string): string; export declare function inspectNativeWorkspaceSchema(paths: NativeProjectPaths, name: string): Promise<'comet.native.workspace.v1' | 'comet.native.workspace.v2' | 'comet.native.workspace.v3' | null>; export declare function projectNativeWorkspace(paths: NativeProjectPaths, name: string): Promise; export declare function nativeWorkspaceIdentityNeedsMigration(paths: NativeProjectPaths, name: string): Promise; export declare function inspectNativeWorkspaceIdentity(options: CaptureNativeWorkspaceOptions): Promise; export declare function writeNativeWorkspaceIdentity(options: CaptureNativeWorkspaceOptions): Promise; export declare function setNativeWorkspaceFinish(paths: NativeProjectPaths, name: string, finish: NativeWorkspaceFinish): Promise; export declare function readNativeWorkspaceIdentity(paths: NativeProjectPaths, name: string): Promise; export declare function migrateLegacyNativeWorkspaceIdentity(options: { paths: NativeProjectPaths; name: string; revision: number; now?: Date; }): Promise; export declare function inspectNativeWorkspaceAdvisory(options: { paths: NativeProjectPaths; identity: NativeWorkspaceIdentity; }): Promise; export declare function inspectNativeWorkspaceBinding(options: { paths: NativeProjectPaths; identity: NativeWorkspaceIdentity; }): Promise; export declare function assertNativeWorkspaceBinding(paths: NativeProjectPaths, name: string): Promise; export {}; //# sourceMappingURL=native-workspace.d.ts.map