@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
19 lines (18 loc) • 1.15 kB
TypeScript
/** The script's file name in a version's folder, beside `bridge-hook.mjs`. */
export declare const FAST_HOOK_FILE = "claude-hook.mjs";
export declare const fastHookPath: (versionDir: string) => string;
/**
* How long a PreToolUse or PostToolUse callback may run, from its process's
* start. Install registers them for every tool call (Codex takes no matcher),
* and Codex kills a hook at 10 s: on the Mini under a load average near 130
* (2026-10-01) the old 8 s socket wait, after a slow start, ran past it and
* Codex showed "Hook failed: hook timed out after 10s" on every call. These
* callbacks only snapshot changed files for the phone and nothing waits on
* them, so once the budget is spent they give up and the tool runs.
*/
export declare const TOOL_HOOK_BUDGET_MS = 5000;
/** Keep permission replies and turn context, without turning tool callbacks into approvals. */
export declare function hookOutput(event: string, result: string): string;
/** The forwarder's source, with the ToolUse budget written in. */
export declare const fastHookSource: (toolBudgetMs?: number) => string;
export declare const FAST_HOOK_SOURCE: string;