cmd-sync-servers - v1.0.0
    Preparing search index...

    Interface HostAdapter

    What the engine needs from the program it runs in: where secrets are kept, how a new SSH host key or an unverified certificate is decided on, and how a person is asked for a secret. The CLI and the VS Code extension each supply one.

    interface HostAdapter {
        credentials: CredentialStore;
        interactive?: boolean;
        logger?: Logger;
        confirmCertificate?(info: CertificateInfo): Promise<CertificateDecision>;
        confirmHostKey(info: HostKeyInfo): Promise<HostKeyDecision>;
        promptSecret(request: SecretRequest): Promise<string | undefined>;
        secretAccepted?(request: SecretRequest, secret: string): Promise<void>;
    }
    Index
    credentials: CredentialStore

    Where saved passwords and key passphrases are read, and new ones kept.

    interactive?: boolean

    False when nobody can answer a question, as in an unattended run: new host keys are then refused.

    logger?: Logger

    Where the engine logs, with secrets redacted.

    • Asks for a secret; resolves undefined when nobody can be asked or the person cancels.

      Parameters

      Returns Promise<string | undefined>

    • Called once after a sign-in succeeds with a secret a person typed; may offer to save it.

      Parameters

      Returns Promise<void>