@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
16 lines • 1.22 kB
TypeScript
import type { ClaudeCliAccountProfile } from "./accounts.ts";
/** A `claude-cli` turn whose CLI authenticated from an inherited credential instead of the account's own sign-in. */
export declare class ClaudeCliTokenSourceLeak extends Error {
readonly field: "tokenSource" | "apiKeySource" | "apiProvider" | "account";
constructor(field: "tokenSource" | "apiKeySource" | "apiProvider" | "account");
}
/**
* Checks the account the CLI initialized with (`initializationResult().account`). A `tokenSource` that names an
* environment variable (`CLAUDE_CODE_OAUTH_TOKEN`, ...) or any `apiKeySource` other than `none` means the turn
* would bill something other than the account's own claude.ai login, so it throws. Like `claude auth status`, only a
* first-party account counts: no account, or any `apiProvider` other than `firstParty`, throws too. Returns the
* reported profile.
*/
export declare function verifyClaudeCliInitialization(initialization: unknown): Omit<ClaudeCliAccountProfile, "checkedAt">;
export declare function profileChanged(current: ClaudeCliAccountProfile | undefined, reported: Omit<ClaudeCliAccountProfile, "checkedAt">): boolean;
//# sourceMappingURL=claude-cli-token-source.d.ts.map