import { ToolsManager } from '../tools/toolsManager.js'; import { AuthValidationResult } from '../types.js'; /** * Perform auto-authentication validation if environment is configured * * Environment variables: * - SN_INSTANCE_URL: ServiceNow instance URL (required for auto-auth) * - SN_AUTH_TYPE: Authentication type ('basic' or 'oauth', defaults to 'oauth') * - SN_USER_NAME / SN_USERNAME: Username for basic auth * - SN_PASSWORD: Password for basic auth * * Rules: * 1. If SN_INSTANCE_URL is not set -> return skipped status * 2. List existing auth profiles via `npx now-sdk auth --list` * - If a profile's host matches SN_INSTANCE_URL -> use that profile * - Store the auth alias in session for use by all SDK commands * 3. If no matching profile found -> attempt to add auth profile automatically * - For basic auth: uses SN_USER_NAME/SN_USERNAME and SN_PASSWORD env vars * - For OAuth: opens browser for authentication * - If successful, store the auth alias in session * - If failed, return not_authenticated with setup instructions * * @returns AuthValidationResult with structured auth status for client notification */ export declare function autoValidateAuthIfConfigured(toolsManager: ToolsManager): Promise; //# sourceMappingURL=fluentInstanceAuth.d.ts.map