/** * The one file the Relay channel for Claude Code reads. Its three names, its * folder and its format are the channel's own * (packages/claude-code/src/config.ts, `loadConfig` and `parseEnvFile`; * packages/claude-code/README.md, "Manual environment fallback"). The folder is * owner-only and the file is mode 600, because it holds an agent's token. */ export declare const CHANNEL_ENV_KEYS: readonly ["RELAY_AGENT_TOKEN", "RELAY_BASE_URL", "RELAY_ALLOWED_SENDERS"]; export declare const CHANNEL_DIR_MODE = 448; export declare const CHANNEL_FILE_MODE = 384; export interface ChannelEnvValues { token: string; baseURL: string; /** Handles or Contact ids allowed to message this agent. */ allowedSenders: readonly string[]; } /** The channel's own reader: last line wins, quotes optional, `export` allowed. */ export declare const readChannelEnv: (contents: string) => Record; /** * Rewrites only the named keys, in place. Every other line a person or another * tool put in this file is kept exactly where it was. Shared by every runtime * that keeps its Relay settings in a .env file (Claude Code, Hermes). */ export declare const renderEnvFile: (existing: string, changes: Record) => string; export declare const renderChannelEnv: (existing: string, values: ChannelEnvValues) => string; export interface ChannelEnvState { path: string; exists: boolean; /** The token already in the file, when it holds one. Never printed. */ token?: string; baseURL?: string; allowedSenders: string[]; contents: string; } export declare const inspectChannelEnv: (channelDir: string) => Promise; /** * Writes the file the way the Relay config is written (private-file.ts): an * exclusive temporary file in the same folder, private before the token lands * in it, renamed over the destination, read back. Owner-only by the platform's * own means: mode bits on POSIX, a private ACL on Windows. */ export declare const writeChannelEnv: (channelDir: string, values: ChannelEnvValues, platform?: NodeJS.Platform) => Promise<{ path: string; contents: string; }>; /** The same private write for any runtime's .env file: only the named keys change. */ export declare const writeEnvFile: (path: string, changes: Record, label: string, platform?: NodeJS.Platform) => Promise<{ path: string; contents: string; }>; //# sourceMappingURL=claude-channel.d.ts.map