/** * Core types shared between CLI and future Electron app. */ interface ProgressReporter { step(message: string): void; success(message: string): void; warn(message: string): void; error(message: string): void; } declare class AuthError extends Error { code: 'NOT_AUTHENTICATED' | 'INVALID_KEY' | 'EXPIRED_KEY'; constructor(code: 'NOT_AUTHENTICATED' | 'INVALID_KEY' | 'EXPIRED_KEY', message: string); } interface UserInfo { id: number; name: string; email: string; tier: 'free' | 'pro' | 'enterprise'; features: string[]; } /** * Pure auth validation — no process.exit, no CLI output. * Throws AuthError on failure so callers can handle it their way. */ declare function validateAuth(): Promise<{ apiKey: string; user: UserInfo; }>; /** * CRUD for ~/.web3market/projects.json * Tracks projects the user has created or worked in. */ interface TrackedProject { name: string; path: string; createdAt: string; lastOpenedAt: string; components: string[]; chains: string[]; } declare function listProjects(): TrackedProject[]; declare function findProject(nameOrPath: string): TrackedProject | undefined; declare function registerProject(project: Omit): TrackedProject; declare function touchProject(projectPath: string): void; declare function removeProject(name: string): boolean; /** * Detect whether the current directory is a web3market project. * Checks for kit.config.ts in the given directory. */ interface DetectedProject { name: string; path: string; configPath: string; components: string[]; chains: string[]; template: string | null; frontend: 'next' | 'vite' | 'none'; hasContracts: boolean; } declare function detectProject(cwd: string): DetectedProject | null; /** * Auto-track helper for project-scoped commands. * If the cwd has kit.config.ts, either touch or auto-register. */ declare function autoTrackProject(cwd: string): void; export { AuthError, type DetectedProject, type ProgressReporter, type TrackedProject, autoTrackProject, detectProject, findProject, listProjects, registerProject, removeProject, touchProject, validateAuth };