@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.
20 lines • 1.32 kB
TypeScript
/** Hard ceiling on how long one claim may suppress other processes. Mirrors INFLIGHT_MAX_MS. */
export declare const CLAIM_MAX_MS = 1800000;
/** `~/.cogent/wake-claims/<sha256(cwd)[..16]>.<peerId>.<messageId>.json` */
export declare function wakeClaimPath(peerId: string, messageId: string, cwd?: string): string;
/**
* Try to become the single process that wakes for this message.
*
* Returns true when this process owns the wake (or when claiming was impossible — see FAILS OPEN).
* Returns false ONLY when another LIVE, UNEXPIRED process demonstrably holds it.
*/
export declare function claimWake(peerId: string, messageId: string, cwd?: string): boolean;
/**
* COG-93: push this process's claim on `messageId` out to `untilMs` (never shortens it, capped at
* CLAIM_MAX_MS from now) — a wake given more time than the TTL assumed must not let another process
* take the same message over midway. Rewrites only a claim this process holds; best-effort, silent.
*/
export declare function extendWakeClaim(peerId: string, messageId: string, untilMs: number, cwd?: string): void;
/** Release the claim. Best-effort; an orphan expires or is stolen when its holder dies. */
export declare function releaseWake(peerId: string, messageId: string, cwd?: string): void;
//# sourceMappingURL=wake-claim.d.ts.map