@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
21 lines • 1.08 kB
TypeScript
import type { SdkErrorKind } from "./errors.ts";
export type ProviderAccountsChangedEvent = {
readonly type: "accounts_changed";
readonly provider: string;
/** Only a successful login or an explicit block reset invalidates session holds. */
readonly remedy?: "login" | "reset";
};
export type ProviderAccountFailoverEvent = {
readonly type: "failover";
readonly provider: string;
readonly from: string;
readonly to: string;
readonly reason: SdkErrorKind;
};
export type ProviderAccountEvent = ProviderAccountsChangedEvent | ProviderAccountFailoverEvent;
type ProviderAccountEventListener = (event: ProviderAccountEvent) => void;
export declare function subscribeProviderAccountEvents(listener: ProviderAccountEventListener): () => void;
export declare function emitProviderAccountsChanged(provider: string, remedy?: ProviderAccountsChangedEvent["remedy"]): void;
export declare function emitProviderAccountFailover(provider: string, from: string, to: string, reason: SdkErrorKind): void;
export {};
//# sourceMappingURL=account-events.d.ts.map