/** * Config Tool * Unified credential lifecycle + runtime configuration. * Replaces the former `setup` tool with canonical name `config`. * * Setup actions (credential lifecycle): * status, setup_status, setup_start, setup_reset, setup_complete * * Runtime config actions: * set, cache_clear */ import type { CredentialState } from '../../credential-state.js'; import type { AccountConfig } from '../helpers/config.js'; export interface ConfigInput { action: 'status' | 'setup_status' | 'setup_start' | 'setup_reset' | 'setup_complete' | 'set' | 'cache_clear'; force?: boolean; key?: string; value?: string; } export interface ConfigHandlerOptions { /** Clear the durable credential blob for the current JWT subject. */ clearSubjectCredentials?: (sub: string) => Promise; } interface ConfigStatusResult { action: 'status'; state: CredentialState; setup_url: string | null; accounts: string[]; } interface ConfigSetupStatusResult { action: 'setup_status'; state: CredentialState; setup_url: string | null; } interface ConfigSetupStartResult { action: 'setup_start'; state: CredentialState; setup_url: string | null; } interface ConfigSetupResetResult { action: 'setup_reset'; state: CredentialState; message: string; } interface ConfigSetupCompleteResult { action: 'setup_complete'; previous_state: CredentialState; state: CredentialState; accounts: string[]; } interface ConfigSetResult { action: 'set'; ok: false; text: string; } interface ConfigCacheClearResult { action: 'cache_clear'; ok: true; cleared: number; } type ConfigResult = ConfigStatusResult | ConfigSetupStatusResult | ConfigSetupStartResult | ConfigSetupResetResult | ConfigSetupCompleteResult | ConfigSetResult | ConfigCacheClearResult; /** * Unified config tool - credential lifecycle + runtime settings */ export declare function handleConfig(accounts: AccountConfig[], input: ConfigInput, options?: ConfigHandlerOptions): Promise; export {}; //# sourceMappingURL=config.d.ts.map