import type { AgentConfig } from './types.js'; /** * Options for fetching config from vault */ export interface FetchConfigOptions { /** Vault server URL */ vaultUrl: string; /** API key for authentication */ apiKey: string; /** Skip TLS verification */ insecure?: boolean; /** Agent ID (for tracking) */ agentId?: string; /** Host config ID (preferred for fetching config) */ hostConfigId?: string; /** Last known config version (for conditional GET) */ configVersion?: number; /** Request timeout in ms (default: 30000) */ timeout?: number; } /** * Result of fetching config from vault */ export interface FetchConfigResult { /** Whether config was fetched successfully */ success: boolean; /** The merged agent config */ config?: AgentConfig; /** New config version */ version?: number; /** Whether config was modified (false for 304 Not Modified) */ modified?: boolean; /** Error message if failed */ error?: string; } /** * Fetch agent configuration from vault server * * @param options Fetch options including vaultUrl, apiKey, etc. * @returns Fetch result with config or error */ export declare function fetchConfigFromVault(options: FetchConfigOptions): Promise; /** * Response from vault's agent identity endpoint */ interface AgentIdentityResponse { agentId: string; hostname: string; tenantId: string; hostConfigId: string | null; hostConfigName: string | null; configVersion: number | null; } /** * Discover agent identity from vault * * Calls GET /v1/agent/identity to get the agent's ID and info. * This is useful when migrating to config-from-vault mode without * going through the bootstrap flow. * * @param options Connection options * @returns Agent identity or null if not found */ export declare function discoverAgentIdentity(options: { vaultUrl: string; apiKey: string; hostname?: string; tenantId?: string; insecure?: boolean; timeout?: number; }): Promise; /** * Check if local config has configFromVault enabled */ export declare function isConfigFromVaultEnabled(config: Partial): boolean; /** * Get minimal config needed for config-from-vault mode * Only vaultUrl, auth, and insecure are used locally */ export declare function getMinimalConfigForVaultMode(config: AgentConfig): Pick; export {}; //# sourceMappingURL=vault-loader.d.ts.map