/** `SessionStart` to `session_start`, the event name in Codex's trust keys. */
export declare function codexEventName(event: string): string;
/**
 * Codex's `hook_hash` for one handler in one group (codex-rs hooks
 * discovery + config fingerprint): sha256 of the canonical JSON of
 * `{ event_name, matcher?, hooks: [handler] }`, where the handler always
 * carries `timeout` (default 600, at least 1) and `async` (default false).
 */
export declare function codexHookHash(event: string, group: Record<string, unknown>, handler: Record<string, unknown>): string;
/**
 * The config text with trust carried forward to Phren's handlers in
 * `hooks` (the hooks.json text as it is now), or undefined when nothing
 * changes. `before` is hooks.json as it stood before this install rewrote
 * it, when there was a rewrite. `hooksPaths` are the names Codex may key
 * this hooks.json by; the first is used for a new key.
 */
export declare function codexHookTrustText(config: string, hooks: string, program: string, hooksPaths: string[], before?: string): {
    text: string;
    carried: string[];
} | undefined;
/**
 * Carries the owner's Codex trust forward to Phren's handlers in
 * `$CODEX_HOME/hooks.json`. Runs after every install, update, rollback and
 * module reconcile, whether or not hooks.json changed, so a computer an
 * earlier install left untrusted is repaired too. Never throws.
 */
export declare function carryCodexHookTrust(program: string, before?: string, env?: NodeJS.ProcessEnv): Promise<string[]>;
