/** * @file Sockeye broker client. Asks the running sockeye credential daemon for a * secret over its local Unix socket, with a Windows named pipe to come, so a * biometric-gated read happens inside the daemon and the value is vended to * this process in memory rather than sitting in an env var. This is the layer * `ai/credentials.mts` documents as slotting between the env check and the * keychain read in `secrets/find.ts` `resolve()`. The broker is OPTIONAL and * self-gating: when the daemon isn't running (no socket file), * `requestFromBroker` returns `undefined` immediately and the caller falls * through to the keychain. It never throws — a broker miss is a fall-through, * not an error. The daemon binary itself is built by socket-btm * (`packages/sockeye-daemon-builder`); download-and-start is a later layer, * so today this only talks to an already-running daemon. */ export interface BrokerRequestOptions { /** * The keychain service scope (e.g. `socketsecurity`). */ readonly service: string; /** * The account within the service (e.g. `ANTHROPIC_API_KEY`). */ readonly account: string; } export interface BrokerResponse { readonly ok?: boolean | undefined; readonly value?: string | undefined; } /** * Ask the sockeye daemon for a credential. Returns the value on success, or * `undefined` when the daemon isn't running, doesn't hold it, or the biometric * prompt was declined. Never throws: a miss falls through to the next resolver * layer, the keychain. */ export declare function requestFromBroker({ account, service, }: BrokerRequestOptions): Promise;