import type { CodexWorkspaceMarker, CodexMultiUserScope, CodexSsoIdentity } from '../../types/codex.js';
/**
 * Detect Codex workspace markers from filesystem and environment.
 * Called by the adapter; also used directly in tests.
 */
export declare function detectCodexWorkspace(projectPath: string): CodexWorkspaceMarker;
/**
 * Resolve the scoped project path for a user.
 * Ensures no user can access another user's specs by rewriting the path
 * to: <workspaceRoot>/<tenantId>/<userId>
 *
 * If the requestedPath is already within the user's allowed scope,
 * it is returned unchanged. Otherwise, it is rewritten.
 */
export declare function resolveUserScope(requestedPath: string, identity: CodexSsoIdentity, workspaceRoot: string): CodexMultiUserScope;
/**
 * Check whether a given projectPath is accessible to the identity.
 * Used to gate list_specs and search_specs results.
 */
export declare function isPathAllowed(projectPath: string, identity: CodexSsoIdentity, workspaceRoot: string): boolean;
/**
 * Filter a list of project paths to only those accessible to the identity.
 * Zero-leakage guarantee: paths outside the user's scope are silently excluded.
 */
export declare function filterPathsForUser(paths: string[], identity: CodexSsoIdentity, workspaceRoot: string): string[];
/**
 * Guard a tool invocation against cross-workspace leakage in Codex enterprise.
 * No-op when Codex identity is not present (standard dev / other hosts).
 *
 * Used by list_specs, search_specs, and search_suggestions to prevent
 * a Codex user from reading another user's projectPath.
 *
 * Reads `OPENAI_WORKSPACE_ROOT` env var to determine the tenant workspace root.
 * If not set, gating cannot be enforced and the call is allowed (fail-open on
 * misconfiguration — logging should surface this to the enterprise admin).
 */
export declare function guardProjectPathForCodex(projectPath: string): {
    allowed: true;
} | {
    allowed: false;
    reason: string;
};
//# sourceMappingURL=workspace-scope.d.ts.map