/** * AGENTS.md Runtime Overlay for oh-my-codex * * Dynamically injects session-specific context into AGENTS.md before Codex * launches, then strips it after session ends. Uses marker-bounded sections * for idempotent apply/strip cycles. * * Injected context: * - Codebase map (directory/module structure for token-efficient exploration) * - Active mode state (ralph iteration, autopilot phase, etc.) * - Priority notepad content * - Project memory summary (tech stack, conventions, directives) * - Compaction survival instructions * - Session metadata */ export type SessionOrchestrationMode = "default" | "team"; export interface GenerateOverlayOptions { orchestrationMode?: SessionOrchestrationMode; } export declare function resolveSessionOrchestrationMode(cwd: string, sessionId?: string, activeSkill?: string): Promise; /** * Generate the overlay content to inject into AGENTS.md. * Total output is capped at MAX_OVERLAY_SIZE chars. */ export declare function generateOverlay(cwd: string, sessionId?: string, options?: GenerateOverlayOptions): Promise; /** * Apply overlay to AGENTS.md. Strips any existing overlay first (idempotent). * Uses file locking to prevent concurrent access corruption. */ export declare function applyOverlay(agentsMdPath: string, overlay: string, cwd?: string): Promise; /** * Strip overlay from AGENTS.md, restoring it to clean state. * Uses file locking to prevent concurrent access corruption. */ export declare function stripOverlay(agentsMdPath: string, cwd?: string): Promise; /** * Check if AGENTS.md currently has an overlay applied. */ export declare function hasOverlay(content: string): boolean; export declare function sessionModelInstructionsPath(cwd: string, sessionId: string): string; /** * Write the session-scoped model instructions file. * * The file carries only the OMX runtime overlay. Durable global * (`${CODEX_HOME}/AGENTS.md`) and project `AGENTS.md` guidance is owned by * Codex native AGENTS discovery and must not be copied into this second * instruction channel, otherwise the same rules reach the model twice. * * Team workers compose their own instructions in `src/team/worker-bootstrap.ts` * and are deliberately out of scope here: they support non-Codex providers that * have no native AGENTS discovery. */ export declare function writeSessionModelInstructionsFile(cwd: string, sessionId: string, overlay: string): Promise; /** * Best-effort cleanup for session-scoped model instructions file. */ export declare function removeSessionModelInstructionsFile(cwd: string, sessionId: string): Promise; //# sourceMappingURL=agents-overlay.d.ts.map