import type { Paths } from "./paths.js"; /** Parses dotenv-style text. Supports `export KEY=`, single/double quotes and `#` comments. */ export declare function parseEnv(text: string): Record; export declare function readEnvFile(file: string): Record; /** Rewrites a single key in the env file, preserving the other lines and comments. Creates the file (mode 600) if needed. */ export declare function upsertEnvVar(file: string, key: string, value: string): void; export declare function removeEnvVar(file: string, key: string): boolean; export declare function ensureSecretFileMode(file: string): void; export declare function secretFileMode(file: string): number | null; export type Secrets = Readonly>; /** * Secrets visible to the server: the `.env` file in the skillhook directory, with the process * environment layered on top (so `SKILLHOOK_SECRET_X=... skillhook serve` still overrides). */ export declare function loadSecrets(paths: Paths, env?: NodeJS.ProcessEnv): Secrets; /** Env var name that holds a skill's default bearer secret: `SKILLHOOK_SECRET_`. */ export declare function defaultSecretEnvFor(skillName: string): string; export declare const ADMIN_TOKEN_ENV = "SKILLHOOK_ADMIN_TOKEN"; /** * skillhook's own credentials: the admin token and the Skillhook Cloud family (the link's token and key pair, the API key * and its cloud), plus the Sentry settings and kill switch. Never a skill's secret (writing the skill's would overwrite them), never written from the cloud. */ export declare function isSkillhookCredential(name: string): boolean; /** Never print these; used by `secret list` and redaction. */ export declare function redactValue(value: string): string;