/** Resource reference for permission checks. */
export interface PermissionCheckResource {
    /** Resource kind (e.g. "agent", "session"). */
    readonly kind: string;
    /** Resource ID. */
    readonly id: string;
}
/** Return value of {@link useCheckPermission}. */
export interface UseCheckPermissionReturn {
    /** Whether the current user has the specified permission. */
    readonly allowed: boolean;
    /** `true` while the authorization check is in flight. */
    readonly isLoading: boolean;
    /** Error from the last check, or `null`. */
    readonly error: Error | null;
}
/**
 * Hook that checks whether the current user has a specific permission
 * on a resource.
 *
 * Wraps `iamPolicy.checkAuthorization()` with caching and graceful
 * degradation. When the server does not support authorization checks
 * (OSS edition where the IAM service is not registered), the hook
 * returns `allowed: true` — ensuring all UI is visible in single-user
 * local mode.
 *
 * Pass `null` as `resource` to skip the check (returns `allowed: true`
 * immediately — the "no resource yet" case is permissive to avoid
 * flashing hidden UI).
 *
 * Results are cached per (kind, id, relation) triple for the lifetime
 * of the component mount. Re-mount or change inputs to re-check.
 *
 * @param resource  - The resource to check, or `null` to skip.
 * @param relation  - The permission to check (e.g. "can_edit", "can_grant_access").
 *
 * @example
 * ```tsx
 * const { allowed, isLoading } = useCheckPermission(
 *   { kind: "agent", id: agentId },
 *   "can_edit",
 * );
 *
 * if (!allowed) return null; // hide edit button
 * ```
 */
export declare function useCheckPermission(resource: PermissionCheckResource | null, relation: string): UseCheckPermissionReturn;
//# sourceMappingURL=useCheckPermission.d.ts.map