/** * Common JSON config file read/write operations. * * Provides standard implementations for readRaw, writeRaw, deleteRaw * that can be reused across agents using JSON config files. */ import type { DeleteRawResult, ReadRawResult, WriteRawResult } from "./types.js"; /** * Read and parse a JSON config file, returning empty object if not found. * * @throws Error with user-friendly message if JSON is invalid */ declare function readJsonConfig(configPath: string): Record; /** * Create raw config operations for a JSON-based config file. * * @param getConfigPath - Function to get the config file path from the directory * @param agentName - Name of the agent for error messages */ declare function createJsonConfigOperations(getConfigPath: (configDirectory: string) => string, agentName: string): { readConfig: (configDirectory: string) => Record; readRaw: (configDirectory: string, key: string) => ReadRawResult; writeRaw: (configDirectory: string, key: string, value: unknown) => WriteRawResult; deleteRaw: (configDirectory: string, key: string) => DeleteRawResult; }; export { createJsonConfigOperations, readJsonConfig };