UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

30 lines • 2.1 kB
import type { AuthStorage } from "../../../auth-storage.ts"; import { type RemoveCredentialAccountResult } from "../../../credential-accounts.ts"; import { type AccountSlot } from "./accounts.ts"; import { ANTHROPIC_SUBSCRIPTION_PROVIDER_ID } from "./provider-id.ts"; export { ANTHROPIC_SUBSCRIPTION_PROVIDER_ID }; export type ProviderAccountSummary = { readonly name: string; readonly displayName?: string; readonly source: AccountSlot["source"]; readonly blocked: boolean; /** Same meaning as the generic account listing's fields (senpi#4327); present only while blocked. */ readonly blockedReason?: "auth_error" | "rate_limit" | "disabled"; readonly blockedUntil?: number; readonly pinned: boolean; }; export declare function timedBlock(account: Pick<AccountSlot, "blockedUntil" | "blockReason">, now: number): Pick<ProviderAccountSummary, "blocked" | "blockedReason" | "blockedUntil">; export declare function getProviderAccounts(storage: AuthStorage, provider: string, env?: NodeJS.ProcessEnv): ProviderAccountSummary[]; export declare function pinProviderAccount(storage: AuthStorage, provider: string, name: string | null, env?: NodeJS.ProcessEnv): Promise<void>; /** * `/claude-account remove` takes the same removal as RPC `account_remove` and `/account remove`, so the entry points * cannot diverge: a `claude-cli` slot is signed out of the CLI by its account dir, a linked dir is never followed, * and the slot is removed even when the sign-out cannot run, with a notice (senpi#4436). */ export declare function removeProviderAccount(storage: AuthStorage, provider: string, name: string, env?: NodeJS.ProcessEnv): Promise<RemoveCredentialAccountResult>; /** * Lifts a usage or rate-limit block the user knows is wrong (extra usage bought, a misread reset). * Auth blocks stay: only a login or the re-probe can lift those. Returns whether a block was lifted. */ export declare function unblockProviderAccount(storage: AuthStorage, provider: string, name: string, env?: NodeJS.ProcessEnv): Promise<boolean>; //# sourceMappingURL=account-management.d.ts.map