/** * `astramem-local pair --url ` — Wave 3e device pairing. * * Redeems a FEAT-278 claim code against the cloud (possession of code = * credential; POST /claims/{code}/redeem, no auth) and wires up sync: * 1. the returned ApiKey goes into the OS credential store as the sync * device token (never written to disk in plaintext), * 2. url/workspaceId land in /sync.json with enabled=true, * merged into Config.sync at the next daemon start. * * Claim codes come from the AstraMemory dashboard (POST /me/claims). */ export interface RedeemResponse { apiUrl: string; tenantId: string; workspaceId: string; apiKey: string; } export type RedeemResult = { ok: true; data: RedeemResponse; } | { ok: false; status: number; message: string; }; /** POST /claims/{code}/redeem. Exposed for tests via injectable fetch. */ export declare function redeemClaim(cloudUrl: string, code: string, fetchImpl?: typeof fetch): Promise; /** Prod cloud API host — root-relative, no /api prefix (astragenie/common * #167/#169). Used when no --url / ASTRA_SYNC_URL is given so `pair ` * just works against prod. Override for staging / self-hosted. */ export declare const DEFAULT_CLOUD_URL = "https://api.astramemory.com"; export type UrlSource = 'flag' | 'env' | 'default'; /** Resolve the redeem target: explicit --url wins over ASTRA_SYNC_URL wins * over the prod default (astramem-local#85). Pure — exported for tests. */ export declare function resolveCloudUrl(flagUrl?: string, envUrl?: string): { cloudUrl: string; urlSource: UrlSource; }; /** Sync base to persist: an explicit operator url wins over the cloud-echoed * apiUrl; with no override, trust the redeem response (astramem-local#85). */ export declare function resolveSyncBase(urlSource: UrlSource, cloudUrl: string, responseApiUrl: string): string; export declare function pairCommand(args: string[]): Promise;