UNPKG

@code-yeongyu/senpi

Version:

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

31 lines • 2.04 kB
import type { Credential } from "@earendil-works/pi-ai"; import type { ExtensionAPI } from "../../types.ts"; import { type CursorCliGenerationGuard } from "./diagnostics.ts"; import { importLocalCursorCredential, importNativeCursorCredential, type LocalCursorImportDeps } from "./oauth-login.ts"; import { type CursorCliSessionRouter } from "./session-router.ts"; import { type CursorCliOauthProviderSettings } from "./settings.ts"; /** Injectable seams; every default resolves real on-disk state at invocation time. */ export type CursorCliAccountCommandDeps = { readonly loadSettings?: (cwd: string) => CursorCliOauthProviderSettings; readonly router?: CursorCliSessionRouter; readonly resolveExecutable?: (settings: CursorCliOauthProviderSettings) => string; readonly probeVersion?: (executable: string) => Promise<string>; readonly readNativeCredential?: () => Credential | undefined | Promise<Credential | undefined>; readonly importCredential?: typeof importLocalCursorCredential; readonly importNativeCredential?: typeof importNativeCursorCredential; readonly importDeps?: LocalCursorImportDeps; /** Acknowledgement persistence seam; the default read-modify-writes the global settings file. */ readonly persistAcknowledgement?: (cwd: string, acknowledgedAt: string) => void; /** Enablement persistence seam; explicit login/import actions activate the fallback lane. */ readonly persistEnabled?: (cwd: string, enabled: boolean) => void; readonly now?: () => number; readonly generation?: CursorCliGenerationGuard; }; /** * Registers `/cursor-account` plus the reload/shutdown teardown for this * extension generation: the command reads account state fresh from the * credential store on every invocation, and every deferred continuation is * fenced so a retired generation is never touched after a reload. */ export declare function registerCursorCliAccountCommand(pi: ExtensionAPI, deps?: CursorCliAccountCommandDeps): void; //# sourceMappingURL=account-command.d.ts.map