/** * token subcommand — `astramem-local token rotate` * * Generates a fresh 32-byte (64 hex char) random Bearer token, stores it in * the OS credential store (SEC-10), and prints the `export MEMORY_BEARER=...` * line so the user can paste it. * * secrets.env ALWAYS gets the new MEMORY_BEARER= line, regardless of * whether the OS-store write also succeeded (review fix-round decision, * FEAT-466: secrets.env is unconditionally authoritative for the bearer — * see storage/keystore.ts's bearer-section header for the rollback * rationale). rotateToken() also write-throughs the rotated token into the * LEGACY unscoped OS-credential-store identity (not just the new scoped * one) so a `reinstall --rollback` to a pre-FEAT-466 binary — which reads * only that legacy identity — picks up the current token instead of a * stale one. */ /** Generate a cryptographically secure 32-byte hex token (64 chars). */ export declare function generateToken(): string; /** * Rotate the Bearer token stored in secrets.env. * * Reads any existing secrets.env to preserve azure keys, then overwrites * with a freshly generated MEMORY_BEARER. * * @param secretsPath - Absolute path to secrets.env. Defaults to * `defaultConfigDir()/secrets.env`. * @param configDir - Config dir used to scope the OS credential-store * identity (FEAT-466). Defaults to `defaultConfigDir()`. Tests pass a tmp * dir here to keep the stubbed Entry's scoped key isolated per test. * @returns The new Bearer token string (64 hex chars). */ export declare function rotateToken(secretsPath?: string, configDir?: string): string; /** CLI entry for `astramem-local token `. */ export declare function tokenCommand(args: string[]): Promise;