/**
 * Shared Database Helpers
 *
 * Provides common database resolution and API creation functions
 * used across all CLI command modules.
 */
import type { GlobalOptions } from './types.js';
import { type StorageBackend } from '@stoneforge/storage';
import type { QuarryAPI } from '../api/types.js';
import type { EntityId } from '@stoneforge/core';
export declare const STONEFORGE_DIR = ".stoneforge";
export declare const DEFAULT_DB_NAME = "stoneforge.db";
export declare const DEFAULT_ACTOR: EntityId;
/**
 * Resolves database path from options or default location.
 *
 * @param options - Global options that may contain db path
 * @param requireExists - If true (default), only return path if database file exists.
 *                        If false, return path even if file doesn't exist (for create operations).
 */
export declare function resolveDatabasePath(options: GlobalOptions, requireExists?: boolean): string | null;
/**
 * Gets actor from options or default
 */
export declare function resolveActor(options: GlobalOptions): EntityId;
/**
 * Creates an API instance from options.
 *
 * @param options - Global options containing db path and other settings
 * @param createDb - If true, create the database if it doesn't exist. Default is false.
 *                   When false, returns an error if the database file doesn't exist.
 */
export declare function createAPI(options: GlobalOptions, createDb?: boolean): {
    api: QuarryAPI;
    backend: StorageBackend;
    error?: string;
};
//# sourceMappingURL=db.d.ts.map