/** * DataAccessor re-export + factory functions. * * The DataAccessor interface is defined in @cleocode/contracts. * This module re-exports it and provides the concrete SQLite factory. * * @epic T4454 * @task T9054 */ export type { ArchiveFields, ArchiveFile, DataAccessor, QueryTasksResult, TaskAuditLogQuery, TaskAuditLogRow, TaskFieldUpdates, TaskQueryFilters, TransactionAccessor, } from '@cleocode/contracts'; /** * Assert that production database writes are forbidden in test mode. * * When `CLEO_TEST_MODE=1` is set, any write to a production `tasks.db` or * `brain.db` path (i.e. paths NOT under a temp dir or the env-var override) * throws `E_PROD_DB_WRITE_IN_TEST`. This prevents tests from accidentally * polluting the developer's live database. * * Escape hatch: set `CLEO_TEST_DB_OVERRIDE=1` to suppress the guard (audited * per ADR-051 pattern — written to `.cleo/audit/force-bypass.jsonl`). * * @param dbPath - Absolute resolved path to the SQLite file being opened. * @throws Error with code `E_PROD_DB_WRITE_IN_TEST` when the guard fires. * * @task T1906 */ export declare function assertTestEnv(dbPath: string): void; /** * Create a DataAccessor for the given working directory. * Always creates a SQLite accessor (ADR-006 canonical storage). * * ALL accessors returned are safety-enabled by default via SafetyDataAccessor wrapper. * Use CLEO_DISABLE_SAFETY=true to bypass (emergency only). * * @task T9054 — engine parameter dropped; CLEO is SQLite-only (ADR-006). */ export declare function createDataAccessor(cwd?: string): Promise; /** * Get a tasks-DB DataAccessor for the given working directory. * * This is the canonical tasks-only factory. Name is explicit about scope — * the former `getAccessor` name implied universality and caused the * gitnexus graph to misclassify it as a universal key (T9054). * * @param cwd - Optional project root (defaults to process.cwd() resolution). * @returns DataAccessor backed by tasks.db (ADR-006, ADR-068). */ export declare function getTaskAccessor(cwd?: string): Promise; /** * @deprecated Renamed to {@link getTaskAccessor} (T9054). Will be removed in a future minor version. * Use `getTaskAccessor` or `openCleoDb('project', cwd)` instead. */ export declare function getAccessor(cwd?: string): Promise; /** * Alias: get a DBHandle for the project-scope (tasks) database. * * This is the canonical replacement for getAccessor() when callers * need the native DB handle rather than the full DataAccessor interface. * Delegates to openCleoDb('project', cwd). * * @param cwd - Optional working directory. * @returns DBHandle for the project-scope `cleo.db`. */ export declare function getAccessorDb(cwd?: string): Promise; //# sourceMappingURL=data-accessor.d.ts.map