/**
 * Codex activation evaluation — decide whether a codex's `detected_by`
 * matches the current project context (typically `process.cwd()`).
 *
 * Used by the recall handler to filter out lessons from codexes that
 * don't apply to the active project. Without this, recall would
 * surface React-specific lessons inside a Rust project (cross-codex
 * contamination).
 *
 * Coverage:
 *   - file_exists / dir_exists / file_match / file_glob → filesystem-evaluated
 *   - user_pinned → always true (codex was explicitly installed)
 *   - all_of / any_of → recursive combinators
 *   - memory_match / conversation_signal → default true (need runtime
 *     context the recall handler doesn't carry; orchestrator (O3) is
 *     the proper place for these)
 */
import type { Codex, CodexDetection } from "./types.js";
/**
 * Evaluate a codex's activation against a project context.
 *
 * - Composite codexes are not directly activatable; treat as inactive
 *   here (their `includes` activate independently via their own
 *   `detected_by`).
 * - Focused codex with no `detected_by`: defaults to active (the codex
 *   author wanted always-on).
 * - `activation_scope: user` + `user_pinned`: always active.
 * - Otherwise: evaluate the `detected_by` list (any-of semantics —
 *   matching ANY listed signal activates).
 */
export declare function isCodexActive(codex: Codex, cwd: string): Promise<boolean>;
/**
 * Evaluate a single detection signal against a project context.
 *
 * Returns false on unknown kinds (forward-compat — future engine
 * versions could add detection kinds opensquid doesn't recognize yet;
 * fail closed rather than over-activate).
 */
export declare function evaluateDetection(detection: CodexDetection, cwd: string): Promise<boolean>;
/**
 * Caches codex activation decisions for one project context.
 *
 * Reuse across multiple recall calls in the same session — avoids
 * re-reading codex.yaml files on every recall. Per-cwd because the
 * answer depends on the project being worked in.
 */
export declare class CodexActivationCache {
    private readonly cwd;
    private readonly rootDir?;
    private decisions;
    constructor(cwd: string, rootDir?: string | undefined);
    /** Returns true iff the codex's `detected_by` matches this cwd. */
    isActive(codexId: string): Promise<boolean>;
    private evaluate;
}
/**
 * Extract the codex id from a lesson description.
 *
 * opensquid's codex CLI seeds lessons with descriptions like:
 *   "before any git push or release (codex:loop-engineering-workflow)"
 *
 * Returns null for lessons not seeded from a codex (the pre-codex
 * lessons created by `lesson.create` without `pack_id`).
 */
export declare function extractCodexId(description: string): string | null;
//# sourceMappingURL=activate.d.ts.map