UNPKG

@essentialai/cogent-bridge

Version:

Cogent Bridge — cross-agent comms for Claude Code, OpenAI Codex and Slack. Codex users: install with `curl -fsSL https://cogent.tools/install.sh | sh`, then start with `cogent-codex` for real-time peer wake.

26 lines • 1.66 kB
import type { Config } from "../config.js"; export type CodexSandboxMode = Config["COGENT_CODEX_SANDBOX"]; export interface WakeExperiment { /** Phase label (e.g. "P1"), recorded on every wake; null when the file names none. */ phase: string | null; /** Option A: keep waiting for a codex app-server turn after the timeout and deliver its answer. */ lateAnswer: boolean; /** How long the late wait may last after the timeout. Always within [LATE_ANSWER_MIN_MS, LATE_ANSWER_MAX_MS]. */ lateAnswerMaxMs: number; /** Overrides COGENT_CODEX_SANDBOX for codex wakes on both rails; null = the configured value. */ codexSandbox: CodexSandboxMode | null; } export declare const LATE_ANSWER_MIN_MS = 60000; /** 4 h. The rail-C hook's in-flight cap (check-on-stop.lib.mjs INFLIGHT_MAX_MS) must exceed this. */ export declare const LATE_ANSWER_MAX_MS = 14400000; export declare const LATE_ANSWER_DEFAULT_MS = 3600000; /** Kept in step with the COGENT_CODEX_SANDBOX enum in src/config.ts (wake-experiment.test.ts pins it). */ export declare const CODEX_SANDBOX_MODES: readonly CodexSandboxMode[]; /** Test seam: point the reader at another file (null = the real homedir path). */ export declare function setWakeExperimentPathForTests(p: string | null): void; export declare function wakeExperimentPath(): string; /** Test seam: allow the once-per-process warning to fire again. */ export declare function resetWakeExperimentWarning(): void; /** Read the switch now. See the module note: never throws, and anything wrong means OFF. */ export declare function readWakeExperiment(): WakeExperiment; //# sourceMappingURL=wake-experiment.d.ts.map